#nop ---Battlehealing system for mud.arctic.org under tintin++1.5pl6 #nop -- Version 0.8 980629 by lav@iki.fi #nop -- pl7 990104 lav #nop -- pl8 990306 lav Removed {^%1..} from actions as useless #nop -- pl9 990427 lav added 'dummy's to heal aliases #nop -- pl10 990503 lav healgroupif #nop -- pl11 990510 lav few fixes, automagicheal #nop -- pl12 990630 lav #nop -- pl12 000111 lav #nop -- pl13 000910 lav Requires tintin that doesnt trigger on ansi codes #nop -- pl14 030330 lav Requires hooks now #var versionheal {0.8pl13 000910 lav} #nop ---Requires a) mud options expert off and ansi on #nop -- b) prompt of Hits moVes Coins Mem Exits #nop -- c) base rcfile and hooks from pk.triggers #nop #nop ---See heal_set for logical description--- #nop #nop KNOWN BUGS: #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 LICENCE #nop This system may be used, distributed and modified, provived that #nop 1) the license and credits are retained #nop 2) lav@iki.fi is notified of the use #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 63 #var hunt 0 #var war 0 #alias on {#ifex %1 {#if !$%1 {#var %1 1}} {#var %1 1}} #alias off {#ifex %1 {#if $%1 #var %1 0} {#var %1 0}} #alias toggle {#if {$%1} {#var %1 0} {#var %1 1}} #alias set {#ifstr {%%2 } { } {#ifex %1 {#nop} {#var %1 1}} {#var %0}} #alias unset {#ifex %1 #unvar %1} #alias log #session A mud.arctic.org 2700 #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 #var leader dummy #var main dummy #var obey 0 #nop #nop --Usage commands #nop #alias healgroup {dosetheal;group} #alias setp #alias p {healgroup} #alias dop setp #alias main {setmain %1 dummy} #alias setmain {#var main %1;reMain %1} #alias forcehealgroup {#var cures 0;#var heals 1;healgroup} #alias forcecuregroup {#var cures 1;#var heals 0;healgroup} #nop #nop -- My personal heal commands #nop #alias o {heal $main} #alias oo {cure $main} #alias p {healgroup;doshowinactive} #alias doshowinactive {#if !$active #showme -- -- -- -- -- -- -- -- -- ---- -- NOT ACTIVE -- -- -- -- -- -- -- -- --} #nop #nop #nop --Usage automatic-- #var versionhealauto 7 #act {tells your group%1HEAL%2} healgroupif #alias healgroupif {#if {$autoheal == 0 && $war == 0} {healgroup}} #alias healgroupif {#if {$war == 0} {healgroup}} #alias {healgroupif} {#if {$active && $autoheal == 0 && $war == 0} {healgroup}} #alias autoon offwar #alias autooff onwar #alias onwar {#var war 1} #alias offwar {#var war 0} #nop #nop #var automagic 2 #var textauto - #alias onauto {#var automagic 1;settextauto} #alias offauto {#var automagic 0;settextauto} #alias doautocheck {#if $automagic healgroupif} #action {as %0 breathes} {doautocheck} {5} #action {extremely} {doautocheck} {5} #action {massacre} {doautocheck} {5} #action {annihilate} {doautocheck} {5} #action {oblirerate} {doautocheck} {5} #action {OBLITERATES} {doautocheck} {5} #action {, fighting} {doautocheck} {5} #action {a quick thrust and twist} {doautocheck} {5} #action {quickly thrusts} {doautocheck} {5} #action {some strange noises and some} {doautocheck} {5} #action {is lying here, bleeding.} {doautocheck} {5} #nop #nop prompt requires fighting 17+ #var textobey { } #alias showstatus {#showme {$textauto <$textbad$textfair> $textobey H:$heals C:$cures $secstotick E:$e $textwar $texthunt $textafk}} #alias gtellstatus {gtell $textacti $textauto <$textbad$textfair> H:$heals C:$cures $textafk} #alias gstat {gtell $heals heals $cures cures} #alias tellstatus {tell %1 $textacti $textauto <$textbad$textfair> H:$heals C:$cures $textafk} #alias checkstatus {settextauto;settextacti;settextfair;settextbad;settextwar;settexthunt;settextafk} #alias settextauto {#if $automagic {#var textauto {-AUT-}};#if !$automagic {#var textauto {- -}} #alias settextacti {#if $active {#var textacti {-ACT}};#if !$active {#var textacti {- }}} #alias settextfair {#if $highfair {#var textfair {F}};#if !$highfair {#var textfair { }}} #alias settextbad {#if $highbad {#var textbad {B}};#if !$highbad {#var textbad { }}} settextauto;settextacti;settextfair;settextbad #nop #nop #nop --Usage options #var versionhealusage 1 #nop #alias hactive {#var active 1;settextacti;doshowactive} #alias hinactive {#var active 0;settextacti;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;settextbad} #alias healbadoff {#var highbad 0;healfairoff;settextbad} #alias healfairon {healbadon;#var highfair 1;settextfair} #alias healfairoff {#var highfair 0;settextfair} #nop #alias healstatus {#var highbad;#var highfair;#var active;#var heals;#var cures;#var leader;#var main;#var war;#var automagic;#var obey} #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 {h9} {gt Nine heals} #alias {h9} {gt Nine heals} #alias {h10} {gt Ten 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 hsetMAIN {#sub { %1m%%1%2} {_7 %1m%%1%2}} #alias hsetMain {#sub { %1m%%1%2} {_6 %1m%%1%2}} #alias hsetCast {#sub { %1m%%1%2} {_5 %1m%%1%2}} #alias hsetTank {#sub { %1m%%1%2} {_4 %1m%%1%2}} #alias hsetLow {#sub { %1m%%1%2} {_3 %1m%%1%2}} #alias hsetAway {#sub { %1m%%1%2} {_1 %1m%%1%2}} #alias hsetIgno {#sub { %1m%%1%2} {_0 %1m%%1%2}} #alias MAIN {hsetMAIN %1 dummy} #alias Main {hsetMain %1 dummy} #alias Cast {hsetCast %1 dummy} #alias Tank {hsetTank %1 dummy} #alias Low {hsetLow %1 dummy} #alias Away {hsetAway %1 dummy} #alias Igno {hsetIgno %1 dummy} #alias reMAIN {undo %1;MAIN %1} #alias reMain {undo %1;Main %1} #alias reCast {undo %1;Cast %1} #alias reTank {undo %1;Tank %1} #alias reLow {undo %1;Low %1} #alias reAway {undo %1;Away %1} #alias reIgno {undo %1;Igno %1} #alias undo #unsub *%1* #alias undoall #unsub *1m* #nop #nop Command to automagically mark all groupmembers as tank-class #nop Obsolote version, relies on ansi-codes #nop #alias alltank {#act { %1;37m%2m%3 %4} {#sub { %1m%%3%2} {_4 %1m%%3%2}};addhook prompt donetank;group} #alias donetank {#unact *\;37*} #alias setaway {reAway %1;endheal} #nop #nop --Stat maintenance logic-- #var versionhealmaintenance 2 #nop #act {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;mem} {4} #act {You lost your concentration!} {lostconc} #act {Your casting is disrupted by the fighting!} {lostconc} #act {You utter the words, 'cure critical'} {dec cures;endheal} #act {You utter the words, 'heal'} {dec heals;didheal;endheal} #nop #alias didheal didheal1 #alias didheal1 {#if ($automagic&&$talk) {warnheal $heals}} #alias didheal2 nil #var talk 0 #alias offtalk {off talk} #alias ontalk {on talk} #alias warnheal {#if %1<1 h0;#if %1==1 h1;#if %1==2 h2;#if %1==3 h3} #alias endmem {#if $resting st} #alias {lostconc} {dobellinf;#showme -- FAILED DUE CONCENTRATION -- ;#if {$tryingheal && $healtype==1} dec heals;#if {$tryingheal && $healtype==2} dec cures;#if {$tryingheal} endheal} #alias endheal {#var tryingheal 0} #alias setfullheals {#var cures 1;#var heals 1;setmainif} #alias setmainif {#if $automagic {aon}} #alias inc {#ifex %1 {#math %%1 {$%%%1+1}} {#var %%1 0}} #alias dec {#ifex %1 {#math %%1 {$%%%1-1}} {#var %%1 0}} #nop #var memspells 0 #alias {onmemspells} {on memspells} #alias {offmemspells} {off memspells} #action {Spells currently memorized:} {onmemspells} #action {Spells being memorized:} {offmemspells} #action {[ %1]heal} {#if ($memspells&&$heals!=%1) {#var heals %%1}} #action {[%1]heal} {#if ($memspells&&$heals!=%1) {#var heals %%1}} #action {[ %1]cure critical} {#if ($memspells&&$cures!=%1) {#var cures %%1}} #action {[%1]cure critical} {#if ($memspells&&$cures!=%1) {#var cures %%1}} #nop #nop --Heal priority logic-- #var versionhealpriority 2 #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 -- NOANSI variants -- #act {^_%1 %2 %3 perfect%4} {healper %1 %2} #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} {healcheck1} #alias {curecheck} {curecheck1} #var heallevel 0 #var curelevel 0 #alias {healcheck1} {#if {$heallevel < %1} {#var heallevel %1;#var healtarg %2;#var healtype 1} {nil}} #alias {curecheck1} {#if {$heallevel < %1} {#var heallevel %1;#var healtarg %2;#var healtype 2} {nil}} #alias {healcheck2} {#if {$heallevel <= %1} {#var heallevel %1;#var healtarg %2;#var healtype 1} {nil}} #alias {curecheck2} {#if {$heallevel <= %1} {#var heallevel %1;#var healtarg %2;#var healtype 2} {nil}} #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-- #var versionhealtrigger 1 #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 {addhook prompt 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 {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} {dobell} #nop #nop #nop #nop -- We're down -- #var versiondown 22 #var resting 0 #var isfly 0 #var canfly 1 #var fight 0 #var rising 0 #alias settextfly {#if (!$isfly&&!$canfly) #var textfly {!F};#if ($isfly||$canfly) #var textfly { }}0 #alias statdown {#var isfly;#var canfly;#var resting} #alias statfly statdown #alias setresting {on resting} #alias setcanfly {#if !$canfly {#var canfly 1;settextfly}} #alias setisfly {#if !$isfly {#var isfly 1;settextfly}} #alias unsetresting {#if $resting {#var resting 0}} #alias unsetcanfly {#if $canfly {#var canfly 0;settextfly}} #alias unsetisfly {#if $isfly {#var isfly 0;settextfly}} #alias setstanding unsetresting #alias dobashed {setresting;dost;dobellpan} #alias dost dost1 #alias {st} {stand;#if ($canfly&&!$isfly&&!$fight) fly} #alias {dost1} {#if {$war == 0} st;#if {$war} dobellpan} #action {^Come on! I'm relaxing!} {setresting;dost} #action {are sent SPRAWLING as } {dobashed} {5} #action {are sent sprawling as } {dobashed} {5} #action {small whirlwind crashes into you, pummeling your entire body} {dobashed} {5} #action {momentum of your kick brings you crashing to the ground} {dobashed} {setresting;dost} #action {are thrown to the ground by the force of the earthquake} {setresting;dost} #action {knocks you back a few feet and you fall to the ground.} {setresting;dost} #action {u try to bash} {setresting;st} #action {can't do this sitting!} {setresting;dost} #action {can't do that while sitting.} {setresting;dost} #action {rest your tired bones but stay aloft.} {setresting;setisfly} #action {rise up off the ground.} {setisfly} #action {take a seat in mid-air.} {setresting;setisfly} #action {rest your tired bones.} {setresting;unsetisfly} #action {sit down and rest your tired bones.} {setresting;unsetisfly} #action {u jump up and flap your arms wildly, achieving nothing!} {unsetcanfly;unsetisfly} #action {u sink gently to the ground.} {unsetcanfly;unsetisfly} #action {u feel much heavier.} {unsetisfly;fly} #action {u float slowly to the ground.} {setcanfly;unsetisfly} #action {u should probably stand up!} {setresting;dost} #action {u are resting.} {setresting} #action {u are flying.} {setisfly} #action {u're already flying!} {setisfly} #action {u sit down.} {setresting} #action {u stand up.} {unsetresting} #action {u are already standing} {unsetresting} #action {U STAND UP} {unsetresting} #action {u stop meditating and stand up.} {unsetresting} #action {u lift your arms skyward and begin to float.} {setcanfly;setisfly} #action {u end your flight, returning to the ground.} {setcanfly;FlY}