skydangerous

Untitled

Nov 2nd, 2011
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. local sky = {
  2.     pos = {{x = 1009,y = 1025,z=7},{x = 1009,y = 1026,z=7},{x = 1009,y = 1027,z=7}},
  3.     level = {100,200,300,400},
  4.     fight = true
  5. }
  6. function onUse(cid, item, frompos, item2, topos)
  7. level = getPlayerLevel(cid)
  8.  if (sky.fight == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
  9.         doPlayerSendTextMessage(cid,22,"Você Precisa estar sem battle para usar o item.")      
  10.         return FALSE
  11.     end
  12.     if (level <= sky.level[1] ) and (item.itemid == 2177) then
  13.         doRemoveItem(2177,1)
  14.         doTeleportThing(cid,sky.pos[1])
  15.         doSendMagicEffect(getPlayerPosition(cid), 10)
  16.    
  17.     elseif (level > sky.level[1]) and (level <= sky.level[2]) and (item.itemid == 2177) then
  18.         doRemoveItem(2177,1)
  19.         doTeleportThing(cid,sky.pos[2])
  20.         doSendMagicEffect(getPlayerPosition(cid), 10)
  21.     else
  22.     doPlayerSendTextMessage(cid, 25, "Level insuficiente")
  23.     end
  24. end
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment