[ITEMDEF 0e21]
DEFNAME=i_bandage
TYPE=t_eq_script
WEIGHT=0.1
DUPELIST=0ee9
VALUE=7
CATEGORY=Items by Professions
SUBSECTION=Healer
DESCRIPTION=Clean Bandages
ON=@DClick
IF (<SRC.FINDID.i_heal_timer>)
src.sysmessage You must wait <SRC.FINDID.I_HEAL_TIMER.TIMER> before you can heal again!
RETURN 1
ENDIF
IF (<TOPOBJ.UID>!=<SRC.UID>)
SRC.SYSMESSAGE You do not have any bandages on you!
ELSE
TARGET Who do you want to heal?
ENDIF
RETURN 1
ON=@TARGON_CHAR
VAR.HEAL <EVAL <SRC.HEALING>/50>
VAR.ANAT <EVAL <SRC.ANATOMY>/100>
VAR.SUA_COLOR=03
IF !(<SRC.TARG.HITS><<SRC.TARG.STR>) && !(<SRC.TARG.FLAGS>&statf_poisoned) && !(<SRC.TARG.FLAGS>&statf_dead)
RETURN 1
ELSEIF (<SRC.TARG.FLAGS>&statf_poisoned) && (<SRC.HEALING>>30.0)
SRC.TARG.EFFECT 3,i_fx_heal_effect,6,15,1
SRC.SOUND=SND_SPELL_CUre
SRC.TARG.SPELLEFFECT s_cure,1000
SRC.CONSUME i_bandage
SRC.CONSUME i_bandage_bloody
SRC.SYSMESSAGEUA You heal <SRC.TARG.NAME>'s poison.
ELSEIF (<SRC.TARG.FLAGS>&statf_dead) && (<SRC.HEALING>>99.9)
SRC.TARG.RESURRECT
SRC.EMOTE ressurect <SRC.TARG.NAME>
ELSEIF !(<SRC.TARG.FLAGS>&statf_poisoned) && !(<SRC.TARG.FLAGS>&statf_dead) && (<SRC.TARG.HITS><<SRC.TARG.STR>)
IF (<EVAL <SRC.TARG.HITS>+<VAR.HEAL>+<VAR.ANAT>>><SRC.TARG.STR>)
SRC.TARG.HITS=<SRC.TARG.STR>
ELSE
SRC.TARG.HITS=<SRC.TARG.HITS>+<VAR.HEAL>+<VAR.ANAT>
SRC.SYSMESSAGE You heal <SRC.TARG.NAME>
ENDIF
ELSE
SRC.SYSMESSAGE You're not a good enough healer to cure or resurrect someone
RETURN 1
ENDIF
SRC.CONSUME i_bandage
SRC.NEWITEM i_bandage_bloody
SRC.ACT.CONT=<SRC.UID>
SRC.NEWITEM i_heal_timer
SRC.ACT.TIMER 6
SRC.ACT.CONT <SRC.UID>
//IF (<SRC.HEALING><100.0) && (RAND(25)==1)
//SRC.HEALING=<SRC.HEALING>+1
//ELSEIF (<SRC.HEALING>>99.9) && (<SRC.HEALING><200.0) && (RAND(50)==1)
//SRC.HEALING=<SRC.HEALING>+1
//ELSEIF (<SRC.HEALING>>199.9) && (<SRC.HEALING><300.0) && (RAND(75)==1)
//SRC.HEALING=<SRC.HEALING>+1
//ELSEIF (<SRC.HEALING>>299.9) && (<SRC.HEALING><400.0) && (RAND(100)==1)
//SRC.HEALING=<SRC.HEALING>+1
//ELSEIF (<SRC.HEALING>>399.9) && (<SRC.HEALING><500.0) && (RAND(150)==1)
//SRC.HEALING=<SRC.HEALING>+1
//ENDIF
RETURN 1
[ITEMDEF i_heal_timer]
ID=i_worldgem_bit
NAME=Healing Timer
LAYER=layer_special
TYPE=t_eq_script
ON=@CREATE
ATTR=0c
TIMER=6
ON=@TIMER
REMOVE
RETURN 1
////////////////////////
//Bandage Self Function
//By Majesty
////////////////////////
[function bandageself]
if (<hits> = <str> )||(<hits> > <str> )
sysmessage=You are already fully healed.
return 1
endif
IF (<SRC.FINDID.i_heal_timer>)
src.sysmessage You must wait <act.timer> seconds before you can heal again!
RETURN 1
ENDIF
IF (<TOPOBJ.UID>!=<SRC.UID>)
SRC.SYSMESSAGEUA 0ac 0 1 1 Bandages must be on you.
endif
if (<findid.i_bandage>)
var.lasttarget=<targ.uid>
targ=<uid>
findid.i_bandage.trigger=@targon_char
targ=<var.lasttarget>
var.lasttarget=
f_clear_sysmessage
return 1
else
sysmessage=You don't have any more Bandages.
return 0
endif
[function f_clear_sysmessage]
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=
sysmessage=