Ola, entao eu queria uma passiva nova, tipo eu pegar um poder exemplo (Mega Punch) e boto como passiva igual a passiva do golduck em area plsss.
PASSIVA POKEMON

Lib/Pokemon moves procura por "Stunning Confusion" e coloca esse em baixo
Citarelseif spell == "Consecutive Punch" then
if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...
return true
end
local function damage(cid)
if isCreature(cid) then
doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), bombWee3, -min, -max, 95)
end
end
setPlayerStorageValue(cid, 32623, 1) --proteçao
for i = 1, 7 do
addEvent(damage, i*500, cid)
end
addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao
Em LIB configuration procura por "passivesChances" e coloca
Citar["Consecutive Punch"] = {
["Hitmonlee"] = 20,
["Shiny Hitmonlee"] = 25,
},
ai em baixo do ultimo move do pokemon você coloca
Citarpassive1 = {name = "Consecutive Punch", level = 1, cd = 0, dist = 6, target = 0, f = 10, t = "fighting"},
Oi entao essa configuracao deu certinho mais so uma coisa ela nao ta dando dano conseguiria arrumar??
AEEE gente conseguir vou dar rep + para todos que me ajudaram mt obrigado
Em 13/01/2019 em 13:00, Thalles Vitor disse:Tente
elseif spell == "Stunning Confusion" then if getPlayerStorageValue(cid, 32623) == 1 then --storage pra n usar a spell 2x seguidas... return true end local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), bombWee3, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --storage for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --storage
Adicione em data/creaturescripts/exp2.0
cole
if passivesChances["Stunning"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Stunning"][getCreatureName(cid)] then docastspell(cid, "Stunning Confusion") end
Tem adaptar isso para um derivado, mas que não seja de pokemons?