Skip to content

Instantly share code, notes, and snippets.

@freundTech
Last active August 29, 2015 14:12
Show Gist options
  • Save freundTech/6429dab2aa84b0a8a77f to your computer and use it in GitHub Desktop.
Save freundTech/6429dab2aa84b0a8a77f to your computer and use it in GitHub Desktop.
[Outdated] JesperTheEnd Number 1337-Bot
leet = 1337;
i = setInterval(function() {
$oldNumber=$("#number").html();
$oldNumber=parseInt($oldNumber);
if($oldNumber>leet) {
$action = "decrease";
} else if($oldNumber<leet) {
$action = "increase";
} else {
return;
}
$.ajax({
url: 'action.php',
type: 'POST',
data: {
action: $action
},
success: function(result) {
switch(result){
case "0":
$("body").css("background","black");
$txtColor="white";
break;
case "420":
$("body").css("background","url(http://i.imgur.com/dpAHscB.png)");
$("body").css("background-size","cover");
$txtColor="rgb(205,42,0)";
break;
case "666":
$("body").css("background","url(http://i.imgur.com/pvdccdz.jpg)");
$("body").css("background-size","cover");
break;
case "1337":
$("body").css("background","url(http://i.imgur.com/gHAD3Ta.jpg)");
$("body").css("background-size","cover");
$txtColor="rgb(0,255,0)";
break;
default:
$("body").css("background","");
$txtColor="black";
}
$("#info").css("color",$txtColor);
if($oldNumber<result){
animate(1.1,"green");
}
if($oldNumber>result) {
animate(0.9,"red");
}
$("#number").html(result);
}
});
}, 110)
@freundTech
Copy link
Author

Fixed to work with the newest version + reduced speed to not get ip-banned :P

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