Difference between revisions of "Affects.tf"

From AvatarWiki
Jump to navigation Jump to search
 
m (small fix for /aff and got_sanc)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Bug reports, suggestions and/or diffs are appreciated, '''sulfar''' _AT_ ''inbox'' +DOT+ ''com''
+
Provides
 +
* custom colors of affects list
 +
* /aff <spell> shows affects list just for <spell>
 +
* /sick shows how sick you are
 +
* /chkaff shows which spells you are *not* affected by
 +
* Sanctuary ticker on the satus line
 +
* Spellup ticker on the status line
  
 +
The tickers grab the duration of sanctuary and holy aura from the affects list, colors them and puts them in a status variable.  It then uses [[tick.tf]] to make the tickers count down on the tick.  That also means that if the tick counter isn't running yet it won't count down ;)
 +
 +
This script uses [[prompt.tf]] and [[tick.tf]] so you'll need those too.  Also, you should have TINYPREFIX set in your config file, pointing at the directory with tf scripts like
 +
<pre>/set TINYPREFIX=~/tinyfugue/</pre>
  
 
<pre>
 
<pre>
 +
;Bug reports, suggestions and/or diffs are appreciated, '''sulfar''' _AT_ ''inbox'' +DOT+ ''com''
  
/require lisp.tf
+
/require -q lisp.tf
  
/echo %% /aff <spell>      Shows affects list for <spell>
+
/eval /require -q %{TINYPREFIX}prompt.tf
/echo %% /sick              Shows how sick you are
+
/eval /require -q %{TINYPREFIX}tick.tf
/echo %% /chkaff            Shows which spells you are *not* affected by
 
   
 
;Make the affects list green
 
/def -i -p999 -F -PCgreen -mregexp -t"^Spell: '.*" green_affects
 
  
 +
/echo -aCyellow %% /aff <spell>          Shows affects list for <spell>
 +
/echo -aCyellow %% /sick                Shows how sick you are
 +
/echo -aCyellow %% /chkaff              Shows which spells you are *not* affected by
 +
 +
;I set my status line in a single command in my config file, this is what it
 +
;  looks like with the right variables for this script:
 +
;/status_add -c @more:8:Br @world:9 :1 status_sanctuary:3 :1 status_spellup:3 :1 status_position insert:2 :1 @clock:16
 +
 +
 +
;Custom color the affects list..
 +
;Paint all of the affects list green
 +
/def -i -p999 -F -PCgreen -mregexp -t"^Spell: '.*" affects_green
 +
 +
;yellow for some spells i might want to check more than others
 +
/def -i -p998 -F -PCyellow -mregexp -t"^Spell: '(steel|iron|bark|pass|fly|water|heigh|conc).*" affects_yellow
 +
 +
;white for spells i most probably want to find quickly
 +
/def -i -p998 -F -PCwhite -mregexp -t"^Spell: '(sanc|regen|scramble|hand).*" affects_white
  
 
;You can "/aff sanc" and it'll only show the sanctuary line
 
;You can "/aff sanc" and it'll only show the sanctuary line
;or stack, "/aff sanc|fren" and it'll show both sanctuary and frenzy
+
;or use a regexp, "/aff sanc|fren"
 
/def -i aff = \
 
/def -i aff = \
    /def -i -t"You are affected by:" _aff_affected = \
+
        /def -t"You are affected by:" _aff_affected = \
        /def -p900 -PCgreen -mregexp -t"^Spell: '%{1}.*" _aff_spell%%;\
+
                /def -p900 -mregexp -t"^Spell: '%{*}.*" _aff_spell%%;\
        /def -p899 -ag -mregexp -t"^Spell: '" _aff_gag_other_affects%%;\
+
                /def -p899 -ag -mregexp -t"^Spell: '" _aff_gag_other_affects%%;\
        /repeat -0:00:0.3 1 \
+
                /repeat -0.3 1 /undef _aff_affected _aff_spell _aff_gag_other_affects%;\
            /undef _aff_affected%%%;\
+
        affects
            /undef _aff_spell%%%;\
+
 
            /undef _aff_gag_other_affects%;\
+
;Just a /sick macro.
    affects
 
   
 
   
 
 
/def -i sick = \
 
/def -i sick = \
    /set sick_poison 0%;\
+
        /set sick_poison 0%;\
    /set sick_disease 0%;\
+
        /set sick_disease 0%;\
    /def -t"You are affected by:" _sick_affected = \
+
        /def -t"You are affected by:" _sick_affected = \
        /def -p900 -PCgreen -mregexp -t"^Spell: 'poison.*" _sick_poison = /test $$$[++sick_poison] %%;\
+
                /def -p900 -mregexp -t"^Spell: '(poison|toxin|biotoxin|venom)'.*" _sick_poison = /test $$$[++sick_poison] %%;\
        /def -p900 -PCgreen -mregexp -t"^Spell: 'toxin.*" _sick_toxin = /test $$$[++sick_poison]%%;\
+
                /def -p900 -mregexp -t"^Spell: '(virus|plague)'.*" _sick_disease = /test $$$[++sick_disease]%%;\
        /def -p900 -PCgreen -mregexp -t"^Spell: 'biotoxin.*" _sick_biotoxin = /test $$$[++sick_poison]%%;\
+
                /def -p899 -ag -mregexp -t"^Spell: '" _sick_gag_other_affects%%;\
        /def -p900 -PCgreen -mregexp -t"^Spell: 'venom.*" _sick_venom = /test $$$[++sick_poison]%%;\
+
                /repeat -0.3 1 \
        /def -p900 -PCgreen -mregexp -t"^Spell: 'virus.*" _sick_virus = /test $$$[++sick_disease]%%;\
+
                        /undef _sick_affected _sick_poison _sick_disease _sick_gag_other_affects%%%;\
        /def -p900 -PCgreen -mregexp -t"^Spell: 'plague.*" _sick_plague = /test $$$[++sick_disease]%%;\
+
                gtell %%%%% I am affected by: %%%sick_poison poisons and %%%sick_disease diseases%;\
        /def -p899 -ag -mregexp -t"^Spell: '" _sick_gag_other_affects%%;\
+
        affects
        /repeat -0:00:0.3 1 \
 
            /undef _sick_affected%%%;\
 
            /undef _sick_poison%%%;\
 
            /undef _sick_toxin%%%;\
 
            /undef _sick_biotoxin%%%;\
 
            /undef _sick_venom%%%;\
 
            /undef _sick_virus%%%;\
 
            /undef _sick_plague%%%;\
 
            /undef _sick_gag_other_affects%%%;\
 
            gtell %%%%% I am affected by: %%%sick_poison poisons and %%%sick_disease diseases%;\
 
    affects
 
  
;/chkaff will show you the spells from the chkaff_list below by which
+
;/chkaff will show you the spells from the chkaff_list by which
 
;you're *not* affected.
 
;you're *not* affected.
 
/def -i chkaff = \
 
/def -i chkaff = \
    /reset_chkaff_list%;\
+
        /set chkaff_list= |BR| sanctuary |R| awen foci fortitudes \
    /def -t"You are affected by:" _chkaff_affected = \
+
                invincibility barkskin steel_skeleton iron_skin |W| protection_evil bless holy_aura \
         /def_chkaff_triggers%%;\
+
                holy_armor armor water_breathing energy_shield displacement body_brace \
         /repeat -0:00:0.3 1 \
+
                mental_barrier calcify_flesh biofeedback anticipate adrenaline_pump concentrate \
            /undef_chkaff_triggers%%%;\
+
                pass_door fly shield stone_skin giant_strength |G| frenzy |B| heighten_senses%;\
            gtell %%%%% I am *not* affected by %%%chkaff_list%;\
+
        /set chkaff 1%;\
    affects
+
        affects
 +
 
 +
/def -i -E(chkaff) -p100 -F -t"You are affected by:" chkaff_affected = \
 +
        /set prompt_exe chkaff
 +
 
 +
/def -i -E(chkaff) -p100 -F -mregexp -t"^Spell: '(.+)' .+" chkaff_spell = \
 +
         /let affect=$[replace(" ", "_", {P1})]%;\
 +
         /set chkaff_list=$(/remove %affect %chkaff_list)
 +
 
 +
/def -i -E(chkaff) -p991 -mglob -h'send PROMPT_EXE chkaff' chkaff_PROMPT_EXE = \
 +
        /set prompt_exe=%;\
 +
        /set chkaff 0%;\
 +
        gtell %%% I am *not* affected by %chkaff_list
 +
 
 +
;Sanc and spellup tickers on the status line
 +
/def -i -p999 -F -t"You are affected by:" tickers_init = \
 +
        /set sanctuary_duration=%;\
 +
        /set spellup_duration=%;\
 +
        /sanctuary_status%;\
 +
        /spellup_status
 +
 
 +
/tickers_init
 +
 
 +
/def -i -p999 -F -mregexp -t"^Spell: 'sanctuary'  for ([0-9]+) hours.$" aff_sanc = \
 +
        /test sanctuary_duration:=strip_attr({P1})%;\
 +
        /sanctuary_status
 +
 
 +
/def -i -p999 -F -t"The protective aura fades from around your body." sanctuary_fades = \
 +
        /set sanctuary_duration=
 +
 
 +
/def -i -p991 -F -mglob -h'send TICK_EXE' sanctuary_tick = \
 +
        /if (sanctuary_duration > 0) /test --sanctuary_duration%;\
 +
        /else /set sanctuary_duration=%;\
 +
        /endif%;\
 +
        /sanctuary_status
 +
 
 +
/def -i sanctuary_status = \
 +
        /set status_sanctuary \$%{sanctuary_duration}%;\
 +
        /if (sanctuary_duration =~ "") \
 +
                /set status_attr_var_status_sanctuary=%;\
 +
        /elseif (sanctuary_duration == 0) \
 +
                /set status_attr_var_status_sanctuary BCred%;\
 +
        /elseif (sanctuary_duration <= 2) \
 +
                /set status_attr_var_status_sanctuary Cred%;\
 +
        /elseif (sanctuary_duration <= 5) \
 +
                /set status_attr_var_status_sanctuary Cyellow%;\
 +
        /else \
 +
                /set status_attr_var_status_sanctuary=%;\
 +
        /endif
 +
 
 +
/def -i -t"You are surrounded by a white aura." got_sanc = /aff sanc|holy aura
  
/def -i reset_chkaff_list = /set chkaff_list= |BR| sanctuary |R| awen foci fortitudes \
+
;Do the same for holy aura to have a spellup ticker
    invincibility barkskin steel_skeleton iron_skin |W| protection_evil bless holy_aura \
+
/def -i -p999 -F -mregexp -t"^Spell: 'holy aura'  modifies armor class by -[0-9]+ for ([0-9]+) hours.$" aff_spellup = \
    holy_armor armor water_breathing energy_shield displacement body_brace \
+
        /test spellup_duration:=strip_attr({P1})%;\
    mental_barrier calcify_flesh biofeedback anticipate adrenaline_pump concentrate \
+
        /spellup_status
    pass_door fly shield stone_skin giant_strength |G| frenzy |B| infravision \
 
    heighten_senses
 
  
/def -i def_chkaff_triggers = \
+
/def -i -p999 -F -t"Your Aura of Holiness fades..." spellup_fades = \
    /def -p900 -t"Spell: 'awen'*" _chkaff_awen = /set chkaff_list=$$(/remove awen %%chkaff_list)%;\
+
        /set spellup_duration=
    /def -p900 -t"Spell: 'sanctuary'*" _chkaff_sanctuary = /set chkaff_list=$$(/remove sanctuary %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'protection evil'*" _chkaff_prot_evil = /set chkaff_list=$$(/remove protection_evil %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'bless'*" _chkaff_bless = /set chkaff_list=$$(/remove bless %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'holy aura'*" _chkaff_holy_aura = /set chkaff_list=$$(/remove holy_aura %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'holy armor'*" _chkaff_holy_armor = /set chkaff_list=$$(/remove holy_armor %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'armor'*" _chkaff_armor = /set chkaff_list=$$(/remove armor %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'water breathing'*" _chkaff_water_breathing = /set chkaff_list=$$(/remove water_breathing %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'invincibility'*" _chkaff_invincibility = /set chkaff_list=$$(/remove invincibility %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'fortitudes'*" _chkaff_fortitudes = /set chkaff_list=$$(/remove fortitudes %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'energy shield'*" _chkaff_energy_shield = /set chkaff_list=$$(/remove energy_shield %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'displacement'*" _chkaff_displacement = /set chkaff_list=$$(/remove displacement %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'body brace'*" _chkaff_body_brace = /set chkaff_list=$$(/remove body_brace %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'mental barrier'*" _chkaff_mental_barrier = /set chkaff_list=$$(/remove mental_barrier %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'calcify flesh'*" _chkaff_calcify_flesh = /set chkaff_list=$$(/remove calcify_flesh %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'biofeedback'*" _chkaff_biofeedback = /set chkaff_list=$$(/remove biofeedback %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'anticipate'*" _chkaff_anticipate = /set chkaff_list=$$(/remove anticipate %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'adrenaline pump'*" _chkaff_adrenaline_pump = /set chkaff_list=$$(/remove adrenaline_pump %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'concentrate'*" _chkaff_concentrate = /set chkaff_list=$$(/remove concentrate %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'foci'*" _chkaff_foci = /set chkaff_list=$$(/remove foci %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'pass door'*" _chkaff_pass_door = /set chkaff_list=$$(/remove pass_door %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'fly'*" _chkaff_fly = /set chkaff_list=$$(/remove fly %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'shield'*" _chkaff_shield = /set chkaff_list=$$(/remove shield %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'stone skin'*" _chkaff_stone_skin = /set chkaff_list=$$(/remove stone_skin %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'giant strength'*" _chkaff_giant_strength = /set chkaff_list=$$(/remove giant_strength %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'iron skin'*" _chkaff_iron_skin = /set chkaff_list=$$(/remove iron_skin %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'steel skeleton'*" _chkaff_steel_skeleton = /set chkaff_list=$$(/remove steel_skeleton %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'barkskin'*" _chkaff_barkskin = /set chkaff_list=$$(/remove barkskin %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'frenzy'*" _chkaff_frenzy = /set chkaff_list=$$(/remove frenzy %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'heighten senses'*" _chkaff_heighten_senses = /set chkaff_list=$$(/remove heighten_senses %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'infravision'*" _chkaff_infravision = /set chkaff_list=$$(/remove infravision %%chkaff_list)%;\
 
    /def -p900 -t"Spell: 'iron monk'*" _chkaff_iron_monk = /set chkaff_list=$$(/remove sanctuary %%chkaff_list)
 
  
/def -i undef_chkaff_triggers = \
+
/def -i -p991 -F -mglob -h'send TICK_EXE' spellup_tick = \
    /undef _chkaff_affected%;\
+
        /if (spellup_duration > 0) /test --spellup_duration%;\
    /undef _chkaff_awen%;\
+
        /else /set spellup_duration=%;\
    /undef _chkaff_sanctuary%;\
+
        /endif%;\
    /undef _chkaff_prot_evil%;\
+
        /spellup_status
    /undef _chkaff_bless%;\
 
    /undef _chkaff_holy_aura%;\
 
    /undef _chkaff_holy_armor%;\
 
    /undef _chkaff_armor%;\
 
    /undef _chkaff_water_breathing%;\
 
    /undef _chkaff_invincibility%;\
 
    /undef _chkaff_fortitudes%;\
 
    /undef _chkaff_energy_shield%;\
 
    /undef _chkaff_displacement%;\
 
    /undef _chkaff_body_brace%;\
 
    /undef _chkaff_mental_barrier%;\
 
    /undef _chkaff_calcify_flesh%;\
 
    /undef _chkaff_biofeedback%;\
 
    /undef _chkaff_anticipate%;\
 
    /undef _chkaff_adrenaline_pump%;\
 
    /undef _chkaff_concentrate%;\
 
    /undef _chkaff_foci%;\
 
    /undef _chkaff_pass_door%;\
 
    /undef _chkaff_fly%;\
 
    /undef _chkaff_shield%;\
 
    /undef _chkaff_stone_skin%;\
 
    /undef _chkaff_giant_strength%;\
 
    /undef _chkaff_iron_skin%;\
 
    /undef _chkaff_steel_skeleton%;\
 
    /undef _chkaff_barkskin%;\
 
    /undef _chkaff_frenzy%;\
 
    /undef _chkaff_heighten_senses%;\
 
    /undef _chkaff_infravision%;\
 
    /undef _chkaff_iron_monk
 
  
 +
/def -i spellup_status = \
 +
        /set status_spellup s%{spellup_duration}%;\
 +
        /if (spellup_duration =~ "") \
 +
                /set status_attr_var_status_spellup=%;\
 +
        /elseif (spellup_duration == 0) \
 +
                /set status_attr_var_status_spellup BCred%;\
 +
        /elseif (spellup_duration <= 1) \
 +
                /set status_attr_var_status_spellup Cred%;\
 +
        /elseif (spellup_duration <= 3) \
 +
                /set status_attr_var_status_spellup Cyellow%;\
 +
        /else \
 +
                /set status_attr_var_status_spellup=%;\
 +
        /endif
 
</pre>
 
</pre>
  
  
 
[[Category: TinyFugue Scripting]]
 
[[Category: TinyFugue Scripting]]

Latest revision as of 20:44, 16 November 2008

Provides

  • custom colors of affects list
  • /aff <spell> shows affects list just for <spell>
  • /sick shows how sick you are
  • /chkaff shows which spells you are *not* affected by
  • Sanctuary ticker on the satus line
  • Spellup ticker on the status line

The tickers grab the duration of sanctuary and holy aura from the affects list, colors them and puts them in a status variable. It then uses tick.tf to make the tickers count down on the tick. That also means that if the tick counter isn't running yet it won't count down ;)

This script uses prompt.tf and tick.tf so you'll need those too. Also, you should have TINYPREFIX set in your config file, pointing at the directory with tf scripts like

/set TINYPREFIX=~/tinyfugue/
;Bug reports, suggestions and/or diffs are appreciated, '''sulfar''' _AT_ ''inbox'' +DOT+ ''com''

/require -q lisp.tf

/eval /require -q %{TINYPREFIX}prompt.tf
/eval /require -q %{TINYPREFIX}tick.tf

/echo -aCyellow %% /aff <spell>          Shows affects list for <spell>
/echo -aCyellow %% /sick                 Shows how sick you are
/echo -aCyellow %% /chkaff               Shows which spells you are *not* affected by

;I set my status line in a single command in my config file, this is what it
;  looks like with the right variables for this script:
;/status_add -c @more:8:Br @world:9 :1 status_sanctuary:3 :1 status_spellup:3 :1 status_position insert:2 :1 @clock:16


;Custom color the affects list..
;Paint all of the affects list green
/def -i -p999 -F -PCgreen -mregexp -t"^Spell: '.*" affects_green

;yellow for some spells i might want to check more than others
/def -i -p998 -F -PCyellow -mregexp -t"^Spell: '(steel|iron|bark|pass|fly|water|heigh|conc).*" affects_yellow

;white for spells i most probably want to find quickly
/def -i -p998 -F -PCwhite -mregexp -t"^Spell: '(sanc|regen|scramble|hand).*" affects_white

;You can "/aff sanc" and it'll only show the sanctuary line
;or use a regexp, "/aff sanc|fren"
/def -i aff = \
        /def -t"You are affected by:" _aff_affected = \
                /def -p900 -mregexp -t"^Spell: '%{*}.*" _aff_spell%%;\
                /def -p899 -ag -mregexp -t"^Spell: '" _aff_gag_other_affects%%;\
                /repeat -0.3 1 /undef _aff_affected _aff_spell _aff_gag_other_affects%;\
        affects

;Just a /sick macro.
/def -i sick = \
        /set sick_poison 0%;\
        /set sick_disease 0%;\
        /def -t"You are affected by:" _sick_affected = \
                /def -p900 -mregexp -t"^Spell: '(poison|toxin|biotoxin|venom)'.*" _sick_poison = /test $$$[++sick_poison] %%;\
                /def -p900 -mregexp -t"^Spell: '(virus|plague)'.*" _sick_disease = /test $$$[++sick_disease]%%;\
                /def -p899 -ag -mregexp -t"^Spell: '" _sick_gag_other_affects%%;\
                /repeat -0.3 1 \
                        /undef _sick_affected _sick_poison _sick_disease _sick_gag_other_affects%%%;\
                gtell %%%%% I am affected by: %%%sick_poison poisons and %%%sick_disease diseases%;\
        affects

;/chkaff will show you the spells from the chkaff_list by which
;you're *not* affected.
/def -i chkaff = \
        /set chkaff_list= |BR| sanctuary |R| awen foci fortitudes \
                invincibility barkskin steel_skeleton iron_skin |W| protection_evil bless holy_aura \
                holy_armor armor water_breathing energy_shield displacement body_brace \
                mental_barrier calcify_flesh biofeedback anticipate adrenaline_pump concentrate \
                pass_door fly shield stone_skin giant_strength |G| frenzy |B| heighten_senses%;\
        /set chkaff 1%;\
        affects

/def -i -E(chkaff) -p100 -F -t"You are affected by:" chkaff_affected = \
        /set prompt_exe chkaff

/def -i -E(chkaff) -p100 -F -mregexp -t"^Spell: '(.+)' .+" chkaff_spell = \
        /let affect=$[replace(" ", "_", {P1})]%;\
        /set chkaff_list=$(/remove %affect %chkaff_list)

/def -i -E(chkaff) -p991 -mglob -h'send PROMPT_EXE chkaff' chkaff_PROMPT_EXE = \
        /set prompt_exe=%;\
        /set chkaff 0%;\
        gtell %%% I am *not* affected by %chkaff_list

;Sanc and spellup tickers on the status line
/def -i -p999 -F -t"You are affected by:" tickers_init = \
        /set sanctuary_duration=%;\
        /set spellup_duration=%;\
        /sanctuary_status%;\
        /spellup_status

/tickers_init

/def -i -p999 -F -mregexp -t"^Spell: 'sanctuary'  for ([0-9]+) hours.$" aff_sanc = \
        /test sanctuary_duration:=strip_attr({P1})%;\
        /sanctuary_status

/def -i -p999 -F -t"The protective aura fades from around your body." sanctuary_fades = \
        /set sanctuary_duration=

/def -i -p991 -F -mglob -h'send TICK_EXE' sanctuary_tick = \
        /if (sanctuary_duration > 0) /test --sanctuary_duration%;\
        /else /set sanctuary_duration=%;\
        /endif%;\
        /sanctuary_status

/def -i sanctuary_status = \
        /set status_sanctuary \$%{sanctuary_duration}%;\
        /if (sanctuary_duration =~ "") \
                /set status_attr_var_status_sanctuary=%;\
        /elseif (sanctuary_duration == 0) \
                /set status_attr_var_status_sanctuary BCred%;\
        /elseif (sanctuary_duration <= 2) \
                /set status_attr_var_status_sanctuary Cred%;\
        /elseif (sanctuary_duration <= 5) \
                /set status_attr_var_status_sanctuary Cyellow%;\
        /else \
                /set status_attr_var_status_sanctuary=%;\
        /endif

/def -i -t"You are surrounded by a white aura." got_sanc = /aff sanc|holy aura

;Do the same for holy aura to have a spellup ticker
/def -i -p999 -F -mregexp -t"^Spell: 'holy aura'  modifies armor class by -[0-9]+ for ([0-9]+) hours.$" aff_spellup = \
        /test spellup_duration:=strip_attr({P1})%;\
        /spellup_status

/def -i -p999 -F -t"Your Aura of Holiness fades..." spellup_fades = \
        /set spellup_duration=

/def -i -p991 -F -mglob -h'send TICK_EXE' spellup_tick = \
        /if (spellup_duration > 0) /test --spellup_duration%;\
        /else /set spellup_duration=%;\
        /endif%;\
        /spellup_status

/def -i spellup_status = \
        /set status_spellup s%{spellup_duration}%;\
        /if (spellup_duration =~ "") \
                /set status_attr_var_status_spellup=%;\
        /elseif (spellup_duration == 0) \
                /set status_attr_var_status_spellup BCred%;\
        /elseif (spellup_duration <= 1) \
                /set status_attr_var_status_spellup Cred%;\
        /elseif (spellup_duration <= 3) \
                /set status_attr_var_status_spellup Cyellow%;\
        /else \
                /set status_attr_var_status_spellup=%;\
        /endif