Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Anty-Duszek
- // @version 0.5
- // @description Wychodzenie z trybu nieaktywności na SI oraz NI;
- // @author Patix0331
- // @match http://*.margonem.pl
- // ==/UserScript==
- // Jeśli coś się buguje, pisać - poprawię.
- (() => {
- setInterval(() => {
- const isSi = getCookie("interface") == "si" ? true : false;
- const afk = isSi ? hero.stasis:Engine.hero.d.stasis;
- const dead = isSi ? g.dead:Engine.dead;
- const battle = isSi ? g.battle:Engine.pvp;
- if (!afk) return;
- const url = isSi
- ? `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")}`
- : `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}`;
- fetch(url)
- .then(response => response.json())
- .then(x => {
- if (!dead && !battle) location.reload();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement