Runback Module

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

compuboy
a ghoul
a ghoul
Posts: 108
Joined: Thu Apr 24, 2003 8:19 am
Location: Good Question, if anyone finds out, let me know

Runback Module

Post by compuboy » Sat Jun 14, 2003 11:32 am

You can use this module in combat macros to make you run back to wherever you started, instructions are in the macro.

Code: Select all

|Runback.inc written by Compuboy
|Use /call runback set at the beginning of 
|	a macro to define the loc and heading to face
|Use /call runback run whenever you want to run
|	back to where you started and face the direction you were
|	facing to begin.

sub RunBack

/if "$p0"=="set" {
/goto :setvars
}else /if "$p0"=="run"{
/goto :runback
}else{
/echo "Unrecognized runback parameter! Returning to /call point."
/return
}

:setvars
/varset v70 $char(x)
/varset v71 $char(y)
/varset v72 $char(heading)
/echo "Location set to $v70,$v71 with a heading of $v72."
/return

:runback
/echo "Running back to loc $v70,$v71."
/face nopredict loc $v71,$v70
/sendkey down w

:checkdist
/delay 0
/face nopredict loc $v71,$v70
/if n $abs($calc($v70-$char(x)))<=5 /if n $abs($calc($v71-$char(y)))<=5 {
/sendkey up w
/delay 5
/face heading $v72
/goto :end
}else{
/goto :checkdist
}

:end
/echo RunBack subroutine complete! Sitting....
/sit on
/return
tell me what you think, and how i can improve it. I will offer explanations on any part of it if need be.

User avatar
BlueSkies
a ghoul
a ghoul
Posts: 132
Joined: Tue Oct 01, 2002 6:22 pm

Post by BlueSkies » Sat Jun 14, 2003 2:41 pm

A decent obstacle detection subroutine would be nice. I've coded a few -- and if I weren't on vacation at the moment, I'd post them -- but they look pretty mechanical. :( Of course, the best way to deal with obstacles is to predict them -- and that's only going to happen if someone maps out the entire zone and tells the macro where the obstacles are... Not sure that's ever gonna happen. :P

Otherwise, looks good. It'll perform its purpose, and that's all that really matters.

Oh -- and a check to see if you get attack while running back to start would be nice too. I'd post that up here if I were home, too. :P
Live your dreams! Blue Skies everyone

compuboy
a ghoul
a ghoul
Posts: 108
Joined: Thu Apr 24, 2003 8:19 am
Location: Good Question, if anyone finds out, let me know

Post by compuboy » Sat Jun 14, 2003 6:14 pm

really it is just for use when grouped, not for soloing, would need to have such features if it werent for group. I use it when the mob my group is killin is dead to run back to the camp site. and it works nice
ya know, i cant think of anything profound to say here, so....

GO DEVS