PDA

View Full Version : Wheel of Mediocrity Script Request



ob3
03-27-2013, 04:33 PM
Just looking for a simple script that will open a new tab with the wheel in firefox every 40 minutes and spin the wheel (and log me in??) using Greasemonkey. Some explanation would be helpful too so that I can adapt it for other uses!!

Thank you!

Please move if this is in the wrong section

Also, I have a decent understanding of coding so don't be afraid to throw some words and concepts at me..

Graff
03-27-2013, 06:50 PM
As far as I know, greasemonkey doesn't handle flash applications so I don't think what you want to do is possible with simple scripts.

wrath
03-27-2013, 06:53 PM
You would need to use iMacros, not greasemonkey

ob3
03-27-2013, 08:36 PM
Fair enough, I do have some decent experience with iMacros as well, but it can't really handle logic statments or anything so I'm not sure how to do the login.. perhaps logout everytime so it knows it has to log in?

wrath
03-27-2013, 08:46 PM
Fair enough, I do have some decent experience with iMacros as well, but it can't really handle logic statments or anything so I'm not sure how to do the login.. perhaps logout everytime so it knows it has to log in?

Yep, I'd recommend starting the Macro with logging in, then navigating to WoM, spinning it, collecting prize, then logging off. Once you do that, then just add:
WAIT SECONDS=2400

Play (Loop) and win.

DarkByte
03-27-2013, 08:56 PM
This game uses a amf packet:





def process_wheelofknol(self):
#Process wheel of knoledge
print "knol"
self.wheelofknoltime = time.time()
self.newsql.setsetting("wheelofknoltime",time.time()) #Save Settings

self.gateway = RemotingService('[Only registered and activated users can see links]')
self.gateway.opener = self.acc.opener.open

WheelService = self.gateway.getService('WheelService')
html = WheelService.spinWheel("1")
if (html.find("You win a free spin.")) > 1:
self.process_wheelofknol()


###bad logic

elif (html.find("'slot': 12")) > 1:
return 1 # just a game tip , no dice
elif (html.find("'slot': 8")) > 1:
return 1 # just a game tip , no dice













elif (html.find("Your Neopet has been healed")) > 1:


html="Active Neopet Healed"
sql = "INSERT INTO dailylogs(id,logname, logresult , userid , username) VALUES (NULL,'Wheel Of Knoledge','%s','%s','%s')" % (html,str(self.theuserid),self.acc.user)
self.newsql.insertsql(sql)

elif (html.find("Not everyone is as lucky as you")) > 1:


html="Won item (standard)"
sql = "INSERT INTO dailylogs(id,logname, logresult , userid , username) VALUES (NULL,'Wheel Of Knoledge','%s','%s','%s')" % (html,str(self.theuserid),self.acc.user)
self.newsql.insertsql(sql)





print html
extrainfo= ""
filename = "wheelofknol_" + str(time.time())
self.writestringtofile(filename,html)





Here is the encoded url:

[Only registered and activated users can see links] heel%22%0%2%47%49%0%0%0%9%10%0%0%0%1%2%0%1%225%22

This must be sent as a post request , not get! Hope that makes things easier. Above is wheel of knol , just change the wheel id

ob3
03-27-2013, 10:31 PM
oh man.. that was a little over my head haha
if i make it in iMacros, when I spin and collect, is there a better command to use than a click x,y sorta thing? or is that my best bet?

wrath
03-27-2013, 10:38 PM
x,y for flash. It's not technically supported by iMacros unless you buy the paid version, so x,y is all we got.

ob3
03-27-2013, 11:55 PM
awesome, thanks so much for your help

Here is what I made, feel free to use/spread/make better. The wait times are probably pretty conservative/unnecessary. The X and Y will likely have to be changed depending on your screen.



URL GOTO=[Only registered and activated users can see links]
TAG POS=1 TYPE=A ATTR=TXT:Log<SP>in
WAIT SECONDS=1.5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/login.phtml ATTR=VALUE:Log<SP>In!
WAIT SECONDS=3
URL GOTO=[Only registered and activated users can see links]
WAIT SECONDS=5
CLICK X=1048 Y=539
WAIT SECONDS=25
CLICK X=1048 Y=539
WAIT SECONDS=4
TAG POS=1 TYPE=B ATTR=TXT:Logout
WAIT SECONDS=2400

:S is : S without the space. not sure how to change that

---------- Post added 03-28-2013 at 12:55 AM ---------- Previous post was 03-27-2013 at 11:48 PM ----------

hmm the x y click doesn't seem to work

wrath
03-28-2013, 01:15 AM
Odd it does in fact work on BD. I'll take a look at it tomorrow.

ob3
03-28-2013, 01:36 AM
Agreed, I made one a few weeks back to beat on punchbag bob for me using x y and it worked fine

thanks

ashley121295
04-03-2013, 06:18 PM
is this the wheel that takes forever to stop? if so, it took about 3-4 hours to stop 4me. i wont wait up on that thing again unless i do it in the morning and leave the web page up.

wrath
04-03-2013, 06:19 PM
is this the wheel that takes forever to stop? if so, it took about 3-4 hours to stop 4me. i wont wait up on that thing again unless i do it in the morning and leave the web page up.

No that's the wheel of monotony. We're talking about the other one in Tyrannia hosted by a flotsam.