Advertisement
Kevick

Untitled

Apr 27th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. function onUse(cid, item, frompos, item2, topos)
  2. local summon = getCreatureSummons(cid)[1]
  3. tabela_status = {
  4. [13365] = {name="offense", value = 10},
  5. [13366] = {name="defense", value = 10},
  6. [13367] = {name="speed", value = 10},
  7. [13368] = {name="vitality", value = 10},
  8. [13369] = {name="specialattack", value = 10},
  9. }
  10.  
  11. if #getCreatureSummons(cid) < 1 then
  12. doPlayerSendTextMessage((cid), 27, "[Apricorn] Solte-o Seu Pokemon Para Dar o Apricorn!.")
  13. return false
  14. end
  15. local pb = getPlayerSlotItem(cid, 8)
  16. local pokename = getItemAttribute(pb.uid, "poke")
  17. doRemoveItem(item.uid, 1)
  18. local status = tabela_status[item.itemid]
  19. local pbstat= getItemAttribute(pb.uid, status.name)
  20. local st = pbstat + tabela_status[item.itemid].value
  21. doItemSetAttribute(pb.uid, status.name , st)
  22. doSendFlareEffect(getThingPos(summon))
  23. doSendAnimatedText(getThingPos(summon), "Apricorn!", 215)
  24. doPlayerSendTextMessage((cid), 27, "[Apricorn] Seu Pokemon "..pokename.." Ganhou "..status.value.." "..status.name.." points!")
  25. doSendFlareEffect(getThingPos(cid))
  26. return true
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement