Fala galerinha, bom existe um sistema no DxP que faz as sprites dos pokemons megas se movimentaram paradas, (pra dar efeito do fogo se mexendo numa rapidash por exemplo),
Dei uma analisada nos scripts e encontrei como funciona, porem queria adaptar esse sistema pra pokemons selvagens e summons.
[Exemplo uma rapidash, ela tanto selvagem quando summon ficaria alternando a sprite]
pois nesse sistema só esta funcionando quando você mega evolui um pokemon, assim não possibilitando a adição de pokemons nao megas.
Bom segue as funções que encontrei relacionado a isso:
Alternando Outfit:
function doPantinOutfit(cid, times, megaName) if not isCreature(cid) or not isMega(cid) then return true end if getCreatureOutfit(cid).lookType == 1875 or getCreatureOutfit(cid).lookType == 2 then return true end local name = doCorrectString(getCreatureName(cid)) if not megasConf[megaName] then return true end local outfitIndex = 1 if times <= 500 then outfitIndex = 1 elseif times > 500 and times <= 1000 then outfitIndex = 2 elseif times > 1000 and times <= 1500 then outfitIndex = 3 end doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out[outfitIndex]}, -1) times = times + 50 if times > 1500 then times = 0 end addEvent(doPantinOutfit, 50, cid, times, megaName)end
Quando o pokemon mega evolui existe a seguinte linha ativando a função anterior:
if isInArray({"Charizard", "Blaziken", "Ampharos"}, name) then doPantinOutfit(cid, 0, megaName) else doSetCreatureOutfit(cid, {lookType = megasConf[megaName].out}, -1) checkOutfitMega(cid, megaName) end
Seguindo como está a tabela pokemons/outfits teria que ser mais ou menos assim:
oufitConf = { ["Hypno"] = { out = {27, 28, 29}},}
Bom, alguém tem alguma ideia de como dá pra adaptar esse sistema pro jeito que expliquei ?