
Sitongi
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
Sitongi deu reputação a wougoplex em Problemas com Addon SystemVamos Lá !
Em Data/actions e Actions.xml adiciona isto:
<action itemid="IdAddon;IdAddon" event="script" value="Addon.lua"/>
Em IdAddon Coloca os ids dos items dos addons! ai para adicionar mais ids é só colocar o ";" Ou seja aquele negocio verde, e depois colocar o ID Ficando:IdAddon;IdAddon;IdAddon e por ai vai
Ai Em Data/actions/scripts cria um arquivo lua Chamado "Addon" e Dentro Dele Adiciona Isto:
function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [12593] = {pokemon= "Electabuzz" , looktype = 1482}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon [12925] = {pokemon= "Alakazam" , looktype = 1471}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon } 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
Para adicionar um Novo Addon é só Adicionar esta tag:
[ItemID] = {pokemon= "NomeDoPoke" , looktype = IdDaOutfit},
EM ItemID, troca pelo id do addon
em pokemon troca NomeDoPoke, pelo Nome Do Pokémon que vai ser adicionado o Addon
Em looktype, troca IdDaOutfit, pelo looktype do pokémon com addon!
Em Goback.lua
Procure Por: (fica lá no final)
else doPlayerSendCancel(cid, "This pokemon is fainted.") end
E Adiciona Em cima do else Isto:
local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end
Em Catch system.lua Procura Por:
doItemSetAttribute(item, "description", description) Em baixo adicione isto:
doItemSetAttribute(item, "addon", 0)
Em Some Functions.lua Procure Por:
unLock(item.uid) Da Enter Duas Vezes e Adiciona isto:
local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end Credito samlecter