function onStepIn(cid, item, pos) -- old distro, old parameters?
local level = 50
local back = {x=1000, y=1000, z=7}
if getPlayerLevel(cid) < level then
doTeleportThing(cid, back)
doPlayerSendTextMessage(cid, 22, "You need "..level.." to walk here.")
end
return true
end
function onStepIn(cid, item, position, fromPosition)
local level = 300
if getPlayerLevel(cid) >= level then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome over.")
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be at least level "..level.." to pass here!")
doSendMagicEffect(getPlayerPosition(cid), 9)
end
return TRUE
end
LUA:function onStepIn(cid, item, position, fromPosition) local level = 300 if getPlayerLevel(cid) >= level then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome over.") else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be at least level "..level.." to pass here!") doSendMagicEffect(getPlayerPosition(cid), 9) end return TRUE end
It takes you back one step, not be needed to put the position into the script. Just set an unique id on the tiles
push you back 2 Sqm or Teleport you back to Temple.