Script Summary: I'm uploading this discussion script because I've received several messages regarding this app
Please do not install this script. Instead read below for my findings regarding MythMonger:
First:
Q: Do I plan to write a script for MythMonger?
A: At the moment, no. I haven't been playing any MH, FW, or GT lately as my interests and time have been elsewhere (note: How much time is needed to let a script play for me? haha). I may decide to write one later, but for now, I encourage you, the community, to take up this task (you may want to collaborate in the discussion board here so 30 scripts don't pop up doing the exact same thing exactly as I'm about to suggest in my findings).
Feel free to use my other scripts as base templates and modify as needed( don't forget change the namespace to something else!). Just give me some credit if you use them or this info. My username and possibly the link to my profile here is all that I ask (though if you don't, there ain't a whole lot I can do about it besides be annoyed like with that joshkuo guy).
A precursory note: All this information is valid and true for me as of July 11th, 2009 at 11PM EST. It's not guaranteed to hold true for you or beyond the time listed, especially since the App says it is in Beta.
Here is what I have found (note: i replaced the < and > with [ and ] so it wouldn't think it was html in here):
From what I can tell, you're able to Play once every 10 minutes. The white box for the progress bar is just a div that's position is being updated via javascript in the page.
You can see the bar's info in this snippet:
[div class="playsection"]
[div style="float: left; width: 165px;"]
[div style="width: 150px; float: left; height: 30px;"]
[/div]
[div id="app79378246206_turnprogbar" class="progbar" fbcontext="XXXXXXXXX" style="background-position: 80% 50%;"/]
[div class="challengelink"]
[/div]
[div class="donatelink"]
[a onclick="(new Image()).src = '/ajax/ct.php?app_id=XXXXXXX&action_type=3&post_form_id=XXXXXXXXposition=3&' + Math.random();return true;" href=xxx]BUY HEROIC CARDS[/a]
[/div]
[/div]
[div style="float: left; margin-top: 6px;"]
[/div]
[/div]
the div with class="progbar" is the white box. The background position is given in terms of horizontal location and vertical location. Here the horizontal location is 80%. The large the number, the farther left it is, starting at 100% = farthest left.
Assuming the 10 minute assumption is true, you could parse the horizontal background position (may even be a method to access it?) and multiply that by 600000 (10 minutes in milliseconds i believe, unless my math is wrong (I always mess up when working with milliseconds, so check my math)) and then add a little bit of random time to try to be less obvious about the autorefreshing.
You'll also want to check to make sure that there are cards ready so you don't keep refreshing when you don't have any cards (my GT script has this problem... i never got around to fixing it though I had a couple ideas that would work, none of them were 100% how I'd want them to be without some probable painful parsing)
[div class="overbar" style="width: 45px; text-align: center;"]
[div class="overbar-l"/]
[div class="overbar-r"/]
[span style="position: relative; top: 3px; color: rgb(45, 16, 8);"]x24[/span]
[/div]
in here you can see the x24. That's the card count. I believe it changes to x0 when you're out of cards, so if you're able to parse out that, you can easily check to make sure they have cards.
(I just realized something else while looking more at the source to see how the bar was being moved )
There's a variable
var aXXXXX_remainingActiveTurnWaitSeconds = xxx.yyy
which you should be able to parse out the value after it and it'll give you the seconds exactly which will be a lot easier than calculating the time based on the horizontal percentage.
[update]
Through discussion with iispyderii, I found the unsafeWindow Greasemonkey API object, so for as long as the variable in in the page, you can access it with
There may be more to it than that. This was all based on a brief 20-30 minute initial trial of MythMonger as I investigated and wrote this up.
The Firebug extension for Firefox was mighty helpful in all of this, and I'd recommend it if you're trying to write your own scripts.
Please ask any questions (and talk with each other) in the discussion board.



