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

Need Spell!

dualshock3

New Member
Joined
May 14, 2010
Messages
89
Reaction score
3
pls i need help with a spell,
i need a spell that attacks the target and heal the caster
pls anybody help me
:):)
 
PIC:



Here, .../data/spells/scripts:

Code:
 local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, DEATHTARGET)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.6, -0, -1.7, -0)

local area1 = {
       {0, 0, 0, 0, 0},
       {0, 0, 0, 0, 0},
       {0, 0, 3, 0, 0},
       {0, 0, 0, 0, 0},
       {0, 0, 0, 0, 0},
}
   
setCombatArea(combat1, createCombatArea(area1))

local parameters = { cid = cid, var = var, combat1 = combat1}

function onCastSpell(cid, var)
config = {
	formula = (getCreatureMaxHealth(cid) / 100) * 10, -- Change the 10 in any percent you want to heal it --
}
doCreatureAddHealth(cid, config.formula)
	addEvent(doCombat, 0, cid, combat1, var)
end

.../data/spells/spells.xml:

Code:
 	<instant name="Healing Attack" words="xxxx" lvl="xxxx" mana="xxxx" needtarget="1" event="script" value="attack/xxxx.lua">
		<vocation id="3"/>
                <vocation id="7"/>
	</instant>

REP ME IF I HELPED :D
 
Back
Top