Lua Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, x) == nil then
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, "You cannot enter here.", TALKTYPE_ORANGE_1)
end
return TRUE
end
The other script (the thing of the level)...
Lua Code:
local levelLimit = 100
local fromPosition = { x = 100, y = 100, z = 7 }
local toPosition = { x = 150, y = 150, z = 7 }
local newPosition = { x = 50, y = 50, z = 7 }
function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL) then
if(getPlayerLevel(cid) >= levelLimit and isInArea(getCreaturePosition(cid), fromPosition, toPosition)) then
doTeleportThing(cid, newPosition)
end
end
return TRUE
end