brut4l

Plemiona 2

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