Alguém poderia me ajudar a fazer uma adaptação no script de Addon System ? (De PDA para Open Source)
Aqui está o meu script :
function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { }
if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Please back your pokemon.") return false end
local numero = addons[item.itemid].looktype
local pb = getPlayerSlotItem(cid, 8).uid
local pk = addons[item.itemid].pokemon
if getItemAttribute(pb,"poke") ~= pk then doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.") return false end
if getItemAttribute(pb,"addon") < 1 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.") doSetItemAttribute(pb,"addon",numero) return true end
return true end
Desculpe se postei na área errada não costumo postar muitas coisas aqui :2