skydangerous

Untitled

Nov 2nd, 2011
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local sky = {
  2.     pos = {x = 1009,y = 1025,z=7},
  3.     level = 100,
  4.     fight = false
  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 usar o item.")      
  10.         return TRUE
  11.     end
  12.     if (level >sky.level) and (item.itemid == 2177) then
  13.         doPlayerRemoveItem(cid, 2177,1)
  14.         doPlayerSendTextMessage(cid, 25, "Foi sumonado um item no mapa, ache-o")
  15.         doCreateItem(2160, 1, sky.pos)
  16.        
  17.     else
  18.     doPlayerSendTextMessage(cid, 25, "Level insuficiente")
  19.     end
  20. end
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment