Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!
Moderator: MacroQuest Developers
-
Banannaboy
- a lesser mummy

- Posts: 43
- Joined: Tue Apr 13, 2004 9:59 pm
Post
by Banannaboy » Sun Apr 25, 2004 1:02 am
Could someone write a very basic block of code to move to the back of the mob? Not a loop that repeats, just somthing I can /call that will position me behind the mob and then return focus back to macro.
-
grimjack
- Macro Author

- Posts: 525
- Joined: Thu Nov 07, 2002 6:51 am
-
Contact:
Post
by grimjack » Mon Apr 26, 2004 1:30 am
There are plenty of subs that do exactly this already located in the macro depot. With that said, here is one of them with all the bells and whistles removed(The original can be found in Cunning's Rogue macro which is fairly twords the top of the deopt)
Code: Select all
Sub GetBehind
/if (${Target.ID}==0) {
/keypress forward
/goto :nomob
}
/if (${Math.Distance[${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}]}<4) /goto :noneed
/face nolook fast loc ${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}
/keypress forward hold
:gobehindloop
/delay 1
/if (${Target.ID}==0) {
/keypress forward
/goto :nomob
}
/face nolook fast loc ${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}
/if (${Math.Distance[${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}]}>3) /goto :gobehindloop
/keypress forward
:noneed
/face fast
:nomob
/return
Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.
Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.
My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack
-
Banannaboy
- a lesser mummy

- Posts: 43
- Joined: Tue Apr 13, 2004 9:59 pm
Post
by Banannaboy » Mon Apr 26, 2004 10:19 am
Thanks Grimjack. I saw that one used in many different macros but it was too complicated.