#nop ---Battlehealing system for mud.arctic.org under tintin++1.5pl6 #nop -- All code released to Public Domain #nop -- Version 0.8 980629 by lav@iki.fi #nop -- pl6 980929 by lav #nop ---Requires a) mud options expert off and ansi on #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 #nop #nop #nop --Some possibly conflicting settings with my other tintin-rcs #alias nil #nop #substitute {%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 MAIN {#sub {^ %1m%%1%2} {_7 %1m%%1%2}} #alias Main {#sub {^ %1m%%1%2} {_6 %1m%%1%2}} #alias Cast {#sub {^ %1m%%1%2} {_5 %1m%%1%2}} #alias Tank {#sub {^ %1m%%1%2} {_4 %1m%%1%2}} #alias Low {#sub {^ %1m%%1%2} {_3 %1m%%1%2}} #alias Away {#sub {^ %1m%%1%2} {_1 %1m%%1%2}} #alias Igno {#sub {^ %1m%%1%2} {_0 %1m%%1%2}} #alias reMAIN {undo %1;#sub {^ %1m%%1%2} {_7 %1m%%1%2}} #alias reMain {undo %1;#sub {^ %1m%%1%2} {_6 %1m%%1%2}} #alias reCast {undo %1;#sub {^ %1m%%1%2} {_5 %1m%%1%2}} #alias reTank {undo %1;#sub {^ %1m%%1%2} {_4 %1m%%1%2}} #alias reLow {undo %1;#sub {^ %1m%%1%2} {_3 %1m%%1%2}} #alias reAway {undo %1;#sub {^ %1m%%1%2} {_1 %1m%%1%2}} #alias reIgno {undo %1;#sub {^ %1m%%1%2} {_0 %1m%%1%2}} #alias undo #unsub *%1* #alias undoall #unsub *1m* #nop #nop Command to automagically mark all groupmembers as tank-class #nop #alias alltank {#act {^ %1;37m%2m%3 %4} {#sub {^ %1m%%3%2} {_4 %1m%%3%2}};setexits donetank;group} #alias donetank {#unact *\;37*} #alias setaway {reAway %1;endheal} #nop #nop --Stat 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} #nop -- We're down (shared subsystem) -- #nop --- #alias endmem st #alias {lostconc} {endheal} #alias setfullheals {#var cures 1;#var heals 1} #nop #nop --Heal priority logic-- #nop #act {^_%1 %237m%3m%4 %5 perfect} {healper %1 %4} #act {^_%1 %237m%3m%4 %5 v.goo} {healvgo %1 %4} #act {^_%1 %237m%3m%4 %5 good} {healgoo %1 %4} #act {^_%1 %237m%31m%4 %5 fair} {healfai %1 %4} #act {^_%1 %237m%31m%4 %5 bad } {healbad %1 %4} #act {^_%1 %237m%31m%4 %5 v.bad} {healvba %1 %4} #act {^_%1 %237m%3m%4 %5 awful} {healawf %1 %4} #act {^_%1 %237m%3m%4 %5 AWFUL} {healawf %1 %4} #act {^_%1 %237m%3m%4 %5 dying} {healdyi %1 %4} #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 26 %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 25 %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 24 %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;#if {%1==1 && $active && $highbad} healcheck 23 %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;#if {%1==1 && $active && $highfair} healcheck 22 %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 #nop alias doautoheal {#if {$heallevel > 20} {#var tryingheal 1;doautostand;dohealif;docureif;warnifnone;#if {$healtype==2 && $cures==0} doheal $healtarg;doautorest};dofinishheal} #alias doautoheal {#if {$heallevel > 20} {#var tryingheal 1;doautostand;dohealif;docureif;warnifnone;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 #nop #nop -- We're down (shared subsystem) -- #var resting 0 #var canfly 1 #alias setresting {#if !$resting {#var resting 1}} #alias setcanfly {#if !$canfly {#var canfly 1}} #alias unsetresting {#if $resting {#var resting 0}} #alias unsetcanfly {#if $canfly {#var canfly 0}} #alias setstanding unsetresting #alias dobashed {setresting;dost} #alias dost dost1 #alias {st} {stand;#if $canfly fly} #alias {dost1} {#if {$hunt == 0} st} #action {^Come on! I'm relaxing!} {setresting;dost} #action {^You are sent SPRAWLING as } {dobashed} {5} #action {^You are sent sprawling as } {dobashed} {5} #action {^You are thrown to the ground by the force of the earthquake} {setresting;dost} #action {^You can't do this sitting!} {setresting;dost} #action {^You rest your tired bones but stay aloft.} {setresting;setcanfly} #action {^You rest your tired bones.} setresting #action {^You should probably stand up!} {setresting;dost} #action {^You sit down and rest your tired bones.} {setresting} #action {^You sit down.} {setresting} #action {^You stand up.} {unsetresting} #action {^You take a seat in mid-air.} {setresting} #action {^You jump up and flap your arms wildly, achieving nothing!} {unsetcanfly} #action {^You lift your arms skyward and begin to float.} {setcanfly}} #action {^You end your flight, returning to the ground.} setcanfly