Não testei, mas tenta assim ![]()
function onUse(cid, item, fromPosition, itemEx, toPosition)local addons = {[xxxx] = {pokemon= "Teste" , looktype = xxxx},}local cor = {5,10,15,20}local sto = {storage = 09212,effect = 20,}local numero = addons[item.itemid].looktypelocal pb = getPlayerSlotItem(cid, 8).uidlocal pk = addons[item.itemid].pokemonif getItemAttribute(pb,"poke") ~= pk thendoPlayerSendCancel(cid, "Desculpe, Voce nao pode usar esta Addon neste Pokemon.")return falseendif getItemAttribute(pb,"addon") < 1 thendoRemoveItem(item.uid, 1)doPlayerSendTextMessage(cid, 27, "Parabens! Voce tem um Pokemon com Addon.")doSetItemAttribute(pb,"addon",numero)setPlayerStorageValue(cid, sto.storage, getCreatureOutfit(cid).lookType)doCreatureChangeOutfit(cid, {lookType = getPlayerStorageValue(cid, sto.storage), lookBody = cor[1], lookHead = cor[2], lookLegs = cor[3], lookFeet = cor[4]})doSendMagicEffect(getThingPos(getCreatureSummons(cid)), sto.effect) -- põe o effectreturn trueendreturn trueend






info
Grupo: Conde
Registrado: 15/06/15
Posts: 729
Reputação: +200
Salve.
Alguém poderia adaptar esse script para min?
Eu quero o seguinte nele,que ele evolua normalmente igual os outros pokémons,pois este script,você tem que da go/back e usar o item na pokeball do pokemon para evoluir e eu gostaria que pudesse somente evolui ele quando ele tiver fora da pokeball,e usa o item em cima do pokémon solto,Tambem gostaria que botasse um effect para configurar ao pokemon evoluir,obg.
Script:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local addons = {
[xxxx] = {pokemon= "Teste" , looktype = xxxx},
}
if #getCreatureSummons(cid) > 0 then
doPlayerSendCancel(cid, "Para usar o Addon,volte seu pokemon e use em sua pokeball.")
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, "Desculpe, Voce nao pode usar esta Addon neste Pokemon.")
return false
end
if getItemAttribute(pb,"addon") < 1 then
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 27, "Parabens! Voce tem um Pokemon com Addon.")
doSetItemAttribute(pb,"addon",numero)
return true
end
return true
end
Editado Setembro 30 por kaleudd