MM72 wrote on May 14
th, 2014 at 9:05am:
Sorry, I should have been more specific... I copied the script as posted, created a autohotkey file with it.. when I double click on the script an error message pops up immediately with "Error at line 1, Line Text global playerx, Error: This line does not contain a recognised action... The Program will now exit"
Either the code is contained in another function, or you have to move the global declarations to the function(s) in which the respective variable is used. You'll also need to take screenshots of the images that are in the first few lines, so that the script can find them. Given that you're probably not going to run this in a virtual box and will be panicking as it runs out of control in an infinite loop, you should add this somewhere:
~$ESC::
Send {w up}
Send {a up}
Send {d up}
Send {s up}
ExitApp
return
That will make it so that pressing Esc will cancel any movements in progress and exit the program.
Edit/aside:
Interesting to see someone else's script and compare methods. I always use Loop x instead of mimicking a traditional while loop. I don't use image captures at the moment, but my script has variables that can be set to adjust the run speed in each running/jumping function. I've only tested on one character, but assuming below 500ms latency, I trigger all 4 optionals 90% of the time. the other 10%, I only get the first Daggertooth and Vrall. The trick is to utilize corners. Your rotation shouldn't vary too much, but the distance you run can.