Lyky
Well-Known Member
- Joined
- May 27, 2014
- Messages
- 291
- Solutions
- 8
- Reaction score
- 89
Hello,
I would like to make the Haste added on top of other active haste.
When player has utani hur active, and casts this spell it would add haste on top of it.
Let me know if this is possible, and if then how.
Regards,
I would like to make the Haste added on top of other active haste.
When player has utani hur active, and casts this spell it would add haste on top of it.
Let me know if this is possible, and if then how.
Regards,
Lua:
local base = 120
local variation = 40
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
local condition = Condition(CONDITION_HASTE)
condition:setParameter(CONDITION_PARAM_TICKS, 3000)
condition:setFormula(0.3, -35, 0.3, -35)
combat:setCondition(condition)
function onGetFormulaValues(cid, level, maglevel)
local min = math.max((base - variation), ((3 * maglevel + 2 * level) * (base - variation) / 100))
local max = math.max((base + variation), ((3 * maglevel + 2 * level) * (base + variation) / 100))
return min, max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
return combat:execute(creature, var)
end