Edroniasty
New Member
- Joined
- Oct 2, 2015
- Messages
- 84
- Reaction score
- 1
Hello! Is this possible to add groupcooldown like in newest clients to this spell?:
I try to make this spell 60s cooldown for other spells - can't use exhaust because when I put 60000 ms I must wait 60 s to use other spells..
ps: sry for bad forum section..
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
function onGetFormulaValues(player, skill, attack, factor)
local skill = player:getEffectiveSkillLevel(SKILL_DISTANCE)
local min = (player:getLevel() * 1.87) + (skill * attack * 0) + 0
local max = (player:getLevel() * 2.16) + (skill * attack * 0) + 0
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local function executeAttack(cid, variant, i, j)
local player = Player(cid)
if not player then
return
end
if i >= j then
return
end
addEvent(executeAttack, 200, cid, variant, i + 1, j)
return combat:execute(player, variant)
end
function onCastSpell(creature, variant, isHotkey)
return executeAttack(creature:getId(), variant, 0, 5)
end
I try to make this spell 60s cooldown for other spells - can't use exhaust because when I put 60000 ms I must wait 60 s to use other spells..
ps: sry for bad forum section..
Last edited: