kito2
www.masteria.net
Yesterday I made all the new spells of RL, fro 8.6 to 9.0++ and found something interesting... Im releasing this because my players said that those spells are just sh*t.
So the fact is that you set a storage value individual for this spell, and it will have a "cooldown", and it has a normal exhaustion so people can't make real nice combos:
Really simple, really nice, I loved this system.
Lua:
-- normal part of spell
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill * attack, level / 5
return -(skillTotal * 0.0408 + levelTotal)/2, -(skillTotal * 0.0408 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
-- end normal part of spell
-- nice exhaustion
function onCastSpell(cid, var)
local storage = 3201
local delay = 6 -- 6 means six seconds
if isPlayer(cid) == TRUE then
if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return FALSE
else
exhaustion.set(cid, storage, delay)
return doCombat(cid, combat, var)
end
end
end
So the fact is that you set a storage value individual for this spell, and it will have a "cooldown", and it has a normal exhaustion so people can't make real nice combos:
XML:
<instant name="Annihilation" words="exori gran ico" lvl="110" mana="300" prem="1" needweapon="1" exhaustion="2000" needlearn="0" needtarget="1" event="script" value="attack/annihilation.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Really simple, really nice, I loved this system.