local btype = "ultra"
local pokemon = "Magikarp"

local storage = 9639624 -- storage


function onUse(cid, item, frompos, item2, topos)
if pokemon == "" then return true end
if getPlayerStorageValue(cid, storage) <= 0 then
addPokeToPlayer(cid, pokemon, 0, nil, btype)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns você recebeu sua recompensa")
doSendMagicEffect(getThingPos(cid), 29)
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
doPlayerAddItem(cid, 12237, 1)
doPlayerAddItem(cid, 5805, 1)
doTeleportThing(cid, torneio.playerTemple)
else
doPlayerSendCancel(cid, "Você já pegou sua recompensa")
end
return TRUE
end