Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sky = {
- pos = {{x = 1009,y = 1025,z=7},{x = 1009,y = 1026,z=7},{x = 1009,y = 1027,z=7}},
- level = {100,200,300,400},
- fight = true
- }
- function onUse(cid, item, frompos, item2, topos)
- level = getPlayerLevel(cid)
- if (sky.fight == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
- doPlayerSendTextMessage(cid,22,"Você Precisa estar sem battle para usar o item.")
- return FALSE
- end
- if (level <= sky.level[1] ) and (item.itemid == 2177) then
- doRemoveItem(2177,1)
- doTeleportThing(cid,sky.pos[1])
- doSendMagicEffect(getPlayerPosition(cid), 10)
- elseif (level > sky.level[1]) and (level <= sky.level[2]) and (item.itemid == 2177) then
- doRemoveItem(2177,1)
- doTeleportThing(cid,sky.pos[2])
- doSendMagicEffect(getPlayerPosition(cid), 10)
- else
- doPlayerSendTextMessage(cid, 25, "Level insuficiente")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment