local level, table = 20,
{ --uniqueid of statue, position
[1234] = {x=95,y=117,z=7},
[1235] = {x=200,y=200,z=6},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) < level then
return doPlayerSendCancel(cid, 'You must be from level '..level..' onwards in order to teleport.')
end
return doTeleportThing(cid, table[item.uid]), doSendMagicEffect(getThingPos(cid), math.random(28,30))
end
<action uniqueid="1234" event="script" value="tp.lua"/>
<action uniqueid="1235" event="script" value="tp.lua"/>
its an action?
can you make it function onStepIn
=D
local level, table = 20,
{ --uniqueid of statue, position
[1234] = {x = 95, y = 117, z = 7},
[1235] = {x = 200, y = 200, z = 6},
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, 'You must be from level '..level..' onwards in order to teleport.')
doTeleportThing(cid, lastPosition)
return true
end
return doTeleportThing(cid, table[item.uid]), doSendMagicEffect(getThingPos(cid), math.random(28,30))
end