• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Individual exhausted for one spell... Like 9.0+ but for 8.6-

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,766
Solutions
1
Reaction score
225
Location
Chile, Santiago
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.

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.
 
nice spell.. :D but can you make ein nice spell for paladin..(8.60) pleasee
 
If you want to have differente cooldowns, yes, if you want the same, add the same storage value.
 
Back
Top