[EVENTS e_wraith_form]
ON=@GaveDamage
LOCAL.MANATOLEECH=<EVAL (((<SPIRITSPEAK>/50)*<ARGN1>)/100)>
REF1=<ARGN3> //the one being hit
IF (<REF1.MANA> > 0)
	IF (<EVAL <REF1.MANA>-<LOCAL.MANATOLEECH>> >= 0)
	REF1.MANA -= <LOCAL.MANATOLEECH>
	ELSE
	REF1.MANA=0
	ENDIF
	IF (<EVAL <MANA>+<LOCAL.MANATOLEECH>> > <MAXMANA>)
	MANA=<MAXMANA>
	ELSE
	MANA += <LOCAL.MANATOLEECH>
	ENDIF
ENDIF

ON=@Death
BODY=<OBODY>
EVENTS -e_wraith_form

[Spell 116]
DEFNAME=s_Wraith_Form
NAME=Wraith Form
SOUND=017F
RUNES=
CAST_TIME=2.0
RESOURCES=1 i_reag_nox_crystal,1 i_reag_pig_iron
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=spellflag_playeronly
EFFECT_ID=
EFFECT=
DURATION=0.0
MANAUSE=17
SKILLREQ=SKILL_NECROMANCY 20.0
INTERRUPT=0.0,0.0

ON=@Start
IF (<ISPLAYER>)
SAY @,3,1 Rel Xen Um
ENDIF

ON=@Effect
IF (<BODY> == c_spectre)
BODY=<OBODY>
EVENTS -e_wraith_form
UPDATE
ELIF (<ISHUMAN>)
EVENTS +e_wraith_form
BODY=c_spectre
UPDATE
ENDIF
effect 3,0374A,1,22,0,1108,4

[EOF]