function onUse(cid, item, fromPosition, itemEx, toPosition)
local coords = {x = 1000, y = 1000, z = 1111111}
local requiredlevel = 10
return isInArray({1, 2, 3, 4, 5, 6, 7, 8}, getPlayerVocation(cid)) and getPlayerLevel(cid) >= requiredlevel and doTeleportThing(cid, coords, TRUE) or doPlayerSendCancel(cid, "Sorry not posible.")
end
Actually, it goes into actions (onUse).Movements xml-
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) <= 1000 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be level 1000 or lower.")
end
return true
end
if getPlayerLevel(cid) > 1000 then
return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be level 1000 or lower.")
end