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.
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..
Last edited by ob3; 03-27-2013 at 06:27 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.
You would need to use iMacros, not greasemonkey
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?
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('http://www.neopets.com/amfphp/gateway.php')
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:
(you need an account to see links)
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
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?
x,y for flash. It's not technically supported by iMacros unless you buy the paid version, so x,y is all we got.
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.
is : S without the space. not sure how to change thatURL GOTO=http://www.neopets.com/index.phtml
TAG POS=1 TYPE=A ATTR=TXT:Log<SP>in
WAIT SECONDS=1.5
TAG POS=1 TYPE=INPUTUBMIT FORM=ACTION:/login.phtml ATTR=VALUE:Log<SP>In!
WAIT SECONDS=3
URL GOTO=http://www.neopets.com/prehistoric/mediocrity.phtml
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
---------- 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
Odd it does in fact work on BD. I'll take a look at it tomorrow.