y'all critique away. posted out of code blocks because of the "<>" issue.
---Begin---
sub getBehind
/if $char(state)!=STAND /stand
:gB_BeginLoop
/delay 0
/if $target()!=TRUE /goto :gB_EndLoop
/face nopredict
/varset bearing $calc($target(heading)-$char(heading))
/varadd bearing $if(n,$bearing<0,360,0)
/if n $tdist>15 /goto :gB_AdjDist
/if n $bearing>45 /if n $bearing<315 /goto :gB_Circle
/goto :gB_EndLoop
:gB_AdjDist
/if n $tdist>20 {
/face nopredict
/call AutoRun 1
}
if n $tdist<15 /if n $char(speed)>.50 {
/sendkey down ctrl
/press r
/sendkey up ctrl
}
if n $tdist<15 {
/call AutoRun 0
/face nopredict
}
/if n $tdist<14 /press down
/goto :gB_BeginLoop
:gB_Circle
/if n $bearing>91 /if n $bearing<270 {
/varset newheading $calc($char(heading)-$if(n,$bearing<180,45,-45))
/varsub newheading $if(n,$newheading>360,360,0)
/varadd newheading $if(n,$newheading<0,360,0)
/face heading $newheading
/sendkey down up
/delay 5
/sendkey up up
/goto :gB_BeginLoop
}
/sendkey down ctrl
/sendkey down $if(n,$bearing>180,left,right)
/sendkey up
/sendkey up $if(n,$bearing>180,left,right)
/sendkey up ctrl
/goto :gB_BeginLoop
:gB_EndLoop
/if n ($tdist<12 || $tdist>15) /goto :gB_AdjDist
/return
sub getCritterName
/varset l0 2
:loop_find_critter_name
/varadd l0 1
/if $arg($l0,"$p0")!=YOU /goto :loop_find_critter_name
| test for normal hit
/if "$p0"~~"points of damage"/varsub l0 2
/for l1 1 to $l0
/varset a(1,$l1) $arg($l1,"$p0")
/next l1
/return "$a(1,1) $a(1,2) $a(1,3) $a(1,4) $a(1,5)"
| Modified AutoRun to allow
| moving backwards.
| /call AutoRun <1|-1|0>
| 1 : move forwards
| 0 : all stop
| -1 : move Backwards
sub AutoRun
/if $char(speed)<.40 {
/sendkey down ctrl
/press r
/sendkey up ctrl
}
/if $p0==$l0 /return
/varset l0 $p0
/if n $p0>0 /sendkey down up
/if n $p0<0 /sendkey down down
/if $p0==0 {
/sendkey up up
/sendkey up down
}
/return
---End---

