function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ID_OF_CLOSED_DOOR then
local k = getPlayerLevel(cid)
if k >= 9 and k <= 15 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, true)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Only the worthy may pass.')
end
return true
end
end
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) local k = getPlayerLevel(cid) if k >= 9 and k <= 15 then doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition, true) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Only the worthy may pass.') end return true end
[COLOR="darkgreen"]function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = getPlayerLevel(cid)
if k >= 1 and k <= 13 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, true)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Players from lvl 1 to lvl 13 can pass this door.')
end
return true
end[/COLOR]