• 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!

Mod Spell Problem..

WiLDTuRTLE

Member
Joined
Feb 26, 2011
Messages
478
Reaction score
5
So yeah, this spell reflect damage, but, it heals the caster the amount lost (i want to remove that).
And i want to know where i change the duration/if we can add a buff sign (like utito tempo, the green sign):p

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reflection" version="1.0" author="otland" contact="otland.net" enabled="yes">
	<instant name="Reflection" words="exori reflect" lvl="50" mana="140" prem="1" aggressive="0" selftarget="1" exhaustion="7000" needlearn="0" event="script">
		<vocation id="4"/>
		<vocation id="8"/>
		<![CDATA[
			function onCastSpell(cid, var)
				registerCreatureEvent(cid, "Reflection/statschange001")
				doCreatureSetStorage(cid, 2000, os.time() + 5)
				doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE)
				return true
			end
 
		]]>
	</instant>
 
	<event type="statschange" name="Reflection/statschange001" event="script"><![CDATA[
		function onStatsChange(cid, attacker, type, combat, value)
			if (getCreatureStorage(cid, 2000) > os.time() and type == STATSCHANGE_HEALTHLOSS) then
				local absorb = math.ceil(value * 0.2)
				doSendMagicEffect(getThingPosition(attacker), CONST_ME_HOLYDAMAGE)
 				doCreatureSay(cid, "absorb", TALKTYPE_ORANGE_1)
				doCreatureAddHealth(attacker, -absorb)
				doCreatureAddHealth(cid, absorb)
			end
			return true
		end
	]]></event>
</mod>
 
This is the healing.
XML:
doCreatureAddHealth(cid, absorb)
If you are not sure about such things, try to read the script, the name of the function already explains what it is doing.

This is the time in seconds (the 5).
XML:
doCreatureSetStorage(cid, 2000, os.time() + 5)

About the buff, you can add a condition to the spell with CONDITION_ATTRIBUTES and CONDITION_PARAM_BUFF like in the utito tempo spell blood rage.
 
Last edited:
This is the healing.
XML:
doCreatureAddHealth(cid, absorb)
If you are not sure about such things, try to read the script, the name of the function already explains what it is doing.

This is the time in seconds (the 5).
XML:
doCreatureSetStorage(cid, 2000, os.time() + 5)

About the buff, you can add a condition to the spell with CONDITION_ATTRIBUTES and CONDITION_PARAM_BUFF like in the utito tempo spell blood rage.
siiiiick , im having a problem now though, mage get hp damage even if on utamo :/// how could i change that
 
Back
Top