Kippetjee
Member
Can some one make a script when you walk into a teleport you can be tped on 4 places?
thanks
thanks
<movevent type="StepIn" actionid="2121" event="script" value="tp.lua"/>
function onStepIn(cid, item, pos, frompos)
first = {x=997, y=997, z=7}
second = {x=1000, y=1005, z=7}
third = {x=1000, y=1000, z=8}
fourth = {x=1001, y=1000, z=7}
local place = {first, second, third, fourth}
local dest = place[math.random(1, #place)]
doTeleportThing(cid, dest, TRUE)
end
local places = {
{x=997, y=997, z=7},
{x=1000, y=1005, z=7},
{x=1000, y=1000, z=8},
{x=1001, y=1000, z=7}
}
function onStepIn(cid, item, position, fromPosition)
doTeleportThing(cid, places[math.random(#places)])
end