Yes, I know how to get the distance, that is not the issue.
i could work backwards knowing the distance and the mob loc to approximate my own position, but again I would need some trigonometry to make it efficient and accurate. No trig routines at present and I would prefer not to write the iterative approximation equations into this script if i can avoid it...
1. Need to know target and heading of mob.
2. From there calculate where I SHOULD be standing for a backstab.
3. Move there, /face mob
4. Occasionally check to make sure I AM within a box without having to:
a. retarget myself, get position, determine if in box,
b. turn to that position
c. move to position
d. reface to mob
This requires I need to interrogate my own position without (hopefully) having to target myself, get my position, and then target the mob again to get it's position. I mean, can be done I understand via ID to make fast once you know the target, but trying to make this an efficient script if I can without retargetting myself and mobs a zillion times during a fight.
Also, there are move routines that allow for more efficient moves in close quarters than turn-to-face position and then move to position and reface. Check out OracleOfDelphi's move scripts on Xylobot and DrowConjurer's melee scripts there. These move by determing the direction facing, determining the direction needing to move, and then backing up, moving sideways, backwards or whatever while continuing to face any given direction. I have already converted these approaches now to MACROQUEST language, but need this self-loc information to make it work. It is more complicated, but a REAL rogue would do things this way... hehe... imho.
Thanks for any further input.
Roguish