jakub742
Active Member
Hi, do you know how to add cooldown on spell so it would work for monsters aswell ?
i have a monster revscript, example attacks:
It has 2000 interval and 60 chance but when its casted i expected to be in cooldown that is set on spell:cooldown
But the cooldown is ignored in this case with monster. Monster can spam it more often than spell:cooldown(9000)
Spell script:
Any other workaround that i could use for that ?
i have a monster revscript, example attacks:
LUA:
monster.attacks = {
{name ="melee", interval = 1500, chance = 80, minDamage = -2100, maxDamage = -3000},
{name ="firestorm", cooldown = 9000, interval = 2000, chance = 60, minDamage = -2830, maxDamage = -5720},
}
It has 2000 interval and 60 chance but when its casted i expected to be in cooldown that is set on spell:cooldown
But the cooldown is ignored in this case with monster. Monster can spam it more often than spell:cooldown(9000)
Spell script:
LUA:
local spell = Spell(SPELL_INSTANT)
spell:name("firestorm")
spell:cooldown(9000)
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
spell:register()
Any other workaround that i could use for that ?