The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Healing fails
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #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 Tongue
09-04-2013 06:30 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Healing fails - Leonidas - 09-04-2013 06:30 PM
RE: Healing fails - Shidhun - 09-06-2013, 02:24 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)