Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Anty-Duszek
  3. // @namespace https://discord.gg/53dqXch
  4. // @version 0.5
  5. // @description Wychodzenie z trybu nieaktywności na SI oraz NI;
  6. // @author JEBAĆ SEBEEE
  7. // @match http://*.margonem.pl
  8. // ==/UserScript==
  9.  
  10. // Jeśli coś się buguje, pisać - poprawię.
  11. (() => {
  12. setInterval(() => {
  13. const isSi = getCookie("interface") == "si" ? true : false;
  14. const afk = isSi ? hero.stasis:Engine.hero.d.stasis;
  15. const dead = isSi ? g.dead:Engine.dead;
  16. const battle = isSi ? g.battle:Engine.pvp;
  17. if (!afk) return;
  18. const url = isSi
  19. ? `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")}`
  20. : `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}`;
  21. fetch(url)
  22. .then(response => response.json())
  23. .then(x => {
  24. if (!dead && !battle) location.reload();
  25. });
  26. }, 400);
  27. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement