tenho a script::
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addons = {
[751] = {pokemon= "Electabuzz" , looktype = 1911, count = 1},
[748] = {pokemon= "Charizard" , looktype = 1910, count = 1},
[755] = {pokemon= "Blastoise" , looktype = 1909, count = 1},
[754] = {pokemon= "Shiny Nidoking" , looktype = 1914, count = 1},
[753] = {pokemon= "Arcanine" , looktype = 1908, count = 1},
[752] = {pokemon= "Shiny Golem" , looktype = 1913, count = 1},
}
if #getCreatureSummons(cid) > 0 then
doPlayerSendCancel(cid, "Porfavor volte seu pokemon.")
return false
end
local numero = addons[item.itemid].looktype
local count = addons[item.itemid].count
local pb = getPlayerSlotItem(cid, 8).uid
local pk = addons[item.itemid].pokemon
if pb <= 0 then
doPlayerSendCancel(cid, "Desculpe, você não tem um "..pk.." no slot")
return false
end
if getItemAttribute(pb,"poke") ~= pk then
doPlayerSendCancel(cid, "Desculpe, você não pode usar esse addon nesse pokemon.")
return false
end
local addon = tonumber(getItemAttribute(pb,"addon"))
if not addon or addon < 1 then
if doRemoveItem(item.uid, count) then
doPlayerSendTextMessage(cid, 27, "Parabéns, você executou isso com sucesso. Para remover seu addon diga !addons remove")
doSetItemAttribute(pb,"addon", numero)
else
doPlayerSendCancel(cid, "Você não tem o necessário para adicionar no seu "..pk..".")
end
return true
end
return true
end