Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. local pokes = {
  2. {name = "Squirtle", health = 1000, maxhealth = 1000},
  3. {name = "Charmander", health = 1000, maxhealth = 1000},
  4. {name = "Bulbasaur", health = 1000, maxhealth = 1000},
  5. }
  6.  
  7.  
  8.  
  9. function onUse(cid, item, frompos, item2, topos)
  10.  
  11. local poke = pokes[math.random(#pokes)]
  12.  
  13. if getPlayerLevel(cid) >= 1 then
  14. if doPlayerRemoveItem(cid,7884,1) then
  15. local s = doPlayerAddItem(cid, 2501)
  16. doItemSetAttribute(s, "poke", "This is "..poke.name.."'s pokeball. HP = ["..poke.health.."/"..poke.maxhealth.."]")
  17. doItemSetAttribute(s, "description", "Contains a "..poke.name.."")
  18. doSendMagicEffect(topos, 29)
  19. doPlayerSendTextMessage(cid,22,"Você ganhou um " .. poke.name .. ".")
  20. end
  21. end
  22. return true
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement