DJ

[Encerrado] problema com addons [dxp]

Por Djonga, 23 de fev. de 2018 em Tópicos Sem Resposta

2
832
DjongaD
23 de fevereiro de 2018 às 16:37

Tô trabalhando num addon system, meu servidor usar icones, e eu acho que ele não tá reconhecendo a pokebola :/

 

script:

function onUse(cid, item, fromPosition, itemEx, toPosition)
                local addons = {
                [17132] = {pokemon= "Snorlax" , looktype = 1895, fly = 0, ride = 0, surf = 0},
               }
 
	if #getCreatureSummons(cid) > 0 or isRiderOrFlyOrSurf(cid) then
                                doPlayerSendCancel(cid, "Please back your pokemon.")
                                return false
                end     
                local addon = addons[item.itemid].looktype
                local fly = addons[item.itemid].fly
                local ride = addons[item.itemid].ride
                local surf = addons[item.itemid].surf
 
                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") >= 0 then
                                doRemoveItem(item.uid, 1)
                                doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.")
                                doSetItemAttribute(pb,"addon",addon)
                                doSetItemAttribute(pb,"addonfly",fly)
                                doSetItemAttribute(pb,"addonride",ride)
                                doSetItemAttribute(pb,"addonsurf",surf)
                                return true
                end     
 
return true
end

tag:

 

<action itemid="17132" event="script" value="addon.lua"/>

 

alguém consegue me ajudar nisso? por favor!

2 meses depois...
StigalS
19 de abril de 2018 às 17:12
A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta