Advertisement
Guest User

2strona

a guest
Feb 20th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. // ==UserScript==
  2. // @name FARMA test
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @include https://*.plemiona.pl/game.php?village=*&screen=am_farm&order=distance&dir=asc&Farm_page=1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var arr=$("a.farm_icon_a" ),
  12. i=0;
  13.  
  14.  
  15. (function rT() {
  16. setTimeout(function(){
  17. $(arr[i++]).click();
  18. if(i>arr.length)
  19. return;
  20. rT();
  21. },getRandomArbitary(400, 1200));
  22. })();
  23.  
  24. setTimeout(function() {
  25. location.reload();
  26. }, getRandomArbitary(35 * 60, 50 * 60) * 1000);
  27.  
  28. function getRandomArbitary(min, max) {
  29. return Math.random() * (max - min) + min;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement