Door of Experience From level x to level x
i mean example i have the door from level 20 to level 100
then i cant enter except im between level 20 and level 100
local function doorEnter(cid, uid, id, position)
doTransformItem(uid, id)
doTeleportThing(cid, position)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local door = getItemInfo(item.itemid)
if item.uid == 34400 then
if getPlayerLevel(cid) >= 20 and getPlayerLevel(cid) <= 100 then
return doorEnter(cid, item.uid, door.transformUseTo, toPosition)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
return true
end
return false
end
<action uniqueid="34400" script="folder/nameofyourfile.lua" />