Next part is supposed to check if you are in the from 120 degrees of the mob, be seeing if you're either in hte +60 or -60 regions, setting a variable to tell that. it *seems* like this is working, but hard to tell.
Then, based on that, move you either left to right back into the right spot behind the mob
Code: Select all
Sub movebehind
/declare temp1 local
/declare temp2 local
/declare HeadingDiff local
/varset temp1 0
/varset temp2 0
/if $target()==FALSE {
/attack off
/sendkey up up
/return
}
/face fast nolook
/varset HeadingDiff $calc($target(heading)-$char(heading))
/if n @HeadingDiff>=180 {
/varcalc HeadingDiff @HeadingDiff-360
}
/if n @HeadingDiff<=-180 {
/varcalc HeadingDiff @HeadingDiff+360
}
/if n @HeadingDiff<=-60 {
/varset temp1 1
}
/if n @HeadingDiff>=60 {
/varset temp2 1
}
/if n @temp1==1 {
/sendkey down ctrl
/press left
/press left
/face fast nolook
/press left
/press left
/face fast nolook
/press left
/press left
/face fast nolook
/sendkey up ctrl
}
/if n @temp1==2 {
/sendkey down ctrl
/press right
/press right
/face fast nolook
/press right
/press right
/face fast nolook
/press right
/press right
/face fast nolook
/sendkey up ctrl
}
/if n @temp1==1 /if n @temp2==1 {
/sendkey up ctrl
/sendkey up left
/sendkey up right
}
/return
