Skip to content

Instantly share code, notes, and snippets.

@DirkyJerky
Last active February 13, 2024 13:53
Show Gist options
  • Save DirkyJerky/a42579b1583ddf75483f to your computer and use it in GitHub Desktop.
Save DirkyJerky/a42579b1583ddf75483f to your computer and use it in GitHub Desktop.
Enter all the raffles on http://scrap.tf/raffles
ScrapTF.Raffles.Pagination.LoadNext();
ScrapTF.Raffles.Pagination.LoadNext();
ScrapTF.Raffles.Pagination.LoadNext();
var i = 0;
var list;
setTimeout(function() {
list = document.getElementById("raffles-list").children;
list = [].filter.call(list, function(j) {
if (j.getAttribute("style") == "") {
return true;
} else {
return false;
}
});
}, 3000);
function raffleLoop() {
setTimeout(function() {
raffleID = list[i].getAttribute("id").substring(11);
ScrapTF.Ajax("viewraffle/EnterRaffle", {
raffle: raffleID,
captcha: "",
rafflekey: undefined,
password: ""
}, function(data) {
console.log("Entered Raffle " + raffleID)
}, function(data) {
console.error("Cound not enter Raffle " + raffleID);
});
i++;
if (i < list.length) {
raffleLoop();
} else {
console.log("All Raffles Queued");
}
}, 500);
}
setTimeout(function() {
raffleLoop()
}, 3000);
@Taazar
Copy link

Taazar commented Aug 18, 2015

Its not working for me, i run it in console and it says its joining all the raffles but when it finishes and i refresh im not in any

Edit: Nvm I figured out you have to have all the raffles open in other tabs so it's not as quick as I thought it was but its still a lot better than manually entering them all.

@berkstar
Copy link

How can I use it

@Taazar
Copy link

Taazar commented Sep 28, 2015

You need all the raffles opened in other tabs, then put the code into the console, for Firefox that's right click, inspect element (or Q) and then console, then copy and paste this.

BTW I have no idea what ScrapTF.Ajax is doing, can someone explain it please?

@TBotV63
Copy link

TBotV63 commented Nov 9, 2015

@Taazar It's essentially just a wrapper around jQuery.ajax(...) that has some error handling. It also prefills a bunch of generic arguments on the ajax call. (And showcases terrible API design by using POST for literally everything)

@DonJerky
Copy link

Is not working, you'll have an update?

@Kankronic
Copy link

works for me

@SloRunner
Copy link

not working anymore :D they added that captcha -_- gonna fix it myself :)

@boi444
Copy link

boi444 commented Jan 3, 2021

how do u remove captcha then i tried just deletin it from the script but it didnt work so wat do i do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment