brut4l

Plemiona

May 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. // ==UserScript==// ==UserScript==
  2. // @name AutoataczkiB
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2.2
  5. // @description Pierdolic zasady
  6. // @author rEcho_
  7. // @match https://*.plemiona.pl/game.php?village=*&screen=am_farm&order=distance&dir=bsc*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. var x= document.getElementById("light").innerHTML;
  13. var y= document.getElementById("heavy").innerHTML;
  14. function gotopage(){
  15. var x= document.getElementById("light").innerHTML;
  16. var y= document.getElementById("heavy").innerHTML;
  17. var groupneeds = 201;
  18. if(x < groupneeds && y < groupneeds){
  19. var lynkup = document.getElementById("village_switch_right").href.split("Farm_page");
  20. lynkup[1]= "=0";
  21. lynk = lynkup[0]+lynkup[1];
  22. window.open(lynk,"_self");
  23. }else{
  24. var lynk = document.getElementsByClassName("paged-nav-item")[1].href;
  25. if(lynk === undefined){
  26. var lynkup = document.getElementById("village_switch_right").href.split("Farm_page");
  27. lynkup[1]= "=0";
  28. lynk = lynkup[0]+lynkup[1];
  29. }
  30. window.open(lynk,"_self");
  31. }}
  32. 'use strict';
  33.  
  34.  
  35. (function (){$("a.farm_icon_c, a.farm_icon_b, a.farm_icon_a").click(function() {$(this).closest("tr").remove();});})();
  36. function atfarm(){
  37. var evt = document.createEvent("MouseEvents");
  38. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  39. if(!undefined){var typ = "b"}
  40. var gt = document.getElementsByClassName("farm_icon_"+typ);
  41. gt[1].dispatchEvent(evt);
  42. if(gt[1]=== undefined){
  43. gotopage();
  44. }
  45. else{
  46. var timez = parseInt(270+(Math.random()*100*Math.random()));
  47. console.log(timez);
  48. setTimeout(atfarm, timez);}
  49. }
  50. atfarm();
  51.  
  52.  
  53. })();
  54. // @name New Userscript
  55. // @namespace http://tampermonkey.net/
  56. // @version 0.1
  57. // @description try to take over the world!
  58. // @author You
  59. // @match https://pl106.plemiona.pl/game.php?village=53444&screen=mail&mode=view&view=2942084&group_id=0
  60. // @grant none
  61. // ==/UserScript==
  62.  
  63. (function() {
  64. 'use strict';
  65.  
  66. // Your code here...
  67. })();
Add Comment
Please, Sign In to add comment