#nop ---Battlehealing system for mud.arctic.org and tintin++1.5pl6 #nop -- All code released to Public Domain #nop -- Version NOANSI_0.8pl8 980629 by lav@iki.fi #nop ---Requires a) mud options expert off and ansi off #nop -- b) prompt of Hits moVes Coins Mem Exits #nop #nop ---See heal_set for logical description--- #nop #nop BUGS: Heal/Cure-count handles outof-situations, not counting itself #nop : Anomalies with similar subnames (Ric & Richard) #nop : Doesn't handle deawaying: From multiple away-class people only the #nop worst one is tried for healing #nop : $war-mode unfinished #nop : Untested version of ANSI-capable system #nop : alltank-doesn't work #nop #nop --Some possibly conflicting settings with my other tintin-rcs #alias nil #nop #action {^You are sent SPRAWLING } {dobashed} {5} #action {^You are sent sprawling } {dobashed} {5} #alias dobashed {#var resting 1;dost} #sub {%0awful%1} {%0AWFUL%1} #alias dotick {#ticksize $tick} #var tick 75 #var war 0 #nop #nop gtelling 'HEAL' will force autocheck #nop if $war is reset #nop #nop --Healing Initialize-- #var active 1 #var highbad 1 #var highfair 0 #var autoheal 0 #var healtype 1 #var resting 0 #var heals 1 #var cures 1 #nop #nop --Usage commands #nop #alias healgroup {dosetheal;group} #alias p {healgroup} #alias setp #alias p {healgroup} #alias dop setp #alias forcehealgroup {#var cures 0;#var heals 1;healgroup} #alias forcecuregroup {#var cures 1;#var heals 0;healgroup} #nop #nop --Usage automatic-- #act {tells your group%1HEAL%2} {#if {$autoheal == 0 && $war ==0} {dosetheal;group}} #alias autoon offwar #alias autooff onwar #alias onwar {#var war 1} #alias offwar {#var war 0} #nop #nop --Usage options #nop #alias hactive {#var active 1;doshowactive} #alias hinactive {#var active 0;dounshowactive} #alias aon hactive #alias aoff hinactive #alias doshowactive {#sub {^ Member %1} { MemberACTIVE%1}} #alias dounshowactive {#unsub {^ Member %1}} #nop #alias healbadon {#var highbad 1} #alias healbadoff {#var highbad 0;#var highfair 0} #alias healfairon {healbadon;#var highfair 1} #alias healfairoff {#var highfair 0} #nop #alias healstatus {#var highbad;#var highfair;#var active;#var heals;#var cures;#var war} #alias hstat healstatus #alias stat healstatus #nop #alias {h§} {gt Relax, I'm healing.} #alias {h0} {gt NO HEALS LEFT} #alias {h1} {gt ONE HEAL left} #alias {h2} {gt TWO heals left} #alias {h3} {gt Three heals} #alias {h4} {gt Four heals} #alias {h5} {gt Five heals} #alias {h6} {gt Six heals} #alias {h7} {gt Seven heals} #alias {h8} {gt Eight heals} #alias {h8} {gt Nine heals} #alias {h+} {gt Full heals} #nop #alias messon {#mess act;#mess var;#mess ali} #alias messoff {#mess act;#mess var;#mess ali} #nop #nop Commands to set priorities for groupmembers #nop #alias reCast {undo %1;#sub {^ %%1%2} {_5 %%1%2}} #alias reMAIN {undo %1;#sub {^ %%1%2} {_7 %%1%2}} #alias reMain {undo %1;#sub {^ %%1%2} {_6 %%1%2}} #alias reCast {undo %1;#sub {^ %%1%2} {_5 %%1%2}} #alias reTank {undo %1;#sub {^ %%1%2} {_4 %%1%2}} #alias reLow {undo %1;#sub {^ %%1%2} {_3 %%1%2}} #alias reAway {undo %1;#sub {^ %%1%2} {_1 %%1%2}} #alias reIgno {undo %1;#sub {^ %%1%2} {_0 %%1%2}} #alias undo #unsub *%1* #alias undoall #showme **Unimplemented #nop #nop Command to automagically mark all groupmembers as tank-class #nop #alias alltank {#act {^ %1 %2 perfect } {#sub {^ %%1%2} {_4 %%1%2}}; setexits donetank;group} #alias donetank {#unact {^ *perfect*}} #alias setaway {reAway %1;endheal} #nop #nop --State maintenance logic-- #nop #act {^You can't remember how to cast that spell!} {#if {$tryingheal && $healtype==1} #var heals 0;#if {$tryingheal && $healtype==2} #var cures 0} #act {^YOu CANT REMEMBER HOW TO CAST THAT SPELL!} {#if {$tryingheal && $healtype==1} #var heals 0;#if {$tryingheal && $healtype==2} #var cures 0} #act {^Who should the spell be cast upon?} {#if $tryingheal setaway $healtarg;endheal} #act {^Your studies complete, you close your prayerbook with a smile.} {endmem;dotick;setfullheals} {5} #act {^You lost your concentration!} {lostconc} #act {^You utter the words, 'cure critical'} {endheal} #act {^You utter the words, 'heal'} {endheal} #act {^You sit down and rest your tired bones.} {#var resting 1} #act {^You rest your tired bones.} {#var resting 1} #act {^You take a seat in mid-air.} {#var resting 1} #act {^You sit down.} {#var resting 1} #act {^You stand up.} {#var resting 0} #act {^You can't do this sitting!} {#var resting 1;dost} #act {^You should probably stand up!} {#var resting 1;dost} #act {^You are thrown to the ground by the force of the earthquake} {#var resting 1;dost} #alias endmem st #alias {lostconc} {endheal} #alias setfullheals {#var cures 1;#var heals 1} #nop #nop --Heal priority logic-- #nop #act {^_%1 %2 %3 v.good%4} {healvgo %1 %2} #act {^_%1 %2 %3 good4} {healgoo %1 %2} #act {^_%1 %2 %3 fair%4} {healfai %1 %2} #act {^_%1 %2 %3 bad%4} {healbad %1 %2} #act {^_%1 %2 %3 v.bad%4} {healvba %1 %2} #act {^_%1 %2 %3 awful%4} {healawf %1 %2} #act {^_%1 %2 %3 AWFUL%4} {healawf %1 %2} #act {^_%1 %2 %3 dying%4} {healdyi %1 %2} #nop #nop #alias {healcheck} {#if {$heallevel < %1} {#var heallevel %1;#var healtarg %2;#var healtype 1}} #alias {curecheck} {#if {$heallevel < %1} {#var heallevel %1;#var healtarg %2;#var healtype 2}} #alias healdyi {#if {%1==7} healcheck 55 %2;#if {%1==6} healcheck 48 %2;#if {%1==5} healcheck 47 %2;#if {%1==4} healcheck 46 %2;#if {%1==3} healcheck 45 %2;#if {%1==1} healcheck 24 %2} #alias healawf {#if {%1==7} healcheck 54 %2;#if {%1==6} healcheck 44 %2;#if {%1==5} healcheck 42 %2;#if {%1==4} healcheck 41 %2;#if {%1==3} healcheck 35 %2;#if {%1==1} healcheck 23 %2} #alias healvba {#if {%1==7} healcheck 53 %2;#if {%1==6 && $active} healcheck 43 %2;#if {%1==5 && $active} curecheck 37 %2;#if {%1==4 && $active} healcheck 36 %2;#if {%1==1 && $active} healcheck 22 %2} #nop #alias healbad {#if {%1==7 && $highbad} healcheck 52 %2;#if {%1==6 && $highbad && $active} healcheck 38 %2;#if {%1==5 && $highbad && $active} curecheck 33 %2;#if {%1==4 && $active && $highbad} healcheck 32 %2} #nop #alias healfai {#if {%1==7 && $highfair} healcheck 51 %2;#if {%1==6 && $highfair && $active} healcheck 34 %2;#if {%1==5 && $highfair && $active} curecheck 31 %2;#if {%1==4 && $active && $highfair} curecheck 30 %2} #nop #alias healgoo nil #alias healvgo nil #alias healper nil #nop #nop --Activation logic-- #nop Triggered upon checking for group-list without opt expert #nop #act {^ Member} {#if $autoheal doinitheal} #act {^_%1 Member} {#if $autoheal doinitheal} #nop #alias dosetheal {#var autoheal 1} #alias doinitheal {setexits doautoheal;#var heallevel 0} #alias doexits {doexits2;#alias doexits2 nil;#unact {^%1H %2V %3C %4>}} #alias setexits {#act {^%1H %2V %3C %4>} {doexits};#alias doexits2 %0} #nop #nop #alias doautoheal {#if {$heallevel > 20} {#var tryingheal 1;doautostand;dohealif;docureif;warnifnone;#if {$healtype==2 && $cures==0} doheal $healtarg;doautorest};dofinishheal} #alias endheal {#var tryingheal 0} #alias {dohealif} {#if {($healtype==1 || $cures==0) && $heals} {doheal $healtarg}} #alias {docureif} {#if {($healtype==2 || $heals==0) && $cures} {docure $healtarg}} #alias {warnifnone} {#if {$cures==0 && $heals==0} {#showme !!!!!;#showme NO HEALS NOR CURES LEFT;#showme !!!!!}} #nop #alias dofinishheal {#var autoheal 0} #alias doautostand {#if $resting stand} #alias doautorest {#if $resting rest} #alias doheal {heal %1;showhealing} #alias docure {cure %1;showcuring} #alias {heal} {cast 'heal' %0} #alias {cure} {cast 'cure critical' %0} #alias showhealing {#showme ----;#showme >>>>Going to HEAL ----- $healtarg ----------;#showme ----} #alias showcuring {#showme ----;#showme >>>>Going to CURE ----- $healtarg ----------;#showme ----} #alias dobell {#bell} #substitute {^You heal%1} {>>>>>>>>>>YOU HEAL %1 ---} #act {^You heal} {dobell} #act {^>>>>>>>>>>YOU HEAL} {#bell} #nop #nop