Leonidas
Master
Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1
|
Healing fails
Okay so this is the healing script I have. I love it so far and everything works fine, but what im wanting is healing fails, cure poison fails, the higher the healing level, the less chance to fail.
Also, how would I make it so when the players dex gets higher in increments of 10, they heal a little bit faster?
Quote:[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 before you can heal again!
RETURN 1
ENDIF
IF (<TOPOBJ.UID>!=<SRC.UID>)
SRC.SYSMESSAGEUA 0ac 0 1 1 Bandages must be 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.SYSMESSAGEUA You heal <SRC.TARG.NAME>
ENDIF
ELSE
SRC.SYSMESSAGEUA You're not a good healer enough to resurrect or cure 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
Kinda just getting into scripting so don't dog me too hard
|
|
09-04-2013 06:30 PM |
|
|