YASSE Empath Self Heal (script)

From Elanthipedia
Revision as of 18:49, 19 July 2011 by YAMCER (talk | contribs) (Created page with '{{Script |cat=Empath |fe=YASSE |auth=Yamcer }} This script checks the wounds of an empath using the "per health self" command. The script gets the name of injur…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
YASSE Empath Self Heal (script)
Category Empath
Front-end YASSE
Author Yamcer


This script checks the wounds of an empath using the "per health self" command.

The script gets the name of injured body parts and sends them to a heal wounds (hw) script and/or a heal scars (hs) script to do the actual spell casting.


health:
record until "Roundtime: " with "per heal self"
goto read

read:
read recorded
ifeor goto health
if %l contains "no injuries to speak of" goto end
if %l contains "Wounds to the " goto calculate1
goto read

calculate1:
setvariable temp %l
calculate temp remove [Wounds to the ]
calculate temp remove [:]


bodypart:
setvariable bodypart $temp$
next:
read recorded
if %l contains "Fresh" goto Fresh
if %l contains "Scar" goto Scar
if %l contains "Wounds to the " goto calculate1
goto end

Fresh:
callwith hw $bodypart$
goto next

Scar:
callwith hs $bodypart$
goto read

end:
EXIT

errorhandler:
boxmessage Error #$errornumber$ occurred on the line #$errorline$ : $line$
EXIT