Advertisement
Guest User

margonem skrypty

a guest
Sep 27th, 2021
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Dodatki do gry Margonem np.wylogowywanie na AntyCapchty
  3. // @version 1.00
  4. // @match *://*/
  5. // @match *://www.margonem.pl/*
  6. // ==/UserScript==
  7.  
  8. /* Wylogowywanie na capchty */
  9. setInterval(()=>{
  10. if(document.getElementById("captcha").style.display == "block"){
  11. document.location.href = `https://www.margonem.pl/`;
  12. }},10000)
  13.  
  14. /* Wylogowywanie po złym rozwiązaniu capchty */
  15. setInterval(()=>{
  16. if(document.getElementById("captcha_timer").style.display == "block"){
  17. document.location.href = `https://www.margonem.pl/`;
  18. }},10000)
  19.  
  20. /* Wylogowywanie na 0 wyczerpie */
  21. setInterval(()=>{
  22. if(window.hero.ttl < 0){
  23. document.location.href = `https://www.margonem.pl/`;
  24. window.alert("Brak Wyczerpania!!!")
  25. }},3000)
  26.  
  27. /* f5 u tuni */
  28. setInterval(()=>{
  29. if(map.name=="Dom Tunii"){
  30. window.location.reload();
  31. }},10000)
  32.  
  33. /* F5 bez kapczy */
  34. (() => {
  35. const sleep = (time) => {
  36. return new Promise((resolve) => setTimeout(resolve, time));
  37. };
  38.  
  39. const oldParse = parseInput;
  40. let refresh = false;
  41. parseInput = (data, a, b) => {
  42. refresh = false;
  43. oldParse(data, a, b);
  44. };
  45.  
  46. (async () => {
  47. while (true) {
  48. await sleep(3000);
  49. if (refresh && document.getElementById("captcha").style.display != "block") {
  50. location.reload();
  51. }
  52. refresh = true;
  53. }
  54. })();
  55. })();
  56.  
  57. /* antyduszek */
  58. const checkIfStasis = () => {
  59. if (!g.battle && hero.stasis && !g.dead) {
  60. return true;
  61. }
  62. return false;
  63. };
  64.  
  65. const moveHero = () => {
  66. _g(`_&ml=${hero.x},${hero.y + 1}&mts=${g.ev}`);
  67. };
  68.  
  69. const antiStasis = () =>
  70. setInterval(() => {
  71. if (!checkIfStasis()) {
  72. return;
  73. }
  74. moveHero();
  75. }, 1000);
  76.  
  77. g.loadQueue.push({
  78. fun: antiStasis
  79. });
  80.  
  81. /* Usuwa reklamę ni */
  82. !function() {
  83. let $style = document.createElement("style");
  84. $style.innerHTML = "#ni-promo { display: none; }";
  85. document.head.appendChild($style);
  86. }();
  87. /* Zamykanie walki */
  88. setInterval(()=>{
  89. if(window.$('#battletimer')[0].innerText == "Walka zakończona." && window.$('#battle')[0].style.display == "block"){
  90. window.$("#battleclose").click();
  91. }},1000)
  92.  
  93. /* Jeżeli ma 30% hp f5 */
  94. setInterval(()=>{
  95. if((hero.hp / hero.maxhp) * 100 < 30) {
  96. window.location.reload();
  97. }},5000)
  98.  
  99. /* Zakaz wylogowywania przy pomocy przycisku wyloguj */
  100. setInterval(()=>{
  101. if(document.getElementsByClassName("a2"))
  102. window.$("#a_cancel").click();
  103. },1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement