Advertisement
Guest User

Anty duszek margonem

a guest
Mar 31st, 2020
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Anty-Duszek
  3. // @version 0.5
  4. // @description Wychodzenie z trybu nieaktywności na SI oraz NI;
  5. // @author Patix0331
  6. // @match http://*.margonem.pl
  7. // ==/UserScript==
  8.  
  9. // Jeśli coś się buguje, pisać - poprawię.
  10. (() => {
  11. setInterval(() => {
  12. const isSi = getCookie("interface") == "si" ? true : false;
  13. const afk = isSi ? hero.stasis:Engine.hero.d.stasis;
  14. const dead = isSi ? g.dead:Engine.dead;
  15. const battle = isSi ? g.battle:Engine.pvp;
  16. if (!afk) return;
  17. const url = isSi
  18. ? `http://${g.worldname}.margonem.pl/engine?t=_&ml=${hero.x},${hero.y + 1}&mts=${unix_time() + 0.2}&ev=${unix_time()}&browser_token=${g.browser_token}&aid=${getCookie("user_id")}`
  19. : `http://${Engine.worldName}.margonem.pl/engine?t=_&ml=${Engine.hero.d.x},${Engine.hero.d.y - 1}&mts=${unix_time() + 0.2}&aid=${getCookie("user_id")}&ev=${unix_time()}&browser_token=${Engine.browserToken}`;
  20. fetch(url)
  21. .then(response => response.json())
  22. .then(x => {
  23. if (!dead && !battle) location.reload();
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement