Game cross-browser Javascript Bookmarklet

Didn't find your forum yet? Maybe this is it.
Post Reply
Canazza
Regular Poster
Posts: 16
Joined: Thu Apr 02, 2009 10:34 am

Game cross-browser Javascript Bookmarklet

Post by Canazza »

I've put together a Javascript hook for Game! in the form of a Bookmarklet (a Bookmark that executes javascript code)

the WittyRPG AutoCaster does exactly what it says on the tin, it's a very crude, basic and inefficient way of playing the game, in that it plays it for you and is scared to bits of dying and will heal up often.

It automatically Attacks/Heals/Re-engages until you have 0% Stamina. To stop, at any time, uncheck the Active button.
You can click Loot Log to view the items looted while the script has been active

to start using, and for more information go to http://canazza.co.uk/wittyRPG.html

It has been tested in Firefox 3.0.10 and Safari 4, and should work in the latest versions of Chrome and Opera. It doesn't work in Internet Explorer. Support may be forthcoming if I can be bothered...
User avatar
Mad Merlin
Site Admin
Posts: 752
Joined: Sun Aug 14, 2005 10:41 pm
Contact:

Post by Mad Merlin »

var LOCATION = "http://www.wittyrpg.com";//window.location;
You should use http://wittyrpg.com instead, as of about 2 weeks ago, http://www.wittyrpg.com redirects to http://wittyrpg.com (because the extra www is silly and redundant).

Also, (aside from the source) you don't link back to Game!, someone that stumbles upon the page randomly would have no idea what you're talking about.

Edit: If you care about IE, attachEvent() needs "onload", not "load", and "onclick" instead of "click", etc.
Terrific Noise
Regular Poster
Posts: 65
Joined: Tue Jun 02, 2009 10:01 am

Post by Terrific Noise »

Works great with Chrome. Now I can keep playing and go to college too.
Canazza
Regular Poster
Posts: 16
Joined: Thu Apr 02, 2009 10:34 am

Post by Canazza »

Mad Merlin wrote:
Edit: If you care about IE, attachEvent() needs "onload", not "load", and "onclick" instead of "click", etc.
Thanks Merlin, I only added those bits in at the start as I intended to have IE support from the start, but when I started having getElementsByClassName I just left it.

I've changed the url it redirects to and added a link on the page :)

[update]

I've just added a Toggle button for showing/hiding Cooking recipes or Combination Recipes you can't make.
Terrific Noise
Regular Poster
Posts: 65
Joined: Tue Jun 02, 2009 10:01 am

Post by Terrific Noise »

Bug report: Toggle Combinable Cookable does nothing in Chrome, maybe I have an older version.

Feature request: I would like a button to quickly put all my gold in the bank. Comes in handy.
Canazza
Regular Poster
Posts: 16
Joined: Thu Apr 02, 2009 10:34 am

Post by Canazza »

Bosh! It is so :D

[edit] I tested the toggle cookables button in Chrome 2.0.172.33, it does use getElementsByClassName, so if you have an older version it won't work (but a few other things wouldn't too)
Perhaps the function of it's not quite clear.
It's designed to hide/show the cookables/combinables that you can't make (leaving only the ones you can make visible) - thus it only has uses on the Inventory and Cooking pages.
Terrific Noise
Regular Poster
Posts: 65
Joined: Tue Jun 02, 2009 10:01 am

Post by Terrific Noise »

One last request, if I run out of MP but have decent HP, it should just attack.
Post Reply