Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Anonfagola's Move Bot
- //Randomly picks a move
- //5% chance of switching
- //No formulas or any of that shit
- $(document).ready(function(){
- //also anonfagolas cool random object finer
- $.fn.random = function(){
- return this.eq(Math.floor(Math.random() * this.length));
- }
- $(document).bind('DOMNodeInserted', function(e){
- var obj = $(e.target);
- if(obj.attr("class") == "controls"){
- var rand = Math.random() * 100;
- if(rand > 0.95 && $("[name=chooseMove]").length != 0 || $("[name=chooseSwitch]").length == 0){
- $("[name=chooseMove]").random().click();
- }else{
- $("[name=chooseSwitch]").random().click();
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment