Code:
MyPlayer.FFlag(randomrange(3,6),100000); //as an example..
repeat
if someObj.isONMS then
Reflect.Mouse.Move(someObj.GetMSPoint, 1,1);
if isUpTextMulti(UpTextArray) then //failsafe
Reflect.Mouse.Click(MOUSE_LEFT);
sleep(100);
until Reflect.mouse.didclick(true,500);
Using this method while walking or stopped has a very high success rate of clicking the object on the main screen.
However, while running, the same method often misses the object--either clicking too late or the mouse does not move fast enough and so the failsafe does not trigger.
I have thought about moving the mouse to where the MS coords are expected to be given the speed difference, but integrating this concept with camera movement(s) is over my head. Perhaps I could move the mouse to some tile which appears on the MS before someObj, as this could reduce the time it takes for the function to complete. Still, there exists the case where such a tile may in fact be further from the destination tile, thus creating some inefficiency with mouse movements.