Advertisement
Guest User

asdasd

a guest
Apr 1st, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Margo(Anty-Duszek): SI
  3. // @version 1.0
  4. // @description Wychodzenie z trybu nieaktywności.
  5. // @author Marcel
  6. // @match http://*.margonem.pl
  7. // @updateURL https://pastebin.com/raw/1epARD5w
  8. // @downloadURL https://pastebin.com/raw/1epARD5w
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. const checkIfStasis = () => {
  13. if (!g.battle && hero.stasis && !g.dead) {
  14. return true;
  15. }
  16. return false;
  17. };
  18.  
  19. const moveHero = () => {
  20. let x = hero.x;
  21. let y = hero.y;
  22. setTimeout(() => {
  23. g(`&ml=${x},${y - 1}&mts=${g.ev});
  24. }, 1000);
  25. _g(_&ml=${x},${y + 1}&mts=${g.ev}`);
  26. };
  27.  
  28. const antiStasis = () =>
  29. setInterval(() => {
  30. if (!checkIfStasis()) {
  31. return;
  32. }
  33. moveHero();
  34. }, 1000);
  35.  
  36. g.loadQueue.push({
  37. fun: antiStasis
  38. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement