Script Summary: A smart autohunt script for the Ghost Trappers Facebook App
v1.3 - Updated code to find and parse out code value. GT switched to a d=XXX value. Hopefully script is now more resilient.
v1.2 - Updated code to find and parse out c value (it's not always 3 numbers, d'oh)
v1.1 - Added handling for stopping refreshes when a captcha is detected. Changed error writing, misc comments.
v1.0 - Initial release
It will autohunt based on the actual time left until you're able to hunt again.
I haven't given it a real thorough rundown of all possible test-cases, so let me know what kills it. With version 1.1, it should now stop refreshing when a captcha is detected.
Known Issues:
It will not stop attempting to refresh if you have run out of whiskey. Always keep whiskey on hand, and always keep watch of the game.
I believe it will stop refreshing when the expected c=XXX code changes before a refresh, so when you refresh, you did not hunt and are able to hunt again instantly. However, it does not make the function call that I parse the time from in order to determine the refresh timeout. I'm looking into this more, or possible alternatives for getting the refresh time. Suggestions are welcome in the discussion.
How to use properly:
Leave a tab on the ghost trappers page (note: having more than one tab open to ghost trappers can cause all of the tabs to try to hunt, possibly raising suspicion). The script will then autohunt for you. Always keep whiskey on in stock and Always watch over the game.
Any problems detected by the script that prevent it from refreshing will be written at the very bottom of the page.
Note: This does not mean or imply that this is safe. This is most likely against the Terms of Service (I haven't looked into them), so use at your own risk.
I am not a javascript programmer.
Everything I have written has been pieced together from references and tutorials (mostly w3schools.com).
Absolutely no script comes with any warranty (written, implied, or otherwise) and is strictly use at your own risk.
Feel free to modify any of my scripts as long as you give me some credit (a link back to my script in the source is perfect) and preferably a comment on my script's page so I can see it's evolution.
Also, I encourage users to avoid scripts copied by joshkuo, as he reposts others' scripts without adding any benefit.



