I have a macro that does basically that, runs around and kills stuff, goes and sits down at a safe point if HP get too low. Designed for a low level warrior, no bells and whistles. Doesn't loot, since I can't figure out how to do it using keyboard commands alone... was never sure if mouse movements and press commands would work.
Code: Select all
#include routines.mac
#include macrokit.inc
sub main
/zapvars
/alert clear 1
/alert add 1 npc range $calc($char(level)-1) $calc($char(level)+1) hopper
/alert add 1 npc range $calc($char(level)-1) $calc($char(level)+1) shade
/alert add 1 npc range $calc($char(level)-1) $calc($char(level)+1) skeletal
:start
/delay 5
/if n $char(hp,pct)<51 /call Rest
/if "$alert(1)"=="TRUE" {
/target alert 1 nopcnear 60
/call Melee
}
/goto :start
/return
sub Rest
/press esc
/varset a(50,0) -2002.84,-2305.00
/call Walk 50 0 0
/sit on
:restloop
/delay 5
/if n $char(hp,pct)<100 /goto :restloop
/sit off
/return
This one is set to work in Shadweaver's, but variations for just about any zone are simple. Simply change the alert list, and replace the coordinates in the Rest subroutine (/varset a(50,0) Ycoord, Xcoord) with your favorite sitting place.
I've tried to work Bind Wounds in there, but my attempts have always resulted in infinite loops.
The flaw here is in the Melee and Walk routines. No built in obstacle avoidance. But it does the job as long as you pay minimal attention.