This is not mine! I am simply adding a random factor to reduce freeze chance! This is Wil_01's, found here Big and bold so I don't get in trouble, hopefully :yup: Link: Wil_01's is linked in his name, mine is in the following spoiler! Spoiler // ==UserScript== // @name Double Or Nothing Autoplayer // @namespace http://userscripts.org/users/83296 // @description Plays Double or Nothing for you, updated to randomize by Neofriends.net // @include http://www.neopets.com/medieval/doubleornothing.phtml* // ==/UserScript== var x = 1000 //change the page delay here; 1000 = 1 second var y = 6000 //max page delay; 1000 = 1 second var vtime; function timeout() { //timeout function if(document.body.innerHTML.indexOf('81,920 NP') != -1){ return } if(document.body.innerHTML.indexOf('Continue') != -1){ var button = document.evaluate('//form[contains(@action,"doubleornothing.phtml")]/input[@type = "submit" and @value = "Continue"]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0); button.click(); button.form.submit(); } if (document.body.innerHTML.indexOf('Try again...') != -1){ var button = document.evaluate('//form[contains(@action,"doubleornothing.phtml")]/input[@type = "submit" and @value = "Try again..."]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0); button.click(); button.form.submit(); } var links = document.evaluate("//a[@href]", document, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0; i < links.snapshotLength; ++i) { flip = links.snapshotItem(i); if (flip.href.match('doubleornothing.phtml.type=cointoss')) { document.location=flip.href; return; } } } vtime = Math.random()*y if (vtime <= x) { vtime += x; } window.setTimeout(timeout, vtime) Wil_01's Double Or Nothing Autoplayer Description This program autoplays Double or Nothing, both for the avatar and the highscore table. Taken from the userscript page: "It flips until the last flip of 81,920. Yes it will stop and you will get the last flip. I got the gold trophy easily with this one. Your chance of getting the neopoint is just a tiny bit less then the amount you "should" win so use this for the trophy only really. Good luck on the last flip :P" You can modify this script to get a set amount of NP (such as 320NP for the avvie), by editing 13th line. The max you can get is 81,920, so don't put in a higher value. It's not a variable because it's a small feature :P The edited area is in red in the spoiler above. Make SURE that it is 10 * (a multiple of 2), or it will never get there! Also, if the number is in the thousands, format it correctly. Have a comma, and do not put a space between the comma and the hundreds spot. For example: 10,240 NP I think I should note that this random function is written oddly. I don't actually know JavaScript, so it's a very janky method of writing. It will take a random number, and if it's below your value - it adds on your minimum value. So you'll rarely refresh at your minimum. While I don't know JS, this doesn't make the script more dangerous. I didn't mess with any data being sent to Neo! Main Features This script can get the avatar for you! This script can get you a trophy! This script randomizes the time between refreshes, making it more human like! ^Click for full size^ One last note: It stops before the last flip, so you can have the joy and anticipation of reaching the last flip. So be at your computer, and watch your Double or Nothing tab for when it stops refreshing, so you can do the last refresh ^^ It should only take 16,382 attempts, costing you 163,840 NP. So, on average, you lose money - but you get a trophy :maha:
Looks good, but is there not a way you can do the last flip and then auto end script, load up say neopian shops page (Any random link) and then stops everything. That way people can leave it on overnight and wake up with it done (probably best to release a seperate script for this if possible) <3
I looked into it just briefly, and it should be really easy to do But again, I'm not big on JS =P I'll look into it tomorrow, and I'll fix it then. It would also make it restart if it fails the last flip, which would be better for people seeking the avatar! If I released a separate script for this, would I just highlight the original script in green? With such a small script, that would be about 50/50 on contributions
It's fine, just send him a PM or whatever via userscripts about it, and make sure you credit him as the original author/whatever is due credit in the description of the final script. You can upload to downloads section of NF if you'd like.