Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pokes = {
- {name = "Squirtle", health = 1000, maxhealth = 1000},
- {name = "Charmander", health = 1000, maxhealth = 1000},
- {name = "Bulbasaur", health = 1000, maxhealth = 1000},
- }
- function onUse(cid, item, frompos, item2, topos)
- local poke = pokes[math.random(#pokes)]
- if getPlayerLevel(cid) >= 1 then
- if doPlayerRemoveItem(cid,7884,1) then
- local s = doPlayerAddItem(cid, 2501)
- doItemSetAttribute(s, "poke", "This is "..poke.name.."'s pokeball. HP = ["..poke.health.."/"..poke.maxhealth.."]")
- doItemSetAttribute(s, "description", "Contains a "..poke.name.."")
- doSendMagicEffect(topos, 29)
- doPlayerSendTextMessage(cid,22,"Você ganhou um " .. poke.name .. ".")
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement