Skocz do zawartości

Boty Do Margonem


Ritru
# CSH External VIP Project

Masz dosyć problemów z czynnikiem zaufania w CS2 lub notorycznymi banami?

Sprawdź CSH External VIP Project.


Więcej informacji  

Rekomendowane odpowiedzi

Siema,

 

nastąpiła taka sytuacja iż udostępniłem bota mojemu znajomemu miało to zostać dla niego on to wysłał dalej, to postanowiłem udostępnić boty skrypty które są przydatne i na pewno pomogą, jeżeli już te pare osób to posiada to udostępnię to ja dla tych osób co jeszcze nie korzystało.

 

Na samym początku mówię do osób które się nie znają lub się obawiają, jeżeli się boisz wytestuj na losowym koncie dopiero założonym 1 lvl itp.

 

W jaki sposób zainstalować!

  1. Pobieram rozszerzenie do przeglądarki: Tampermonkey 
  2. Kopiujesz kod (cały)
  3. Klikasz na Tampermonkeya, dodaj nowy skrypt i wklejasz cały kod od samego początku do końca i zapisz.

Tutaj boty, skrypty które posiadam jeżeli coś będę miał dodam również.

 

1. F5 podczas laga ( gdy dostaniesz laga neta itp ). Przydatne do expienia na bocie

Spoiler
// ==UserScript==
// @name         Odświeżenie podczas laga.
// @version      1.1
// @description  Odświeża Ci margona, jak masz tzw. laga.
// @author       adi wilk
// @match        *://*/
// @match        *://www.margonem.pl/*
// @grant        none
// ==/UserScript==

!function(_parseInput) {
    var idleTime = 0;
    var firstTime = true;
    parseInput = function(a, b, c) {
        _parseInput(a, b, c);
        if (firstTime) {
            setInterval(function() {
                idleTime++;
                if (idleTime > 5) {
                    idleTime = 0;
                    window.location.reload();
                }
            }, 1000);
            firstTime = false;
        }
        idleTime = 0;
    }
}(parseInput)

 

2. Najszybsze przechodzenie przez mapy dotychczas w grze

Spoiler
// ==UserScript==
// @name         NAJLEPSZE PRZECHODZNIE
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       adi wilk
// @match        *://*/
// @match        *://www.margonem.pl/*
// @grant        none
// ==/UserScript==

window.g.loadQueue.push({fun(){let a=window.getCookie("mchar_id"),d=!1,e=!1;const f=window._g;window._g=(a,b)=>{e||f(a,b)};const g=window.parseInput,h=a=>new Promise(b=>{fetch(`/engine?t=init&initlvl=${a}&clientTs=${new Date().getTime()/1e3}&mucka=${Math.random()}&aid=${window.g.aid}${window.g.browser_token?`&browser_token=${window.g.browser_token}`:``}`,{method:"POST",credentials:"same-origin"}).then(a=>a.json()).then(a=>b(a)).catch(()=>b())}),i=a=>{const b={};return Object.keys(a).forEach(a=>{b[a]={del:!0}}),b},j=(a=!1)=>{const b={};for(const[c,{loc:d}]of Object.entries(window.g.item))("g"!==d||!0===a)&&(b[c]={del:!0});return b},k=()=>{const a={};a.npc=i(window.g.npc),a.item=j(),a.other=i(window.g.other),window.parseInput(a),window.g.chat.lastwrite="",window.g.chat.tabs=[[],[],[],[]],window.g.gw={},document.querySelectorAll(".gw, .rip").forEach(a=>a.remove()),document.querySelector("#ground").style.background="gray",document.querySelector("#bground").style.background="gray",document.querySelector("#chattxt").innerHTML=""},l=async()=>{if(!0===e)return;let b=!1;e=!0,window.g.gameLoader=new window.GameLoader,k();for(let c=1;5>c;c++){const d=await h(c);if(d.hasOwnProperty("h")&&d.h.hasOwnProperty("id")&&(d.h.id===parseInt(a)?b=!0:(a=d.h.id,g({item:j(!0)}))),!0==b&&d.hasOwnProperty("item")){for(const[a,{loc:b}]of Object.entries(d.item))"g"===b&&delete d.item[a];b=!1}window.parseInput(d),2==c&&window.map.center(32*window.hero.x,32*window.hero.y-16)}e=!1,q=!0};window.parseInput=(a,e,b)=>{const{logoff_time_left:c,t:f}=a;c!==void 0&&(d=5===c),"reload"===f&&!1===d&&(delete a.t,delete window.g.browser_token,l()),g(a,e,b)};const m=()=>{for(const a of Object.keys(window.g.gw)){const[b,c]=a.split(".");if(window.hero.x===parseInt(b)&&window.hero.y===parseInt(c))return!0}return!1},n=document.createElement("div");n.appendChild(document.createTextNode("Przechod\u017A szybciej przez mapki nie tylko na red")),n.style.backgroundPosition="0px -22px",document.querySelector("#cfg_options").appendChild(n),n.addEventListener("click",()=>{!0===JSON.parse(localStorage.getItem("adi-szybkie-przechodzenie"))?(localStorage.setItem("adi-szybkie-przechodzenie",JSON.stringify(!1)),n.style.backgroundPosition="0px 0px"):(localStorage.setItem("adi-szybkie-przechodzenie",JSON.stringify(!0)),n.style.backgroundPosition="0px -22px")}),null===localStorage.getItem("adi-szybkie-przechodzenie")?localStorage.setItem("adi-szybkie-przechodzenie",JSON.stringify(!0)):!0===JSON.parse(localStorage.getItem("adi-szybkie-przechodzenie"))?n.style.backgroundPosition="0px -22px":n.style.backgroundPosition="0px 0px";const o=()=>{const a=window.road.length;if(0<a)return window.road[a-1]},p=a=>{if(a!==void 0){const{x:b,y:c}=a;if(window.hero.x!==b||window.hero.y!==c)return!1}return!0};let q=m();window.hero=new Proxy(window.hero,{set(a,b){const c=o();Reflect.set(...arguments);const d=JSON.parse(localStorage.getItem("adi-szybkie-przechodzenie"));["x","y"].includes(b)&&(!0===d||!1===d&&2===window.map.pvp)&&(m()?!1===q&&!1===e&&p(c)&&window._g("walk"):!0===q&&(q=!1))}})}});

 

 

3. Auto dobijanie w lewym górnym klikasz atakuj na danego gracz i dobija oraz pościg za graczem

Spoiler
// ==UserScript==
// @name         Auto Dobijanie i Pościć za graczem
// @version      1.1 bo sie jeblem
// @description  pomaga w zabijaniu
// @author       autor
// @match        *://*/
// @match        *://www.margonem.pl/*
// @grant        none
// ==/UserScript==

(function(d, _p, _nP, _r, _bM) {
    let tmparr = new Array();
    //elementy graficzne
    let box = d.createElement("span");
    box.id = "enepere123";
    box.style = "position: absolute; background: black; color: white; top: 0px; left: 0px; width: auto; height: auto; font-size: 14px";
    d.body.appendChild(box);
    let uciek = d.createElement("span");
    uciek.innerHTML = "UCIECZKA";
    uciek.style.fontWeight = "bold";
    uciek.tip = "Naci�nij podczas walki, aby po walce automatycznie uciec na Kwieciste Przej�cie.";
    //zmienne dla ucieczki
    let isUcieczka = false;
    let idZwoja;
    window.hero.searchPath1 = function(a, t) {
                if (this.isBlockedSearchPath()) return this.blockedInfoSearchPath();
                for (var h = [], i = 128 & hero.opt ? 8 : 20, r = Math.max(0, Math.min(a, this.x) - i), s = Math.min(map.x - 1, Math.max(a, this.x) + i), o = Math.max(0, Math.min(t, this.y) - i), e = Math.min(map.y - 1, Math.max(t, this.y) + i), d = r - 1; s + 1 >= d; d++) {
                    h[d] = [];
                    for (var x = o - 1; e + 1 >= x; x++) h[d][x] = !(d >= r && s >= d && x >= o && e >= x) || isset(g.npccol[d + 256 * x]) || map.col && "0" != map.col.charAt(d + x * map.x) ? -2 : -1
                }
                h[this.x][this.y] = 0, b = -1, road = [];
                for (var c = {
                    x: -1,
                    y: -1,
                    dist: 99
                }, y = 1; s - r + e - o + 3 > y; y++)
                    for (var d = r; s >= d; d++)
                        for (var x = o; e >= x; x++) {
                            if (-1 != h[d][x] || h[d][x - 1] != y - 1 && h[d][x + 1] != y - 1 && h[d - 1][x] != y - 1 && h[d + 1][x] != y - 1 || (h[d][x] = y), h[a][t] > 0) {
                                d = s + 1;
                                break
                            }
                            c.dist2 = Math.abs(a - d) + Math.abs(t - x), h[d][x] == y && c.dist2 < c.dist && (c.x = d, c.y = x, c.dist = c.dist2)
                        }
                if (c.hdist = Math.abs(a - hero.x) + Math.abs(t - hero.y), h[a][t] > 0 || c.dist < c.hdist) {
                    h[a][t] < 0 && (a > c.x ? b = 2 : a < c.x ? b = 1 : t > c.y ? b = 0 : t < c.y && (b = 3), a = c.x, t = c.y), road[0] = {
                        x: a,
                        y: t
                    };
                    for (var f = h[a][t] - 1, l = a, m = t; f > 0; f--) h[l][m - 1] == f ? m-- : h[l][m + 1] == f ? m++ : h[l - 1][m] == f ? l-- : h[l + 1][m] == f ? l++ : f = 0, f && (road[h[a][t] - f] = {
                        x: l,
                        y: m
                    })
                }
                road.length > 1 && null == g.playerCatcher.follow && $("#target").stop().css({
                    left: 32 * a,
                    top: 32 * t,
                    display: "block",
                    opacity: 1
                }).fadeOut(1e3)
            };
    uciek.addEventListener("click", function() {
        if (g.battle) {
            if (!isUcieczka) {
                for (let i in g.item) {
                    if (g.item[i].loc == "g" && g.item[i].name == "Zw�j teleportacji na Kwieciste Przej�cie") {
                        isUcieczka = true;
                        idZwoja = i;
                        uciek.style.color = "green";
                        uciek.innerHTML = "UCIECZKA AKTYWNA";
                        break;
                    }
                }
            } else {
                uciek.style.color = "white";
                uciek.innerHTML = "UCIECZKA";
                isUcieczka = false;
            }
        }
    });
    box.appendChild(uciek);
    let dane = d.createElement("span");
    box.appendChild(dane);
    let style = d.createElement("style");
    style.innerHTML = ".adison9711:hover{background:#686868}";
    d.head.appendChild(style);
    //zmienna numeracji
    let number;
    //zmienne dla poscigu
    let oid = 0;
    let ox;
    let oy;
    let hx;
    let hy;
    let walczacy = [];
    //anulowanie poscigu
    d.querySelector("#nick").addEventListener("click", function() {
        if (oid != 0) {
            oid = 0;
            message(`Przerwae pocig!`);
        }
    });
    //zmienne dla hero/tytan i syrena
    let audio = new Audio();
    audio.src = "http://www.adiwilk.pl/js/syrena.mp3";
    let szczur = d.createElement("span");
    szczur.id = "adison_zarcik";
    szczur.style = "position: absolute; background-color: blue; top: 100px; right: 100px; color: white; font-size: 35px; display: none; text-align: center; padding: 10px; cursor: pointer";
    szczur.innerHTML = "Wy��cz syren�";
    d.body.appendChild(szczur);
    szczur.addEventListener("click", function() {
        szczur.style.display = "none";
        audio.pause();
    });

    //stworzenie spana dla osoby
    function wyjebPodswietlenie() {
        for (let i in g.other) {
            d.querySelector(`#other${i}`).style.backgroundColor = "";
        }
    }

    function createOtherSpan(nr, id, nick, relacja, lvl, profa, prawa) {
        //caly div
        let sp = d.createElement("span");
        sp.classList.add("adison9711");
        sp.innerHTML = `<br>${nr}. `;
        //nick i relacja(style tez)
        let nickname = d.createElement("span");
        nickname.innerHTML = `${nick}`;
        nickname.tip = "Naci�nij, aby napisa� do tej osoby.";
        nickname.addEventListener("click", function() {
            chatTo(`${nick}`);
        });
        nickname.style.fontWeight = "bold";
        if (prawa > 0) {
            nickname.style.color = "gold";
        }
        switch (relacja) {
            case "fr":
                nickname.style.color = "green";
                break;
            case "en":
                nickname.style.color = "red";
                break;
            case "cl":
                nickname.style.color = "lightblue";
                break;
        }
        sp.appendChild(nickname);
        //lvl i profa
        let lvlpr = d.createElement("span");
        lvlpr.innerHTML = ` ${lvl}${profa} `;
        sp.appendChild(lvlpr);
        //odleglosc
        let odle = d.createElement("span");
        let licz = Math.round(Math.sqrt(Math.pow(g.other[id].x - hero.x, 2) + Math.pow(g.other[id].y - hero.y, 2)));
        odle.innerHTML = `[Odl.: ${licz}] `;
        odle.tip = "Naci�nij, aby podej��."
        odle.addEventListener("click", function() {
            window.hero.searchPath1(g.other[id].x, g.other[id].y);
        });
        sp.appendChild(odle);
        //poscig
        let forposcig = d.createElement("span");
        forposcig.innerHTML = `[ATAKUJ]`;
        forposcig.tip = "Naci�nij, aby aktywowa� po�cig."
        forposcig.addEventListener("click", function() {
            if (!g.battle) {
                if (map.pvp == 2) {
                    oid = id;
                    message(`Rozpoczto pocig za: ${g.other[id].nick}!`);
                } else {
                    message(`Nie jeste na czerwonej mapce!`);
                }
            } else {
                message(`Trwa walka!`);
            }
        });
        sp.appendChild(forposcig);
        //kolorek dla postaci po najechaniu
        sp.addEventListener("mouseover", function() {
            wyjebPodswietlenie();
            d.querySelector(`#other${id}`).style.backgroundColor = "rgb(255, 102, 0, .65)";
            d.querySelector(`#other${id}`).style.borderRadius = "7px";
        });
        sp.addEventListener("mouseleave", function() {
            if (g.other[id]) d.querySelector(`#other${id}`).style.backgroundColor = "";
        });
        dane.appendChild(sp);
    }
    //kreacja div'a
    function createDiv() {
        number = 1;
        dane.innerHTML = "";
        for (let i in g.other) {
            let litera = "";
            if (number < 10) litera = `0${number}`;
            else litera = number;
            let o = g.other[i];
            if (o.nick === undefined) continue;
            createOtherSpan(litera, o.id, o.nick, o.relation, o.lvl, o.prof, o.rights);
            number++;
        }
    }

    function createMessage(id) {
        let npc = g.npc[id];
        if (npc.wt > 99) {
            //tytan
            audio.play();
            szczur.style.display = "block";
            message(`<center>Tytan: ${npc.nick} ${npc.lvl}lvl<br><img src=${npc.icon} /><br>[${npc.x}, ${npc.y}]</center>`);
        } else {
            //heros
            let odl = Math.sqrt(Math.pow(Math.abs(hero.x - npc.x), 2)) + Math.sqrt(Math.pow(Math.abs(hero.y - npc.y), 2));
            if (!g.battle && odl > 8) {
                mAlert(`<center>Heros:<br><img src=${npc.icon} /><br><b>${npc.nick}</b> ${npc.lvl}lvl<br>${map.name}(${npc.x},${npc.y})<br>Czy chcesz podej��?</center>`, 2, [function() {
                    if (miniMapPlus) {
                        miniMapPlus.searchPath(npc.x, npc.y);
                    } else {
                        window.hero.searchPath1(npc.x, npc.y);
                    }

                }, function() {
                    return false;
                }]);
            } else {
                message(`<center>Heros: ${npc.nick} ${npc.lvl}lvl<br><img src=${npc.icon} /><br>[${npc.x}, ${npc.y}]</center>`);
            }
        }
    }
    //funkcje podstawowe
    parseInput = function(a, b, c) {
        _p(a, b, c);
        //dodanie do tablicy walczacych graczy
        if (a.hasOwnProperty("emo")) {
            for (let i in a.emo) {
                if (a.emo[i].name == "battle" && !walczacy.includes(a.emo[i].source_id)) {
                    walczacy.push(a.emo[i].source_id);
                } else if (a.emo[i].name != "battle" && walczacy.includes(a.emo[i].source_id)) {
                    walczacy.splice(walczacy.indexOf(a.emo[i].source_id), 1);
                }
            }
        }
        d.querySelector("#enepere123").style.width = d.querySelector("#centerbox").style.left;
        createDiv();
    }
    newNpc = function(e) {
        _nP(e);
        for (let i in e) {
            if (e[i].wt > 79 && map.mode != 5 && g.worldname != "experimental" && !tmparr.includes(e[i].id)) {
                createMessage(i);
                tmparr.push(e[i].id);
                break;
            }
        }
    }
    hero.run = function() {
        if (oid != 0) {
            if (g.other[oid]) {
                ox = g.other[oid].x;
                oy = g.other[oid].y;
                hx = hero.x;
                hy = hero.y;
                if (!g.battle) {
                    if (Math.abs(hx - ox) <= 2 && Math.abs(hy - oy) <= 2) {
                        if (!walczacy.includes(Number(oid))) _g(`fight&a=attack&id=${oid}`);
                    }
                    if (hx != ox || hy != oy) {
                        window.hero.searchPath1(ox, oy);
                    }
                } else {
                    oid = 0;
                    message(`Jest walka!`);
                }
            }
        }
        _r.apply(this, arguments);
    }

    let chudsada;
battleMsg = function(a, b) {
    let ret = _bM(a, b);
    if (a.indexOf("winner=") > -1) {
        _g("fight&a=quit");
        if (isUcieczka) {
            _g(`moveitem&st=1&id=${idZwoja}`);
            isUcieczka = false;
            uciek.style.color = "white";
            uciek.innerHTML = "UCIECZKA";
        }
        chudsada = setInterval(function(){
            if(g.battle){
                _g("fight&a=quit");
            } else {
                clearInterval(chudsada);
            }
        }, 100);
    }
    return ret;
}
})(document, parseInput, newNpc, hero.run, battleMsg)

 

 

4. Auto tp przydatne berufs i światach zwykłych

Spoiler
// ==UserScript==
// @name         Auto Tp
// @version      1.6
// @description  co tu opisywac duzo, fajny dodatek... i przydatny....
// @author        adrian wilk
// @match        *://*/
// @match        *://www.margonem.pl/*
// @grant        none
// ==/UserScript==

(function(c,f,h){function j(z){let A=itemTip(z),B="";return B+=`<div class="item" ctip="t_item" tip="${A.replace(/"/g,""")}">`,-1<z.stat.indexOf("legendary")&&(B+=`<div class="itemHighlighter t_leg"></div>`),-1<z.stat.indexOf("heroic")&&(B+=`<div class="itemHighlighter t_her"></div>`),-1<z.stat.indexOf("unique")&&(B+=`<div class="itemHighlighter t_uni"></div>`),-1<z.stat.indexOf("upgraded")&&(B+=`<div class="itemHighlighter t_upg"></div>`),B+=`<img src="/obrazki/itemy/${z.icon}">`,B+=`</div>`,B}function k(){let z=parseInt(c.querySelector("#adisonzawodowiec").style.top),A=parseInt(c.querySelector("#adisonzawodowiec").style.left);localStorage.setItem(`brutus_position`,`${z}|${A}|1`)}function l(z,A){let B=g.other[A],C=`Ostatnia osoba przed którą próbowałeś uciekać: ${B.nick} ${B.lvl}${B.prof} lvl`;for(let D in localStorage.setItem("lastPerson",C),g.item)if("g"==g.item[D].loc&&g.item[D].name==z){let E=parseItemStat(g.item[D].stat);if(E.timelimit){let F=E.timelimit.split(","),G=unix_time(),H=F[1];if(!H){w=g.item[D].id;break}else if(G>H){w=g.item[D].id;break}}else{w=g.item[D].id;break}}0==w?message("Nie posiadasz teleportu"):g.battle?(message("Teleport zostanie u\u017Cyty po walce"),v=!0):(_g(`moveitem&st=1&id=${w}`),w=0)}let m=c.createElement("span");m.id="adisonzawodowiec",m.innerHTML="Przeci\u0105gnij teleport<br>";let n=c.createElement("span");n.id="asdasdrewwq",n.classList.add("b_buttons"),n.tip="Wy\u015Bwietl okienko od uciekania";let o=c.createElement("style");o.innerHTML="",c.querySelector("#panel").appendChild(n),c.head.appendChild(o),n.addEventListener("click",function(){let z=localStorage.getItem("brutus_position").split("|"),A=z[0],B=z[1];1==z[2]?(c.querySelector("#adisonzawodowiec").style.display="none",localStorage.setItem("brutus_position",`${A}|${B}|0`)):(c.querySelector("#adisonzawodowiec").style.display="block",localStorage.setItem("brutus_position",`${A}|${B}|1`))});let p=c.createElement("div");p.id="adison_inpTp",p.style="position: relative; left: 77px; width: 32px; height: 32px; background: rgba(40,40,40,0.5); border: 1px solid #333333; margin-bottom: 5px; margin-top: 2px",m.appendChild(p);let q=c.createElement("input");q.type="text",q.size="1",q.id="adison_inpLvl",m.appendChild(q),m.innerHTML+="<br>";let r=c.createElement("input");r.type="checkbox",r.name="adison_inpClan",m.appendChild(r),m.innerHTML+="Ucieka\u0107 znaj/klan?<br>";let s=c.createElement("input");s.type="checkbox",s.name="adison_inpEscape",m.appendChild(s);let t=c.createElement("span");t.id="adison_strEscape",t.innerHTML="Uciekanie w\u0142\u0105czone",t.style.fontWeight="bold",m.appendChild(t),c.body.appendChild(m);let u=c.createElement("style");u.innerHTML="#adisonzawodowiec{position:absolute; z-index: 400; width: 188px; height: 110px; background:transparent;text-align:center;padding:5px;border:2px solid red}input[id=adison_inpLvl]{border:1px solid #86cdda;border-radius:4px;padding:1px}input[id=adison_inpLvl]:hover{background:#dadada;cursor:auto}input[id=adison_inpLvl]:focus{background:#dadada}",c.head.appendChild(u);let v=!1,w=0;localStorage.getItem("brutus_position")||localStorage.setItem("brutus_position","0|0|1"),function(z,A){let B=z.split("|"),C=B[0]+"px",D=B[1]+"px";if("1"==B[2])A.style.display="block";else if("0"==B[2])A.style.display="none";else throw"Error z wy\u015Bwietlaniem";A.style.top=C,A.style.left=D}(localStorage.getItem("brutus_position"),c.querySelector("#adisonzawodowiec")),g.loadQueue.push({fun:function(){localStorage.getItem(`brutus${hero.id}_lvl`)||localStorage.setItem(`brutus${hero.id}_lvl`,`-30`),c.querySelector("#adison_inpLvl").value=localStorage.getItem(`brutus${hero.id}_lvl`),localStorage.getItem(`lastPerson`)&&log(localStorage.getItem(`lastPerson`)),localStorage.getItem(`brutus${hero.id}_tp1`)||localStorage.setItem(`brutus${hero.id}_tp1`,JSON.stringify({name:"Zw\xF3j teleportacji na Kwieciste Przej\u015Bcie",stat:"amount=14;capacity=15;lvl=70;teleport=344,17,60",icon:"pap/pap44.gif",pr:42000,cl:16})),c.querySelector("#adison_inpTp").innerHTML=j(JSON.parse(localStorage.getItem(`brutus${hero.id}_tp1`))),localStorage.getItem(`brutus_clanfr`)||localStorage.setItem(`brutus_clanfr`,!0),c.querySelector("input[name=adison_inpClan]").checked=JSON.parse(localStorage.getItem(`brutus_clanfr`)),localStorage.getItem(`brutus_escape${hero.id}`)||localStorage.setItem(`brutus_escape${hero.id}`,!0),c.querySelector("input[name=adison_inpEscape]").checked=JSON.parse(localStorage.getItem(`brutus_escape${hero.id}`)),JSON.parse(localStorage.getItem(`brutus_escape${hero.id}`))?(c.querySelector("#adison_strEscape").style.color="green",c.querySelector("#adison_strEscape").innerHTML="Uciekanie w\u0142\u0105czone"):(c.querySelector("#adison_strEscape").style.color="red",c.querySelector("#adison_strEscape").innerHTML="Uciekanie wy\u0142\u0105czone")}}),c.querySelector("#adison_inpTp").addEventListener("keyup",function(){localStorage.setItem(`brutus${hero.id}_tp1`,this.value)}),c.querySelector("#adison_inpLvl").addEventListener("keyup",function(){localStorage.setItem(`brutus${hero.id}_lvl`,this.value)}),c.querySelector("input[name=adison_inpClan]").addEventListener("change",function(){localStorage.setItem(`brutus_clanfr`,this.checked)}),c.querySelector("input[name=adison_inpEscape]").addEventListener("change",function(){localStorage.setItem(`brutus_escape${hero.id}`,this.checked),!0==this.checked?(c.querySelector("#adison_strEscape").style.color="green",c.querySelector("#adison_strEscape").innerHTML="Uciekanie w\u0142\u0105czone"):(c.querySelector("#adison_strEscape").style.color="red",c.querySelector("#adison_strEscape").innerHTML="Uciekanie wy\u0142\u0105czone")}),$("#adisonzawodowiec").draggable({start:function(){g.lock.add("adi_zmiana_pozycji")},stop:function(){g.lock.remove("adi_zmiana_pozycji"),message("Zapisano pozycj\u0119!"),k()}}),$("#adison_inpTp").droppable({accept:".item",drop:(z,A)=>{let B=g.item[A.draggable.attr("id").replace("item","")];16==B.cl&&"g"==B.loc?(c.querySelector("#adison_inpTp").innerHTML=j(B),localStorage.setItem(`brutus${hero.id}_tp1`,JSON.stringify(B)),message("Zapisano")):message("To nie teleport wtf")}}),newOther=function(z){if(f(z),2==map.pvp){let A=JSON.parse(localStorage.getItem(`brutus${hero.id}_tp1`)),B=A.name,C=+localStorage.getItem(`brutus${hero.id}_lvl`),D=JSON.parse(localStorage.getItem(`brutus_clanfr`)),E=JSON.parse(localStorage.getItem(`brutus_escape${hero.id}`)),F=hero.lvl;for(let G in z)if(z[G].lvl-F>=C&&E)if(D){l(B,G);break}else if("fr"!=z[G].relation&&"cl"!=z[G].relation){l(B,G);break}}},battleMsg=function(z,A){let B=h(z,A);return-1<z.indexOf("winner=")&&(_g("fight&a=quit"),v&&(_g(`moveitem&st=1&id=${w}`),w=0,v=!1)),B}})(document,newOther,battleMsg);

 

 

5. Auto zamykanie najlepsze, przydatne przy korzystaniu z bota

Spoiler
// ==UserScript==
// @name         Anty lag + Zamykanie The Best
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Auto zamykanie
// @match        *://*/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function antyLag(){
        if($('#battletimer')[0].innerText == "Walka zakończona." && $('#battle')[0].style["display"] == "block"){
            _g("fight&a=exit");
            console.log("Zamknięto okno.");
        }
    }
    setInterval(function(){ antyLag(); }, 150);
})();

 

 

6. Bot na E2 ( wykrywalny i banowalny )

Spoiler
// ==UserScript==
// @name         Bot na e2 test!!!
// @version      1.54
// @description  bot na e2 w trakcie rozbudowy, dziala na NI i SI
// @author       Adi Wilk
// @match        http://*.margonem.pl/
// @match        https://*.margonem.pl/
// @grant        none
// ==/UserScript==

function _instanceof(left, right) {
  if (
    right != null &&
    typeof Symbol !== "undefined" &&
    right[Symbol.hasInstance]
  ) {
    return right[Symbol.hasInstance](left);
  } else {
    return left instanceof right;
  }
}

function _slicedToArray(arr, i) {
  return (
    _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
  );
}

function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}

function _iterableToArrayLimit(arr, i) {
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;
  try {
    for (
      var _i = arr[Symbol.iterator](), _s;
      !(_n = (_s = _i.next()).done);
      _n = true
    ) {
      _arr.push(_s.value);
      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }
  return _arr;
}

function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}

function _typeof(obj) {
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    _typeof = function _typeof(obj) {
      return obj &&
        typeof Symbol === "function" &&
        obj.constructor === Symbol &&
        obj !== Symbol.prototype
        ? "symbol"
        : typeof obj;
    };
  }
  return _typeof(obj);
}

function _classCallCheck(instance, Constructor) {
  if (!_instanceof(instance, Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}

function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}

(function() {
  var a =
    /*#__PURE__*/
    (function() {
      "use strict";

      function a(_a, b, c, d, e, f) {
        _classCallCheck(this, a);

        (this.width = b),
          (this.height = c),
          (this.collisions = this.parseCollisions(_a, b, c)),
          (this.additionalCollisions = f || {}),
          (this.start = this.collisions[d.x][d.y]),
          (this.end = this.collisions[e.x][e.y]),
          (this.start.beginning = !0),
          (this.start.g = 0),
          (this.start.f = this.heuristic(this.start, this.end)),
          (this.end.target = !0),
          (this.end.g = 0),
          this.addNeighbours(),
          (this.openSet = []),
          (this.closedSet = []),
          this.openSet.push(this.start);
      }

      _createClass(a, [
        {
          key: "parseCollisions",
          value: function parseCollisions(a, c, d) {
            var e = Array(c);

            for (var f = 0; f < c; f++) {
              e[f] = Array(d);

              for (var g = 0; g < d; g++) {
                e[f][g] = new b(f, g, "0" !== a.charAt(f + g * c));
              }
            }

            return e;
          }
        },
        {
          key: "addNeighbours",
          value: function addNeighbours() {
            for (var _a2 = 0; _a2 < this.width; _a2++) {
              for (var _b = 0; _b < this.height; _b++) {
                this.addPointNeighbours(this.collisions[_a2][_b]);
              }
            }
          }
        },
        {
          key: "addPointNeighbours",
          value: function addPointNeighbours(a) {
            var _ref = [a.x, a.y],
              b = _ref[0],
              c = _ref[1],
              d = [];
            0 < b && d.push(this.collisions[b - 1][c]),
              0 < c && d.push(this.collisions[b][c - 1]),
              b < this.width - 1 && d.push(this.collisions[b + 1][c]),
              c < this.height - 1 && d.push(this.collisions[b][c + 1]),
              (a.neighbours = d);
          }
        },
        {
          key: "anotherFindPath",
          value: function anotherFindPath() {
            for (; 0 < this.openSet.length; ) {
              var _a3 = this.getLowestF(),
                _b2 = this.openSet[_a3];

              if (_b2 === this.end) return this.reconstructPath();
              this.openSet.splice(_a3, 1), this.closedSet.push(_b2);
              var _iteratorNormalCompletion = true;
              var _didIteratorError = false;
              var _iteratorError = undefined;

              try {
                for (
                  var _iterator = _b2.neighbours[Symbol.iterator](), _step;
                  !(_iteratorNormalCompletion = (_step = _iterator.next())
                    .done);
                  _iteratorNormalCompletion = true
                ) {
                  var _a4 = _step.value;
                  if (this.closedSet.includes(_a4)) continue;
                  else {
                    var c = _b2.g + 1;
                    var d = !1;
                    this.end != this.collisions[_a4.x][_a4.y] &&
                    (this.openSet.includes(_a4) ||
                      _a4.collision ||
                      this.additionalCollisions[_a4.x + 256 * _a4.y])
                      ? c < _a4.g && !_a4.collision && (d = !0)
                      : (this.openSet.push(_a4),
                        (_a4.h = this.heuristic(_a4, this.end)),
                        (d = !0)),
                      d &&
                        ((_a4.previous = _b2),
                        (_a4.g = c),
                        (_a4.f = _a4.g + _a4.h));
                  }
                }
              } catch (err) {
                _didIteratorError = true;
                _iteratorError = err;
              } finally {
                try {
                  if (!_iteratorNormalCompletion && _iterator.return != null) {
                    _iterator.return();
                  }
                } finally {
                  if (_didIteratorError) {
                    throw _iteratorError;
                  }
                }
              }
            }
          }
        },
        {
          key: "getLowestF",
          value: function getLowestF() {
            var a = 0;

            for (var _b3 = 0; _b3 < this.openSet.length; _b3++) {
              this.openSet[_b3].f < this.openSet[a].f && (a = _b3);
            }

            return a;
          }
        },
        {
          key: "reconstructPath",
          value: function reconstructPath() {
            var a = [];

            for (var _b4 = this.end; _b4 !== this.start; ) {
              a.push(_b4), (_b4 = _b4.previous);
            }

            return a;
          }
        },
        {
          key: "heuristic",
          value: function heuristic(a, b) {
            return Math.abs(a.x - b.x) + Math.abs(a.y - b.y);
          }
        }
      ]);

      return a;
    })();

  var b = function b(a, _b5, c) {
    "use strict";

    _classCallCheck(this, b);

    (this.x = a),
      (this.y = _b5),
      (this.collision = c),
      (this.g = 1e7),
      (this.f = 1e7),
      (this.neighbours = []),
      (this.beginning = !1),
      (this.target = !1),
      (this.previous = void 0);
  };

  new /*#__PURE__*/
  ((function() {
    "use strict";

    function _class() {
      _classCallCheck(this, _class);

      (this.storage = JSON.parse(localStorage.getItem("adi-bot-storage")) || {
        x: 0,
        y: 0,
        name: "",
        minimalized: !1
      }),
        (this.interface =
          "object" == _typeof(window.Engine)
            ? "ni"
            : "object" == _typeof(window.g)
              ? "si"
              : "none"),
        (this.lootfilterSettings = JSON.parse(
          localStorage.getItem("adi-bot-lootfilterSettings123")
        ) || {
          stat: {
            all: {
              translation: "\u0141ap wszystkie itemki",
              active: !0
            },
            gold: {
              translation: "Z\u0142oto",
              active: !0
            },
            quest: {
              translation: "Questowe",
              active: !0
            },
            runes: {
              translation: "Runy",
              active: !0
            },
            unique: {
              translation: "Unikaty",
              active: !0
            },
            heroic: {
              translation: "Heroiki",
              active: !0
            },
            legendary: {
              translation: "Legendy",
              active: !0
            }
          },
          names: []
        }),
        (this.QuickGroupSettings = JSON.parse(
          localStorage.getItem("adi-bot-QuickGroupSettings12")
        ) || {
          adding: {
            translation: "Automatycznie dodawaj do grupy znaj/klan",
            active: !0
          },
          accepting: {
            translation: "Automatycznie przyjmuj zaproszenia do grupy",
            active: !0
          },
          reSendingMessage: {
            translation: "Automatycznie odpisuj innym graczom",
            active: !0
          }
        }),
        (this.npcToKillId = void 0),
        (this.lastAttackTimestamp = this.timeStamp),
        (this.timerData = JSON.parse(this.getCookie("adi-bot-timer")) || {}),
        (this.refreshTime = [3, 6]),
        (this.delayToRelog = 40),
        (this.waitForNpcRespawn = 120),
        (this.randomAnswers = [
          "nie interesuje mnie to",
          "kiedy\u015B to by\u0142o, nie to co tera",
          "to fajnie",
          "nom",
          "super",
          "co ?",
          "interesuj\u0105ce",
          "bombowo",
          "Bardzo si\u0119 ciesz\u0119.",
          "Xd",
          "co",
          "co.?",
          "co?",
          "xD",
          "xd",
          "ehhhhhh",
          "heh",
          "fajnie fajnie :]"
        ]),
        (this.answersBeforeAddingToEnemies = [
          "dobra, do wrog\xF3w cie daje :)",
          "papapappapapapap",
          "nara.",
          "w ty\u0142ku cie mam gosciu, nara",
          "papapapp",
          "nara kole\u017Cko",
          "lecisz do wrogow :P",
          "narka ;)",
          "hehehehhe, narq",
          "ej jeste\u015B?",
          "haha. ;)"
        ]),
        (this.messagesInc =
          JSON.parse(localStorage.getItem("adi-bot-messages")) || {}),
        (this.isHealing = !1),
        (this.isActuallySendingMessage = !1),
        (this.startInctementingLagRefresher = !1),
        (this.incrementValue = 0),
        this.init();
    }

    _createClass(_class, [
      {
        key: "getNpcColsNI",
        value: function getNpcColsNI() {
          var a = {};

          var _arr = Object.values(this.npcs);

          for (var _i = 0; _i < _arr.length; _i++) {
            var _arr$_i = _arr[_i],
              _b6 = _arr$_i.x,
              c = _arr$_i.y;
            a[_b6 + 256 * c] = !0;
          }

          return a;
        }
      },
      {
        key: "chatParser",
        value: function chatParser() {
          var _this = this;

          "ni" === this.interface &&
            window.API.addCallbackToEvent("newMsg", function(_ref2) {
              var _ref3 = _slicedToArray(_ref2, 2),
                a = _ref3[0],
                b = _ref3[1];

              _this.chatFilter(b);
            }),
            "si" === this.interface &&
              window.g.chat.parsers.push(function(a) {
                _this.chatFilter(a);
              });
        }
      },
      {
        key: "chatFilter",
        value: function chatFilter(a) {
          var b = a.n,
            c = a.t,
            d = a.ts,
            e = a.k;

          if (
            "" !== b &&
            b !== this.hero.nick &&
            "System" !== b &&
            !1 !== this.QuickGroupSettings.reSendingMessage.active &&
            5 >= window.unix_time(!0) - d &&
            !this.isActuallySendingMessage
          ) {
            if (
              void 0 !== this.messagesInc[b + this.world] &&
              3 < this.messagesInc[b + this.world]
            )
              return;
            c.toLowerCase().includes(this.hero.nick.toLowerCase()) &&
              0 === e &&
              this.sendMessage(b, e),
              3 === e && this.sendMessage(b, e);
          }
        }
      },
      {
        key: "sendMessage",
        value: function sendMessage(a, b) {
          var _this2 = this;

          var c =
            arguments.length > 2 && arguments[2] !== undefined
              ? arguments[2]
              : !1;
          var d = arguments.length > 3 ? arguments[3] : undefined;
          (this.isActuallySendingMessage = !0),
            this.messagesInc[a + this.world] === void 0
              ? (this.messagesInc[a + this.world] = 1)
              : this.messagesInc[a + this.world]++,
            this.saveMessages(),
            3 < this.messagesInc[a + this.world] && (c = !0),
            (d = c
              ? this.answersBeforeAddingToEnemies[
                  Math.floor(
                    Math.random() * this.answersBeforeAddingToEnemies.length
                  )
                ]
              : this.randomAnswers[
                  Math.floor(Math.random() * this.randomAnswers.length)
                ]),
            3 === b && (d = "@".concat(a.split(" ").join("_"), " ").concat(d)),
            this.Sleep(1e3 * (Math.floor(11 * Math.random()) + 5)).then(
              function() {
                window._g("chat", {
                  c: d
                }),
                  !0 === c && _this2.addToEnemy(a),
                  (_this2.isActuallySendingMessage = !1);
              }
            );
        }
      },
      {
        key: "Sleep",
        value: function Sleep(a) {
          return new Promise(function(b) {
            setTimeout(function() {
              b(null);
            }, a);
          });
        }
      },
      {
        key: "saveMessages",
        value: function saveMessages() {
          localStorage.setItem(
            "adi-bot-messages",
            JSON.stringify(this.messagesInc)
          );
        }
      },
      {
        key: "addToEnemy",
        value: function addToEnemy(a) {
          window._g("friends&a=eadd&nick=".concat(a));
        }
      },
      {
        key: "getWay",
        value: function getWay(b, c) {
          return new a(
            this.collisions,
            this.map.x,
            this.map.y,
            {
              x: this.hero.x,
              y: this.hero.y
            },
            {
              x: b,
              y: c
            },
            this.npccol
          ).anotherFindPath();
        }
      },
      {
        key: "goTo",
        value: function goTo(a, b) {
          var c = this.getWay(a, b);
          Array.isArray(c) &&
            ("ni" === this.interface
              ? (window.Engine.hero.autoPath = c)
              : (window.road = c));
        }
      },
      {
        key: "getDistanceToNpc",
        value: function getDistanceToNpc(a, b) {
          var c = this.getWay(a, b);
          return Array.isArray(c) ? c.length : void 0;
        }
      },
      {
        key: "updateCollisions",
        value: function updateCollisions() {
          var a = [],
            _this$map = this.map,
            b = _this$map.x,
            c = _this$map.y;

          for (var d = 0; d < c; d++) {
            for (var _c = 0; _c < b; _c++) {
              a.push(window.Engine.map.col.check(_c, d));
            }
          }

          return a.join("");
        }
      },
      {
        key: "initBox",
        value: function initBox() {
          var _this3 = this;

          var a = document.createElement("div");
          a.classList.add("adi-bot-box"),
            this.appendText(a, "Wprowad\u017A nazwy elit II:");
          var b = document.createElement("input");
          (b.type = "text"),
            b.classList.add("adi-bot-input-text"),
            (b.value = this.storage.name),
            b.addEventListener("keyup", function() {
              (_this3.storage.name = b.value), _this3.saveStorage();
            }),
            a.appendChild(b),
            this.appendText(a, "Lootfilter:");

          var _arr2 = Object.entries(this.lootfilterSettings.stat);

          var _loop = function _loop() {
            var _arr2$_i = _slicedToArray(_arr2[_i2], 2),
              b = _arr2$_i[0],
              _arr2$_i$ = _arr2$_i[1],
              c = _arr2$_i$.translation,
              d = _arr2$_i$.active;

            _this3.createCheckBox(a, c, d, function(a) {
              (_this3.lootfilterSettings.stat[b].active = a),
                localStorage.setItem(
                  "adi-bot-lootfilterSettings123",
                  JSON.stringify(_this3.lootfilterSettings)
                );
            });
          };

          for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
            _loop();
          }

          this.appendText(a, "\u0141ap itemki po nazwie:");
          var c = document.createElement("input");
          c.classList.add("adi-bot-input-text"),
            (c.tip = "Oddzielaj przecinkiem!"),
            (c.type = "text"),
            (c.value = this.lootfilterSettings.names.join(", ")),
            c.addEventListener("keyup", function() {
              var a = c.value.split(",");

              for (var _b7 = 0; _b7 < a.length; _b7++) {
                a[_b7] = a[_b7].trim();
              }

              (_this3.lootfilterSettings.names = a),
                localStorage.setItem(
                  "adi-bot-lootfilterSettings123",
                  JSON.stringify(_this3.lootfilterSettings)
                );
            }),
            a.appendChild(c),
            this.appendText(a, "Ustawienia QG:");

          var _arr3 = Object.entries(this.QuickGroupSettings);

          var _loop2 = function _loop2() {
            var _arr3$_i = _slicedToArray(_arr3[_i3], 2),
              b = _arr3$_i[0],
              _arr3$_i$ = _arr3$_i[1],
              c = _arr3$_i$.translation,
              d = _arr3$_i$.active;

            _this3.createCheckBox(a, c, d, function(a) {
              (_this3.QuickGroupSettings[b].active = a),
                localStorage.setItem(
                  "adi-bot-QuickGroupSettings12",
                  JSON.stringify(_this3.QuickGroupSettings)
                );
            });
          };

          for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
            _loop2();
          }

          this.makeBoxDraggable(a, function() {
            (_this3.storage.x = parseInt(a.style.left)),
              (_this3.storage.y = parseInt(a.style.top)),
              _this3.saveStorage(),
              window.message(
                '<span style="color: red">Zapisano pozycj\u0119 okienka :)</span>'
              );
          }),
            this.storage.hasOwnProperty("minimalized") ||
              ((this.storage.minimalized = !1), this.saveStorage()),
            a.addEventListener("dblclick", function(_ref4) {
              var b = _ref4.x,
                c = _ref4.y;
              !1 === _this3.storage.minimalized
                ? ((a.style.width = "10px"),
                  (a.style.height = "10px"),
                  (_this3.storage.minimalized = !0),
                  _this3.changeVisibility(a, !0))
                : ((a.style.width = "360px"),
                  (a.style.height = "290px"),
                  (_this3.storage.minimalized = !1),
                  _this3.changeVisibility(a, !1)),
                (a.style.left = b - parseInt(a.style.width) / 2 + "px"),
                (a.style.top = c - parseInt(a.style.height) / 2 + "px"),
                (_this3.storage.x = parseInt(a.style.left)),
                (_this3.storage.y = parseInt(a.style.top)),
                _this3.saveStorage();
            }),
            "ni" === this.interface
              ? document.querySelector(".game-window-positioner").appendChild(a)
              : document.body.appendChild(a),
            this.initStyle(),
            !0 === this.storage.minimalized &&
              ((a.style.width = "10px"),
              (a.style.height = "10px"),
              this.changeVisibility(a, !0));
        }
      },
      {
        key: "changeVisibility",
        value: function changeVisibility(a, b) {
          var _iteratorNormalCompletion2 = true;
          var _didIteratorError2 = false;
          var _iteratorError2 = undefined;

          try {
            for (
              var _iterator2 = a.childNodes[Symbol.iterator](), _step2;
              !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
              _iteratorNormalCompletion2 = true
            ) {
              var c = _step2.value;
              c.style.display = !0 === b ? "none" : "";
            }
          } catch (err) {
            _didIteratorError2 = true;
            _iteratorError2 = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
                _iterator2.return();
              }
            } finally {
              if (_didIteratorError2) {
                throw _iteratorError2;
              }
            }
          }
        }
      },
      {
        key: "appendText",
        value: function appendText(a, b) {
          var c = document.createElement("div");
          c.appendChild(document.createTextNode(b)), a.appendChild(c);
        }
      },
      {
        key: "createCheckBox",
        value: function createCheckBox(a, b, c, d) {
          var e = document.createElement("div"),
            f = document.createElement("input");
          (f.type = "checkbox"),
            (f.name = b + "adi-bot"),
            (f.id = b + "adi-bot"),
            (f.checked = c),
            e.appendChild(f);
          var g = document.createElement("label");
          g.setAttribute("for", b + "adi-bot"),
            (g.innerHTML = b),
            f.addEventListener("change", function() {
              d(f.checked);
            }),
            e.appendChild(g),
            a.appendChild(e);
        }
      },
      {
        key: "makeBoxDraggable",
        value: function makeBoxDraggable(a, b) {
          $(a).draggable({
            containment: "window",
            stop: b
          });
        }
      },
      {
        key: "saveStorage",
        value: function saveStorage() {
          localStorage.setItem("adi-bot-storage", JSON.stringify(this.storage));
        }
      },
      {
        key: "initStyle",
        value: function initStyle() {
          var a = document.createElement("style"),
            b = "\n            .adi-bot-box {\n                position: absolute;\n                text-align: center;\n                padding: 10px;\n                height: 290px;\n                width: 360px;\n                left: "
              .concat(this.storage.x, "px;\n                top: ")
              .concat(
                this.storage.y,
                "px;\n                background: #975b83;\n                border: 2px solid white;\n                border-radius: 8px;\n                color: black;\n                z-index: 999;\n            }\n            .adi-bot-input-text {\n                text-align: center;\n                border: 2px solid lightblue;\n                border-radius: 3px;\n                color: black;\n                cursor: text;\n            }\n            "
              );
          (a.type = "text/css"),
            a.appendChild(document.createTextNode(b)),
            document.head.appendChild(a);
        }
      },
      {
        key: "initNewNpc",
        value: function initNewNpc() {
          var _this4 = this;

          if (
            ("ni" === this.interface &&
              (window.API.addCallbackToEvent("newNpc", function(a) {
                void 0 !== a && _this4.addNpcs(a.d);
              }),
              window.API.addCallbackToEvent("removeNpc", function(a) {
                void 0 !== a && _this4.removeNpcs(a.d);
              })),
            "si" === this.interface)
          ) {
            var _a5 = window.newNpc;

            window.newNpc = function(b) {
              if (void 0 !== b) {
                var _arr4 = Object.entries(b);

                for (var _i4 = 0; _i4 < _arr4.length; _i4++) {
                  var _arr4$_i = _slicedToArray(_arr4[_i4], 2),
                    _a6 = _arr4$_i[0],
                    c = _arr4$_i[1];

                  void 0 !== c.del && void 0 !== window.g.npc[_a6]
                    ? _this4.removeNpcs(window.g.npc[_a6], _a6)
                    : void 0 !== c && _this4.addNpcs(c, _a6);
                }
              }

              _a5(b);
            };
          }
        }
      },
      {
        key: "initNewOther",
        value: function initNewOther() {
          var _this5 = this;

          if (
            ("ni" === this.interface &&
              (this.makeParty(),
              window.API.addCallbackToEvent("newOther", function(a) {
                _this5.filterOther(a.d);
              })),
            "si" === this.interface)
          ) {
            this.makeParty();
            var _a7 = window.newOther;

            window.newOther = function(b) {
              if ((_a7(b), void 0 !== b)) {
                var _arr5 = Object.values(b);

                for (var _i5 = 0; _i5 < _arr5.length; _i5++) {
                  var _a8 = _arr5[_i5];

                  _this5.filterOther(_a8);
                }
              }
            };
          }
        }
      },
      {
        key: "filterOther",
        value: function filterOther(a) {
          if (a !== void 0) {
            var _b8 = a.relation,
              c = a.id;
            !0 === this.canHeroTryToAttack() &&
              ["cl", "fr"].includes(_b8) &&
              !0 === this.QuickGroupSettings.adding.active &&
              this.sendInviteToParty(c);
          }
        }
      },
      {
        key: "makeParty",
        value: function makeParty() {
          if ("object" != _typeof(this.party)) return this.sendInvites();
          var a =
            "ni" === this.interface
              ? this.party.getLeaderId() === this.hero.id
              : 1 === this.party[this.hero.id].r;
          !0 == a && this.sendInvites();
        }
      },
      {
        key: "sendInvites",
        value: function sendInvites() {
          if (this.others !== void 0) {
            var _arr6 = Object.values(this.others);

            for (var _i6 = 0; _i6 < _arr6.length; _i6++) {
              var _a9 = _arr6[_i6];
              this.filterOther(_a9);
            }
          }
        }
      },
      {
        key: "sendInviteToParty",
        value: function sendInviteToParty(a) {
          window._g("party&a=inv&id=".concat(a));
        }
      },
      {
        key: "initChecker",
        value: function initChecker() {
          var _this6 = this;

          if (
            (setTimeout(function() {
              _this6.initChecker();
            }, 500),
            !0 === this.dead &&
              (this.removeNpcsFromThisCharId(this.hero.id), this.logout()),
            !0 === this.canHeroTryToAttack())
          )
            try {
              if (void 0 !== this.npcToKillId) {
                var _this$npcs$this$npcTo = this.npcs[this.npcToKillId],
                  _a10 = _this$npcs$this$npcTo.x,
                  _b9 = _this$npcs$this$npcTo.y;
                1 >= Math.abs(this.hero.x - _a10) &&
                1 >= Math.abs(this.hero.y - _b9)
                  ? 0 < this.timeStamp - this.lastAttackTimestamp &&
                    window._g(
                      "fight&a=attack&ff=1&id=-".concat(this.npcToKillId),
                      function(a) {
                        return a.hasOwnProperty("alert") &&
                          a.alert.includes(
                            "Przeciwnik walczy ju\u017C z kim\u015B innym"
                          )
                          ? void (_this6.lastAttackTimestamp =
                              _this6.timeStamp + 2)
                          : void (_this6.lastAttackTimestamp =
                              _this6.timeStamp + 1);
                      }
                    )
                  : this.goTo(_a10, _b9);
              } else this.reFindNpcs();
            } catch (a) {
              this.npcToKillId = void 0;
            }
        }
      },
      {
        key: "canHeroTryToAttack",
        value: function canHeroTryToAttack() {
          return !(this.battle || this.dead);
        }
      },
      {
        key: "removeNpcs",
        value: function removeNpcs(a) {
          var b = a.x,
            c = a.y,
            d = a.nick,
            e = a.lvl;
          "ni" === this.interface
            ? window.Engine.map.col.unset(
                b,
                c,
                window.Engine.map.col.check(b, c)
              )
            : window.map.nodes.changeCollision(b, c, 0),
            this.storage.name !== void 0 &&
              this.storage.name.toLowerCase().includes(d.toLowerCase()) &&
              (this.addNpcToTimer(d, e),
              (this.npcToKillId = void 0),
              this.reFindNpcs());
        }
      },
      {
        key: "findEilteIIName",
        value: function findEilteIIName(a) {
          var _arr7 = Object.values(this.npcs);

          for (var _i7 = 0; _i7 < _arr7.length; _i7++) {
            var _b10 = _arr7[_i7];
            var c = _b10.nick,
              d = _b10.lvl,
              e = _b10.grp,
              f = _b10.wt;
            if (e === a && 19 < f) return [c, d];
          }
        }
      },
      {
        key: "addNpcs",
        value: function addNpcs(a, b) {
          "ni" === this.interface && (b = a.id), this.filterNpc(a, b);
        }
      },
      {
        key: "isNpcFake",
        value: function isNpcFake(a, b) {
          var c = new Image(),
            d = document.createElement("canvas").getContext("2d"),
            e = function e() {
              var a = d.getImageData(Math.floor(d.width / 2), 0, 1, d.height)
                .data;

              for (var _c2 = 3; _c2 < a.length; _c2 += 4) {
                if (0 < a[_c2]) return b(!1);
              }

              return b(!0);
            };

          (c.onload = function() {
            (d.width = this.width),
              (d.height = this.height),
              d.drawImage(c, 0, 0),
              e();
          }),
            (c.src = a);
        }
      },
      {
        key: "filterNpc",
        value: function filterNpc(a, b) {
          var _this7 = this;

          var c = a.nick,
            d = a.icon,
            e = a.type,
            f = a.wt,
            g = a.grp;

          if (
            !((2 !== e && 3 !== e) || 10 > f || void 0 === c) &&
            void 0 === this.npcToKillId &&
            this.storage.name.toLowerCase().includes(c.toLowerCase()) &&
            "" !== this.storage.name &&
            null !== this.storage.name
          ) {
            var _a11 = d.includes("/obrazki/npc/")
              ? d
              : "/obrazki/npc/".concat(d);

            this.isNpcFake(_a11, function(a) {
              !1 === a &&
                ((_this7.npcToKillId =
                  0 === g
                    ? parseInt(b)
                    : parseInt(_this7.findBestNpcFromGrp(g))),
                _this7.makeParty());
            });
          }
        }
      },
      {
        key: "findBestNpcFromGrp",
        value: function findBestNpcFromGrp(a) {
          var b,
            c = 999999;

          var _arr8 = Object.entries(this.npcs);

          for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
            var _arr8$_i = _slicedToArray(_arr8[_i8], 2),
              d = _arr8$_i[0],
              e = _arr8$_i[1];

            var f = e.x,
              g = e.y,
              h = e.grp;

            if (a === h) {
              var _a12 = this.getDistanceToNpc(f, g);

              _a12 < c && ((b = d), (c = _a12));
            }
          }

          return b;
        }
      },
      {
        key: "reFindNpcs",
        value: function reFindNpcs() {
          var _arr9 = Object.entries(this.npcs);

          for (var _i9 = 0; _i9 < _arr9.length; _i9++) {
            var _arr9$_i = _slicedToArray(_arr9[_i9], 2),
              _a13 = _arr9$_i[0],
              _b11 = _arr9$_i[1];

            this.filterNpc(_b11, _a13);
          }
        }
      },
      {
        key: "logout",
        value: function logout() {
          this.battle ||
            this.loots ||
            this.issetMyNpcOnMap ||
            this.isHealing ||
            (window.location.href = "http://margonem.pl");
        }
      },
      {
        key: "logIn",
        value: function logIn(a, b) {
          if (
            ("none" === this.interface ||
              void 0 === this.hero.id ||
              this.hero.id != a) &&
            !(
              "none" !== this.interface &&
              (this.battle ||
                this.loots ||
                this.issetMyNpcOnMap ||
                this.isHealing)
            )
          )
            try {
              var c = new Date();
              c.setTime(c.getTime() + 259200000),
                (document.cookie = "mchar_id="
                  .concat(a, "; path=/; expires=")
                  .concat(c.toGMTString(), "; domain=.margonem.pl")),
                (window.location.href = "http://".concat(
                  b.toLowerCase(),
                  ".margonem.pl"
                ));
            } catch (a) {}
        }
      },
      {
        key: "getNewRespawnTime",
        value: function getNewRespawnTime(a) {
          return Math.round(
            (1 *
              (60 *
                (200 < a
                  ? 18
                  : Math.min(18, 0.7 + 0.18 * a - 45e-5 * a * a)))) /
              parseInt(this.serverTimerSpeed)
          );
        }
      },
      {
        key: "addNpcToTimer",
        value: function addNpcToTimer(a, b) {
          var c = this.mapName;
          (this.timerData[a + this.world] = {
            name: a,
            lvl: b,
            mapName: c,
            nextRespawn: this.timeStamp + this.getNewRespawnTime(b),
            charId: this.hero.id,
            world: this.world
          }),
            this.saveTimersCookies();
        }
      },
      {
        key: "deleteNpcFromTimer",
        value: function deleteNpcFromTimer(a) {
          this.timerData[a] !== void 0 &&
            (delete this.timerData[a], this.saveTimersCookies());
        }
      },
      {
        key: "removeNpcsFromThisCharId",
        value: function removeNpcsFromThisCharId(a) {
          if (void 0 !== a) {
            var _arr10 = Object.entries(this.timerData);

            for (var _i10 = 0; _i10 < _arr10.length; _i10++) {
              var _arr10$_i = _slicedToArray(_arr10[_i10], 2),
                _b12 = _arr10$_i[0],
                c = _arr10$_i[1];

              c.charId == a && this.deleteNpcFromTimer(_b12);
            }
          }
        }
      },
      {
        key: "checkTimers",
        value: function checkTimers() {
          var _arr11 = Object.entries(this.timerData);

          for (var _i11 = 0; _i11 < _arr11.length; _i11++) {
            var _arr11$_i = _slicedToArray(_arr11[_i11], 2),
              _a14 = _arr11$_i[0],
              _b13 = _arr11$_i[1];

            _b13.nextRespawn + this.waitForNpcRespawn < this.timeStamp &&
              this.createNewRespawnTime(_a14);
          }
        }
      },
      {
        key: "createNewRespawnTime",
        value: function createNewRespawnTime(a) {
          var _this8 = this;

          if (
            !(
              Object.values(this.npcs).some(function(b) {
                return b.nick == _this8.timerData[a].name;
              }) || this.timerData[a].charId !== this.hero.id
            )
          ) {
            for (; this.timeStamp > this.timerData[a].nextRespawn; ) {
              this.timerData[a].nextRespawn += this.getNewRespawnTime(
                this.timerData[a].lvl
              );
            }

            this.saveTimersCookies();
          }
        }
      },
      {
        key: "isThisHeroIssetInTimer",
        value: function isThisHeroIssetInTimer(b) {
          return (
            void 0 !== b &&
            Object.values(this.timerData).some(function(c) {
              return c.charId == b;
            })
          );
        }
      },
      {
        key: "isntTimersInRange",
        value: function isntTimersInRange() {
          var _this9 = this;

          return Object.values(this.timerData).every(function(b) {
            return b.nextRespawn - _this9.timeStamp > _this9.delayToRelog;
          });
        }
      },
      {
        key: "checkHeroOnGoodMap",
        value: function checkHeroOnGoodMap(a) {
          var _arr12 = Object.entries(this.timerData);

          for (var _i12 = 0; _i12 < _arr12.length; _i12++) {
            var _arr12$_i = _slicedToArray(_arr12[_i12], 2),
              _b14 = _arr12$_i[0],
              c = _arr12$_i[1];

            var d = c.mapName,
              e = c.charId;
            e == a &&
              this.mapName !== void 0 &&
              d !== void 0 &&
              d !== this.mapName &&
              this.deleteNpcFromTimer(_b14);
          }
        }
      },
      {
        key: "initTimer",
        value: function initTimer() {
          var _this10 = this;

          if (0 < Object.keys(this.timerData).length)
            if ("none" === this.interface) {
              if (
                Object.values(this.timerData).some(function(b) {
                  return (
                    b.nextRespawn - _this10.timeStamp <= _this10.delayToRelog
                  );
                })
              ) {
                var _Object$values$reduce = Object.values(
                    this.timerData
                  ).reduce(function(c, a) {
                    return c.nextRespawn <= a.nextRespawn ? c : a;
                  }),
                  _a15 = _Object$values$reduce.world,
                  _b15 = _Object$values$reduce.charId;

                void 0 !== _b15 && this.logIn(_b15, _a15);
              }
            } else if (
              this.isntTimersInRange() &&
              this.isThisHeroIssetInTimer(this.hero.id)
            )
              this.logout();
            else {
              this.checkHeroOnGoodMap(this.hero.id);

              var _a16 = Object.values(this.timerData).filter(function(b) {
                return (
                  b.nextRespawn - _this10.timeStamp <= _this10.delayToRelog
                );
              });

              if (0 < _a16.length) {
                var _a16$reduce = _a16.reduce(function(c, a) {
                    return c.nextRespawn <= a.nextRespawn ? c : a;
                  }),
                  _b16 = _a16$reduce.charId,
                  c = _a16$reduce.world;

                void 0 !== this.hero.id &&
                  parseInt(_b16) !== this.hero.id &&
                  this.logIn(_b16, c);
              }
            }
          this.checkTimers(),
            setTimeout(function() {
              _this10.initTimer();
            }, 500);
        }
      },
      {
        key: "saveTimersCookies",
        value: function saveTimersCookies() {
          var a = new Date();
          a.setMonth(a.getMonth() + 1),
            this.setCookie(
              "adi-bot-timer",
              JSON.stringify(this.timerData),
              a,
              "/",
              "margonem.pl"
            );
        }
      },
      {
        key: "randomSeconds",
        value: function randomSeconds(a, b) {
          return (
            (a *= 60), (b *= 60), Math.floor(Math.random() * (b - a + 1)) + a
          );
        }
      },
      {
        key: "randomRefresh",
        value: function randomRefresh() {
          var _this$refreshTime = _slicedToArray(this.refreshTime, 2),
            a = _this$refreshTime[0],
            b = _this$refreshTime[1];

          setTimeout(function() {
            location.href = location.href;
          }, 1e3 * this.randomSeconds(a, b));
        }
      },
      {
        key: "getCookie",
        value: function getCookie(a) {
          var b = document.cookie,
            c = a + "=";
          var d = b.indexOf("; " + c);
          if (-1 != d) d += 2;
          else if (((d = b.indexOf(c)), 0 != d)) return null;
          var e = document.cookie.indexOf(";", d);
          return (
            -1 == e && (e = b.length), unescape(b.substring(d + c.length, e))
          );
        }
      },
      {
        key: "setCookie",
        value: function setCookie(a, b, c, d, e, f) {
          var g =
            a +
            "=" +
            escape(b) +
            (c ? "; expires=" + c.toGMTString() : "") +
            (d ? "; path=" + d : "") +
            (e ? "; domain=" + e : "") +
            (f ? "; secure" : "");
          document.cookie = g;
        }
      },
      {
        key: "createTimerOnMainPage",
        value: function createTimerOnMainPage() {
          var _this11 = this;

          if (0 === Object.keys(this.timerData).length) return;
          var a = document.createElement("div");
          a.classList.add("adi-bot-minutnik-strona-glowna"),
            document.querySelector(".rmenu").appendChild(a);
          var b = document.createElement("style");
          (b.type = "text/css"),
            b.appendChild(
              document.createTextNode(
                "\n            .adi-bot-minutnik-strona-glowna {\n                color: white;\n                font-size: 14px;\n                text-align: left;\n            }\n\n            .timer_data {\n                font-weight: bold;\n                float: right;\n                cursor: pointer;\n            }\n\n            .timer_data:hover {\n                color: gray;\n            }\n\n            .adi-bot-konfiguracja {\n\n            }\n        "
              )
            ),
            document.head.appendChild(b),
            this.addNpcsToTimerBox(a),
            document.addEventListener("click", function(a) {
              try {
                if ("timer_data" === a.target.className) {
                  var _a$target$getAttribut = a.target
                      .getAttribute("timer-data")
                      .split("|"),
                    _a$target$getAttribut2 = _slicedToArray(
                      _a$target$getAttribut,
                      2
                    ),
                    _b17 = _a$target$getAttribut2[0],
                    c = _a$target$getAttribut2[1];

                  c !== void 0 &&
                    _b17 !== void 0 &&
                    (_this11.deleteNpcFromTimer(_b17 + c),
                    window.showMsg(
                      "Usuni\u0119to "
                        .concat(_b17, " ze \u015Bwiata ")
                        .concat(c.charAt(0).toUpperCase() + c.slice(1), ".")
                    ));
                }
              } catch (a) {}
            });
        }
      },
      {
        key: "addNpcsToTimerBox",
        value: function addNpcsToTimerBox(a) {
          var _this12 = this;

          var b = {};

          var _arr13 = Object.values(this.timerData);

          for (var _i13 = 0; _i13 < _arr13.length; _i13++) {
            var _c3 = _arr13[_i13];
            var _a17 = _c3.name,
              d = _c3.nextRespawn,
              e = _c3.world;
            b[e] === void 0
              ? (b[e] = [
                  {
                    name: _a17,
                    nextRespawn: d
                  }
                ])
              : b[e].push({
                  name: _a17,
                  nextRespawn: d
                });
          }

          var c = "";

          var _arr14 = Object.entries(b);

          for (var _i14 = 0; _i14 < _arr14.length; _i14++) {
            var _arr14$_i = _slicedToArray(_arr14[_i14], 2),
              d = _arr14$_i[0],
              e = _arr14$_i[1];

            (c += '<br><div style="text-align: center; font-weight: bold; text-decoration: underline">'.concat(
              this.capitalizeWorld(d),
              "</div>"
            )),
              e.sort(function(a, b) {
                return a.nextRespawn - b.nextRespawn;
              });
            var _a18 = [];

            _a18.push("");

            var _iteratorNormalCompletion3 = true;
            var _didIteratorError3 = false;
            var _iteratorError3 = undefined;

            try {
              for (
                var _iterator3 = e[Symbol.iterator](), _step3;
                !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next())
                  .done);
                _iteratorNormalCompletion3 = true
              ) {
                var _b18 = _step3.value;
                var _c4 = _b18.name,
                  _e2 = _b18.nextRespawn;

                _a18.push(
                  "<span>"
                    .concat(
                      this.getTimeToRespawn(_c4, _e2),
                      '</span><span class="timer_data" tip="Kliknij, aby usun\u0105\u0107 z timera." timer-data="'
                    )
                    .concat(_c4, "|")
                    .concat(d, '">---</span>')
                );
              }
            } catch (err) {
              _didIteratorError3 = true;
              _iteratorError3 = err;
            } finally {
              try {
                if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
                  _iterator3.return();
                }
              } finally {
                if (_didIteratorError3) {
                  throw _iteratorError3;
                }
              }
            }

            _a18.push(""), (c += _a18.join("<hr>"));
          }

          (a.innerHTML = c),
            setTimeout(function() {
              _this12.addNpcsToTimerBox(a);
            }, 1e3);
        }
      },
      {
        key: "capitalizeWorld",
        value: function capitalizeWorld(a) {
          return a.charAt(0).toUpperCase() + a.slice(1) + ":";
        }
      },
      {
        key: "getTimeToRespawn",
        value: function getTimeToRespawn(a, b) {
          var c = b - this.timeStamp,
            d =
              10 > parseInt(c / 60)
                ? "0".concat(parseInt(c / 60))
                : parseInt(c / 60),
            e = 10 > c % 60 ? "0".concat(c % 60) : c % 60;
          return ""
            .concat(a, ": ")
            .concat(d, ":")
            .concat(e);
        }
      },
      {
        key: "removeLockAdding",
        value: function removeLockAdding() {
          "ni" === this.interface &&
            (window.Engine.lock.add = Function.prototype),
            "si" === this.interface && (window.g.lock.add = Function.prototype),
            (window.mAlert = Function.prototype);
        }
      },
      {
        key: "initLagRefresher",
        value: function initLagRefresher() {
          var _this13 = this;

          !1 === this.startInctementingLagRefresher &&
            ((this.startInctementingLagRefresher = !0),
            setInterval(function() {
              _this13.incrementValue++,
                8 < _this13.incrementValue && (location.href = location.href);
            }, 500));
          var a = this,
            b = window.$.ajax;

          window.$.ajax = function() {
            for (
              var _len = arguments.length, c = new Array(_len), _key = 0;
              _key < _len;
              _key++
            ) {
              c[_key] = arguments[_key];
            }

            if (c[0].url.includes("engine?t=")) {
              var _b19 = c[0].success;

              c[0].success = function() {
                for (
                  var _len2 = arguments.length, c = new Array(_len2), _key2 = 0;
                  _key2 < _len2;
                  _key2++
                ) {
                  c[_key2] = arguments[_key2];
                }

                var d =
                    "object" == _typeof(c[0]) &&
                    null !== c[0] &&
                    "ok" === c[0].e,
                  e = _b19.apply(_this13, c);

                return d && a.parseAjaxData(c[0]), e;
              };
            }

            return b.apply(_this13, c);
          };
        }
      },
      {
        key: "parseAjaxData",
        value: function parseAjaxData(a) {
          if (
            (((a.hasOwnProperty("d") && "stop" === a.d) ||
              (a.hasOwnProperty("t") && "stop" === a.t)) &&
              this.Sleep(2500).then(function() {
                location.href = location.href;
              }),
            (this.incrementValue = 0),
            a.hasOwnProperty("loot") &&
              a.hasOwnProperty("item") &&
              a.loot.hasOwnProperty("init") &&
              a.loot.hasOwnProperty("source") &&
              0 < a.loot.init &&
              "fight" === a.loot.source)
          ) {
            var _b20 = [],
              c = [];

            var _arr15 = Object.entries(a.item);

            for (var _i15 = 0; _i15 < _arr15.length; _i15++) {
              var _arr15$_i = _slicedToArray(_arr15[_i15], 2),
                d = _arr15$_i[0],
                e = _arr15$_i[1];

              var _a19 = e.stat,
                f = e.name;
              !0 === this.isGoodItem(_a19, f) ? _b20.push(d) : c.push(d);
            }

            this.sendLoots(_b20, c);
          }

          a.hasOwnProperty("f") &&
            a.f.hasOwnProperty("move") &&
            a.f.hasOwnProperty("current") &&
            0 === a.f.current &&
            -1 === a.f.move &&
            (this.closeBattle(), a.f.hasOwnProperty("w") && this.autoHeal()),
            a.hasOwnProperty("event_done") && this.autoHeal(),
            a.hasOwnProperty("ask") &&
              a.ask.hasOwnProperty("re") &&
              "party&a=accept&answer=" === a.ask.re &&
              !0 === this.QuickGroupSettings.accepting.active &&
              window._g("party&a=accept&answer=1");
        }
      },
      {
        key: "isGoodItem",
        value: function isGoodItem(a, b) {
          if (!0 === this.lootfilterSettings.stat.all.active) return !0;
          var c = [];

          var _arr16 = Object.entries(this.lootfilterSettings.stat);

          for (var _i16 = 0; _i16 < _arr16.length; _i16++) {
            var _arr16$_i = _slicedToArray(_arr16[_i16], 2),
              _d2 = _arr16$_i[0],
              e = _arr16$_i[1].active;

            !0 === e && c.push(_d2);
          }

          var d = this.lootfilterSettings.names;

          for (var _i17 = 0; _i17 < c.length; _i17++) {
            var _d3 = c[_i17];
            if (a.includes(_d3)) return !0;
          }

          var _iteratorNormalCompletion4 = true;
          var _didIteratorError4 = false;
          var _iteratorError4 = undefined;

          try {
            for (
              var _iterator4 = d[Symbol.iterator](), _step4;
              !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done);
              _iteratorNormalCompletion4 = true
            ) {
              var _c5 = _step4.value;
              if (b.toLowerCase() === _c5.toLowerCase()) return !0;
            }
          } catch (err) {
            _didIteratorError4 = true;
            _iteratorError4 = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
                _iterator4.return();
              }
            } finally {
              if (_didIteratorError4) {
                throw _iteratorError4;
              }
            }
          }

          return !1;
        }
      },
      {
        key: "sendLoots",
        value: function sendLoots(a, b) {
          window._g(
            "loot&not="
              .concat(b.join(","), "&want=&must=")
              .concat(a.join(","), "&final=1")
          ),
            "si" === this.interface &&
              (document.querySelector("#loots").style.display = "none");
        }
      },
      {
        key: "closeBattle",
        value: function closeBattle() {
          window._g("fight&a=quit"),
            "si" === this.interface &&
              (document.querySelector("#battle").style.display = "none");
        }
      },
      {
        key: "autoHeal",
        value: function autoHeal() {
          var _this14 = this;

          if (this.dead) return;
          var a =
            "ni" === this.interface
              ? window.Engine.hero.d.warrior_stats
              : window.hero;
          if (a.hp === a.maxhp) return (this.isHealing = !1);
          this.isHealing = !0;
          var b = [],
            c = [];
          var d = !1;
          var _iteratorNormalCompletion5 = true;
          var _didIteratorError5 = false;
          var _iteratorError5 = undefined;

          try {
            for (
              var _iterator5 = this.items[Symbol.iterator](), _step5;
              !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done);
              _iteratorNormalCompletion5 = true
            ) {
              var e = _step5.value;
              var f = e.stat,
                g = e.loc,
                h = e.name;

              if ("g" === g) {
                var _this$parseItemStat = this.parseItemStat(f),
                  _g = _this$parseItemStat.timelimit,
                  i = _this$parseItemStat.lvl,
                  j = _this$parseItemStat.leczy,
                  k = _this$parseItemStat.fullheal;

                if (_g !== void 0 && _g.includes(",")) continue;
                if (void 0 !== i && i > a.lvl) continue;
                j !== void 0 && (j <= a.maxhp - a.hp ? c.push(e) : (d = !0)),
                  "Czarna per\u0142a \u017Cycia" === h &&
                    (16e3 <= a.maxhp - a.hp ? c.push(e) : (d = !0)),
                  k !== void 0 && b.push(e);
              }
            }
          } catch (err) {
            _didIteratorError5 = true;
            _iteratorError5 = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
                _iterator5.return();
              }
            } finally {
              if (_didIteratorError5) {
                throw _iteratorError5;
              }
            }
          }

          if (0 < c.length) {
            var _a20 = c.sort(function(a, b) {
              return (
                _this14.parseItemStat(b.stat).leczy -
                _this14.parseItemStat(a.stat).leczy
              );
            });

            this.useItem(_a20[0].id, function() {
              _this14.Sleep(100).then(function() {
                _this14.autoHeal();
              });
            });
          } else
            0 < b.length
              ? this.useItem(b[0].id, function() {
                  _this14.Sleep(100).then(function() {
                    _this14.autoHeal();
                  });
                })
              : !1 == d &&
                window.message(
                  '<span style="color: red">Brakuje Ci potek!</span>'
                );

          this.isHealing = !1;
        }
      },
      {
        key: "parseItemStat",
        value: function parseItemStat(a) {
          var b = {},
            c = a.split(";");
          var _iteratorNormalCompletion6 = true;
          var _didIteratorError6 = false;
          var _iteratorError6 = undefined;

          try {
            for (
              var _iterator6 = c[Symbol.iterator](), _step6;
              !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done);
              _iteratorNormalCompletion6 = true
            ) {
              var d = _step6.value;

              var _d$split = d.split("="),
                _d$split2 = _slicedToArray(_d$split, 2),
                _a21 = _d$split2[0],
                _c6 = _d$split2[1];

              b[_a21] = _c6;
            }
          } catch (err) {
            _didIteratorError6 = true;
            _iteratorError6 = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
                _iterator6.return();
              }
            } finally {
              if (_didIteratorError6) {
                throw _iteratorError6;
              }
            }
          }

          return b;
        }
      },
      {
        key: "useItem",
        value: function useItem(a, b) {
          window._g("moveitem&id=".concat(a, "&st=1"), b);
        }
      },
      {
        key: "init",
        value: function init() {
          if ((this.initTimer(), "none" === this.interface))
            return this.createTimerOnMainPage();

          if ("ni" === this.interface) {
            var _a22 = window.Storage.prototype.setItem;

            window.Storage.prototype.setItem = function(b, c) {
              if ("Margonem" === b) {
                var _a23 = JSON.parse(c);

                (_a23.f = 0), (c = JSON.stringify(_a23));
              }

              _a22.apply(this, [b, c]);
            };
          } else window.bB = Function.prototype;

          this.initBox(),
            this.initNewNpc(),
            this.initNewOther(),
            this.removeLockAdding(),
            this.initChecker(),
            this.randomRefresh(),
            this.initLagRefresher(),
            this.chatParser();
        }
      },
      {
        key: "collisions",
        get: function get() {
          return "ni" === this.interface
            ? this.updateCollisions()
            : window.map.col;
        }
      },
      {
        key: "npccol",
        get: function get() {
          return "ni" === this.interface
            ? this.getNpcColsNI()
            : window.g.npccol;
        }
      },
      {
        key: "timeStamp",
        get: function get() {
          return Math.floor(new Date().getTime() / 1e3);
        }
      },
      {
        key: "hero",
        get: function get() {
          return "ni" === this.interface ? window.Engine.hero.d : window.hero;
        }
      },
      {
        key: "map",
        get: function get() {
          return "ni" === this.interface ? window.Engine.map.size : window.map;
        }
      },
      {
        key: "mapName",
        get: function get() {
          return "ni" === this.interface
            ? window.Engine.map.d.name
            : window.map.name;
        }
      },
      {
        key: "npcs",
        get: function get() {
          return "ni" === this.interface
            ? this.npcsOnNewInterface
            : window.g.npc;
        }
      },
      {
        key: "others",
        get: function get() {
          return "ni" === this.interface
            ? this.othersOnNewInterface
            : window.g.other;
        }
      },
      {
        key: "world",
        get: function get() {
          return "ni" === this.interface
            ? window.Engine.worldName
            : window.g.worldname;
        }
      },
      {
        key: "serverTimerSpeed",
        get: function get() {
          return "none" !== this.interface &&
            [
              "nerthus",
              "aldous",
              "berufs",
              "brutal",
              "classic",
              "gefion",
              "hutena",
              "jaruna",
              "katahha",
              "lelwani",
              "majuna",
              "nomada",
              "perkun",
              "tarhuna",
              "telawel",
              "tempest",
              "zemyna",
              "zorza"
            ].includes(this.world.toLowerCase())
            ? 1
            : "none" !== this.interface &&
              "syberia" === this.world.toLowerCase()
              ? 2
              : 3;
        }
      },
      {
        key: "battle",
        get: function get() {
          return "ni" === this.interface
            ? !!window.Engine.battle && !window.Engine.battle.endBattle
            : window.g.battle;
        }
      },
      {
        key: "dead",
        get: function get() {
          return "ni" === this.interface ? window.Engine.dead : window.g.dead;
        }
      },
      {
        key: "party",
        get: function get() {
          return "ni" === this.interface ? Engine.party : window.g.party;
        }
      },
      {
        key: "loots",
        get: function get() {
          return "ni" === this.interface
            ? window.Engine.loots !== void 0 &&
                !!(0 < Object.keys(window.Engine.loots.items).length)
            : !1 !== window.g.loots;
        }
      },
      {
        key: "issetMyNpcOnMap",
        get: function get() {
          var _this15 = this;

          return Object.values(this.npcs).some(function(a) {
            return _this15.storage.name
              .toLowerCase()
              .includes(a.nick.toLowerCase());
          });
        }
      },
      {
        key: "items",
        get: function get() {
          return "ni" === this.interface
            ? window.Engine.items.fetchLocationItems("g")
            : Object.values(window.g.item);
        }
      },
      {
        key: "npcsOnNewInterface",
        get: function get() {
          var a = window.Engine.npcs.check(),
            b = {};

          var _arr17 = Object.entries(a);

          for (var _i18 = 0; _i18 < _arr17.length; _i18++) {
            var _arr17$_i = _slicedToArray(_arr17[_i18], 2),
              c = _arr17$_i[0],
              d = _arr17$_i[1];

            b[c] = d.d;
          }

          return b;
        }
      },
      {
        key: "othersOnNewInterface",
        get: function get() {
          var a = window.Engine.others.check(),
            b = {};

          var _arr18 = Object.entries(a);

          for (var _i19 = 0; _i19 < _arr18.length; _i19++) {
            var _arr18$_i = _slicedToArray(_arr18[_i19], 2),
              c = _arr18$_i[0],
              d = _arr18$_i[1];

            b[c] = d.d;
          }

          return b;
        }
      }
    ]);

    return _class;
  })())();
})();

 

7. Bot na Exp z omijaniem mobów jak ktoś bije ( banowalny )

Spoiler
// ==UserScript==
// @name         Bot na exp
// @version      1.88
// @description  Bot z przechodzeniem przez mapki
// @author
// @match        *://*/
// @match        *://www.margonem.pl/*
// @grant        none
// ==/UserScript==

window.adiwilkTestBot = new function () {

  const newNpcOldCopyAf = preNewNpc;
  preNewNpc = function (npcs) {
    for (var npc in npcs) {
      if (
        npcs[npc].del &&
        g.npc[npc] &&
        Math.abs(hero.x - g.npc[npc].x) + Math.abs(hero.y - g.npc[npc].y) > 13
      ) {
        delete npcs[npc];
      }
    }
    newNpcOldCopyAf(npcs);
  };

  //wyłączenie alertów i blokad,  chwilowe rozwiązanie
  mAlert = function () {};
  if (
    typeof g == "undefined" &&
    document.location.href.indexOf("jaruna.margonem.pl") > -1
  ) {
    document.location.reload();
  }
  //obiekt z nazwami expowisk
  let expowiska = {
    "Pizzeria(wszystkie levele)": {
      map: "Podziemia - p.1, Podziemia - p.2, Odnoga kanału, Podziemia - p.1, Podziemia - p.3, Podziemia - p.1, Odnoga kanału, Podziemia - p.2"
    },
    "Szczury w Ithan": {
      map: "Archiwa, Zaplecze, Składy, Przejście północno-wschodnie, Wschodnie skrzydło murów, Przejście południowo-wschodnie, Wschodnie skrzydło murów, Przejście północno-wschodnie, Składy, Zaplecze"
    },
    "Nekropolia": {
      map: "Grobowiec Rodziny Tywelta p.1, Grobowiec Rodziny Tywelta p.2"
    },
    "Demony": {
      map: "Podziemia Siedziby Maga p.3 - sala 1, Podziemia Siedziby Maga p.3 - sala 2"
    },
    "Gacki szare": {
      map: "Siedlisko Nietoperzy p.5, Siedlisko Nietoperzy p.4, Siedlisko Nietoperzy p.3, Siedlisko Nietoperzy p.2, Siedlisko Nietoperzy p.1, Siedlisko Nietoperzy p.2, Siedlisko Nietoperzy p.3, Siedlisko Nietoperzy p.4"
    },
    "Mrówki": {
      map: "Kopiec Mrówek, Kopiec Mrówek p.1, Kopiec Mrówek p.2, Mrowisko p.2, Mrowisko p.1, Mrowisko, Mrowisko p.1, Mrowisko p.2, Kopiec Mrówek p.2, Kopiec Mrówek p.1"
    },
    "Mulusy": {
      map: "Osada Mulusów, Pradawne Wzgórze Przodków"
    },
    "Orki": {
      map: "Opuszczony Bastion, Podziemne Przejście p.1, Podziemne Przejście p.2, Zrujnowana Wieża, Opuszczony Bastion, Zrujnowana Wieża, Podziemne Przejście p.2, Podziemne Przejście p.1"
    },
    "Ghule": {
      map: "Polana Ścierwojadów, Wioska Ghuli"
    },
    "Wilcze plemię": {
      map: "Warczące Osuwiska, Wilcza Nora p.1, Wilcza Nora p.2, Wilcza Nora p.1",
      mobs_id: [71698]
    },
    "Pająki": {
      map: "Rachminowa Jaskinia p.5, Rachminowa Jaskinia p.6 - rozlewisko, Rachminowa Jaskinia p.7 - bezdenna głębia, Rachminowa Jaskinia p.6 - rozlewisko"
    },
    "Koboldy": {
      map: "Lazurytowa Grota p.1, Lazurytowa Grota p.2, Lazurytowa Grota p.3, Lazurytowa Grota p.2"
    },
    "Galaretki(te za pszczółkami)": {
      map: "Prastara Kopalnia Eroch p.4 - sala 1, Prastara Kopalnia Eroch p.5"
    },
    "Szlak Thorpa": {
      map: "Szlak Thorpa p.1, Szlak Thorpa p.2, Szlak Thorpa p.3, Szlak Thorpa p.4, Szlak Thorpa p.5, Szlak Thorpa p.6, Szlak Thorpa p.5, Szlak Thorpa p.4, Szlak Thorpa p.3, Szlak Thorpa p.2"
    },
    "Białe mrówki": {
      map: "Szumiąca Gęstwina, Grota Białych Kości p.1 - sala 2, Grota Białych Kości p.2 - sala 2, Grota Białych Kości p.3 - sala 2, Grota Białych Kości p.4, Grota Białych Kości p.3 - sala 1, Grota Białych Kości p.4, Grota Białych Kości p.3 - sala 2, Grota Białych Kości p.2 - sala 2, Grota Białych Kości p.1 - sala 2"
    },
    "Moje demilsze": {
      map: "Kopalnia Thudul-ultok p.4 - sala 2, Kopalnia Thudul-ultok p.4 - sala 1, Kopalnia Thudul-ultok p.4 - sala 2, Chodniki Erebeth p.4 - sala 2, Chodniki Erebeth p.4 - sala 1, Chodniki Erebeth p.4 - sala 2"
    },
    "Demilisze-low": {
      map: "Rachminowa Jaskinia p.3, Rachminowa Jaskinia p.4, Rachminowa Jaskinia p.4 - przepaście, Wąski chodnik p.4, Chodniki Erebeth p.4 - sala 1, Chodniki Erebeth p.4 - sala 2, Chodniki Erebeth p.4 - sala 1, Wąski chodnik p.4, Rachminowa Jaskinia p.4 - przepaście, Rachminowa Jaskinia p.4"
    },
    "Demilisze-high": {
      map: "Rachminowa Jaskinia p.4 - przepaście, Wąski chodnik p.4, Chodniki Erebeth p.4 - sala 1, Chodniki Erebeth p.4 - sala 2, Kopalnia Thudul-ultok p.4 - sala 2, Kopalnia Thudul-ultok p.4 - sala 1, Kopalnia Thudul-ultok p.4 - sala 2, Chodniki Erebeth p.4 - sala 1, Wąski chodnik p.4"
    },
       "Alghule kolo tuzmer": {
      map: "Skalne Cmentarzysko p.1, Skalne Cmentarzysko p.2, Skalne Cmentarzysko p.3, Skalne Cmentarzysko p.2"
    },
       "Szkielety kolo tuzmer": {
      map: "Dolina Pustynnych Kręgów, Sucha Dolina, Dolina Pustynnych Kręgów, Płaskowyż Arpan, Dolina Pustynnych Kręgów"
    },
    "Minosy": {
      map: "Labirynt Wyklętych p.2 - sala 1, Labirynt Wyklętych p.1, Labirynt Wyklętych p.2 - sala 2, Labirynt Wyklętych p.1",
      ignore_grp: [23]
    },
    "Erem północ-południe": {
      map: "Erem Czarnego Słońca - sala wejściowa, Erem Czarnego Słońca p.1 s.1, Erem Czarnego Słońca - sala wejściowa, Erem Czarnego Słońca p.2 s.1, Erem Czarnego Słońca p.2 s.2, Erem Czarnego Słońca - sala wejściowa, Erem Czarnego Słońca p.1 s.2, Erem Czarnego Słońca - sala wejściowa, Skały Mroźnych Śpiewów, Erem Czarnego Słońca - południe, Erem Czarnego Słońca - lochy, Erem Czarnego Słońca - północ, Skały Mroźnych Śpiewów",
      mobs_id: [34826]
    },
    "Grexy": {
      map: "Grota Samotnych Dusz p.1, Grota Samotnych Dusz p.2, Grota Samotnych Dusz p.3, Grota Samotnych Dusz p.4, Grota Samotnych Dusz p.5, Grota Samotnych Dusz p.4, Grota Samotnych Dusz p.3, Grota Samotnych Dusz p.2"
    },
    "Miśki-low": {
      map: "Firnowa Grota p.1, Firnowa Grota p.2, Firnowa Grota p.2 s.1, Firnowa Grota p.2, Skały Mroźnych Śpiewów, Lodowa Wyrwa p.2, Lodowa Wyrwa p.1 s.1, Skały Mroźnych Śpiewów",
      mobs_id: [34843, 34826]
    },
    "Miśki-high": {
      map: "Firnowa Grota p.1, Firnowa Grota p.2, Firnowa Grota p.2 s.1, Firnowa Grota p.2, Skały Mroźnych Śpiewów, Lodowa Wyrwa p.2, Lodowa Wyrwa p.1 s.1, Lodowa Wyrwa p.1 s.2, Sala Lodowych Iglic, Lodowa Wyrwa p.1 s.2, Lodowa Wyrwa p.1 s.1, Skały Mroźnych Śpiewów",
      mobs_id: [34843, 34826]
    },
    "Piraci - dwie jaskinie": {
      map: "Korsarska Nora - sala 1, Korsarska Nora - sala 2, Korsarska Nora - sala 3, Korsarska Nora - sala 4, Korsarska Nora p.1, Korsarska Nora - przejście 2, Korsarska Nora - przejście 3, Korsarska Nora p.2, Korsarska Nora - przejście 3, Korsarska Nora - przejście 2, Korsarska Nora - przejście 1, Korsarska Nora p.2, Korsarska Nora - przejście 1, Korsarska Nora - przejście 2, Korsarska Nora p.2, Korsarska Nora - przejście 2, Korsarska Nora p.1, Korsarska Nora - sala 4, Korsarska Nora - sala 3, Korsarska Nora - sala 2, Korsarska Nora - sala 1, Latarniane Wybrzeże, Ukryta Grota Morskich Diabłów, Ukryta Grota Morskich Diabłów - arsenał, Ukryta Grota Morskich Diabłów, Ukryta Grota Morskich Diabłów - siedziba, Ukryta Grota Morskich Diabłów, Ukryta Grota Morskich Diabłów - magazyn, Ukryta Grota Morskich Diabłów, Ukryta Grota Morskich Diabłów - skarbiec, Ukryta Grota Morskich Diabłów, Latarniane Wybrzeże"
    },
    "Mumie": {
      map: "Oaza Siedmiu Wichrów, Ciche Rumowiska, Dolina suchych łez, Ciche rumowiska, Oaza Siedmiu Wichrów, Ruiny Pustynnych Burz"
    },
    "Magradit-low": {
      map: "Magradit, Magradit - Góra Ognia, Wulkan Politraki p.4, Wulkan Politraki p.3 - sala 1, Wulkan Politraki p.3 - sala 2, Wulkan Politraki p.3 - sala 1, Wulkan Politraki p.4, Magradit - Góra Ognia"
    },
    "Magradit-high": {
      map: "Magradit, Magradit - Góra Ognia, Wulkan Politraki p.4, Skalna Wyrwa, Wulkan Politraki p.4, Wulkan Politraki p.3 - sala 1, Wulkan Politraki p.3 - sala 2, Wulkan Politraki p.3 - sala 1, Wulkan Politraki p.4, Skalna wyrwa, Magradit - Góra Ognia",
      ignore_grp: [4]
    },
    "Czerwone Orki": {
      map: "Orcza Wyżyna, Osada Czerwonych Orków, Siedziba Rady Orków"
    },
    "Kuźnia Woundriela": {
      map: "Kuźnia Worundriela p.7 - sala 3, Kuźnia Worundriela p.7 - sala 4"
    },
    "Berserkerzy": {
      map: "Grobowiec Przodków, Cenotaf Berserkerów p.1, Grobowiec Przodków, Czarcie Oparzeliska, Pustelnia Wojownika p.2, Pustelnia Wojownika p.1, Czarcie Oparzeliska, Szuwarowe Trzęsawisko, Opuszczona Twierdza, Szuwarowe Trzęsawisko, Czarcie Oparzeliska, Pustelnia Wojownika p.1, Pustelnia Wojownika p.2, Czarcie Oparzeliska, Grobowiec Przodków, Cenotaf Berserkerów p.1"
    },
          "Wiedzmy dla cipek": {
      map: "Upiorna Droga, Wiedźmie Kotłowisko, Sabatowe Góry, Wiedźmie Kotłowisko, Upiorna Droga"
    },
    "Gobliny": {
      map: "Przedsionek Złych Goblinów, Goblińskie Lokum, Przedsionek Złych Goblinów, Lokum Złych Goblinów"
    },
    "Kazamaty": {
      map: "Nawiedzone Kazamaty p.1, Nawiedzone Kazamaty p.2, Nawiedzone Kazamaty p.3, Nawiedzone Kazamaty p.4, Nawiedzone Kazamaty p.5, Nawiedzone Kazamaty p.6, Nawiedzone Kazamaty p.5, Nawiedzone Kazamaty p.4, Nawiedzone Kazamaty p.3, Nawiedzone Kazamaty p.2"
    },
    "Duchy - dla leszczy": {
      map: "Ruiny Tass Zhil, Przedsionek Grobowca, Ruiny Tass Zhil, Błota Sham Al",
      ignore_grp: [18]
    },
    "Duchy - dla koxów": {
      map: "Ruiny Tass Zhil, Przedsionek Grobowca, Tajemne Przejście, Przeklęty Grobowiec, Ruiny Tass Zhil, Błota Sham Al"
    },
    "Ingotia": {
      map: "Wyspa Ingotia - południe, Jaskinia Rogogłowych - aula, Sala Nici Ocalenia p.6, Sala Białego Byka p.5, Sala Nici Ocalenia p.6, Komnata Przeklętego Daru p.5, Jaskinia Rogogłowych - aula, Sala Żądzy p.5, Hala Odszczepieńców p.4, Sala Żądzy p.5, Komora Opuszczonych p.3, Jaskinia Rogogłowych - aula, Komnata Wygnańców p.3, Komora Budowniczego p.5, Komnata Wygnańców p.3, Jaskinia Rogogłowych p.2, Jaskinia Rogogłowych - aula, Jaskinia Rogogłowych p.1 - wyjście, Wyspa Ingotia - północ, Jaskinia Rogogłowych p.1 - wyjście, Jaskinia Rogogłowych - aula, Jaskinia Rogogłowych p.2, Komnata Wygnańców p.3, Komora Budowniczego p.5, Komnata Wygnańców p.3, Jaskinia Rogogłowych - aula, Komora Opuszczonych p.3, Sala Żądzy p.5, Hala Odszczepieńców p.4, Sala Żądzy p.5, Jaskinia Rogogłowych - aula, Komnata Przeklętego Daru p.5, Sala Nici Ocalenia p.6, Sala Białego Byka p.5, Sala Nici Ocalenia p.6, Jaskinia Rogogłowych - aula"
    },
    "Furby": {
      map: "Zapomniany Las, Rozległa Równina, Wzgórza Obłędu, Rozległa Równina, Dolina Gniewu, Terytorium Furii, Zapadlisko Zniewolonych, Terytorium Furii, Dolina Gniewu, Zalana Grota p.1, Dolina Gniewu, Rozległa Równina",
      ignore_grp: []
    },
    "SK dla leszczy": {
      map: "Nawiedzone Komnaty p.1, Nawiedzone Komnaty p.2, Sala Królewska, Nawiedzone Komnaty p.2"
    },
    "SK dla koxów": {
      map: "Nawiedzone Komnaty p.1, Nawiedzone Komnaty p.2, Sala Królewska, Komnata Czarnej Perły, Sala Królewska, Nawiedzone Komnaty p.2",
      ignore_grp: []
    },
    "Furbole bez 8GRP xD": {
      map: "Dolina Gniewu, Zalana Grota p.1, Zalana Grota p.2, Zalana Grota p.1, Dolina Gniewu, Terytorium Furii, Zapadlisko Zniewolonych, Terytorium Furii, Dolina Gniewu",
      ignore_grp: []
    },
    "Patrycjusze": {
      map: "Krypty Bezsennych p .1, Krypty Bezsennych p .2, Krypty Bezsennych p .2 - przejście - sala 1, Krypty Bezsennych p .2 - przejście - sala 2, Krypty Bezsennych p .2, Krypty Bezsennych p .3, Krypty Bezsennych p .2, Krypty Bezsennych p .2 - przejście - sala 2, Krypty Bezsennych p .2 - przejście - sala 1, Krypty Bezsennych p .2"
    },
    "Sekta": {
      map: "Przedsionek Kultu, Tajemnicza Siedziba, Mroczne Komnaty, Przerażające Sypialnie, Mroczne Komnaty, Tajemnicza Siedziba, Sala Tysiąca Świec, Tajemnicza Siedziba, Lochy Kultu, Sale Rozdzierania, Lochy Kultu, Tajemnicza Siedziba"
    },
    "Tak o, kacper kozak": {
      map: "Ganter ma malego",
      ignore_grp: [9]
    },
    "Pająki": {
      map: "Dolina Pajęczych Korytarzy, Arachnitopia p.1, Arachnitopia p.2, Arachnitopia p.3, Arachnitopia p.4, Arachnitopia p.5, Arachnitopia p.4, Arachnitopia p.3, Arachnitopia p.2, Arachnitopia p.1"
    },
    "Drzewce przy maho": {
      map: "Urwisko Zdrewniałych, Wąwóz Zakorzenionych Dusz, Krzaczasta Grota p.2 - sala 2, Krzaczasta Grota p.2 - sala 3, Krzaczasta Grota p.2 - sala 1, Krzaczasta Grota p.2 - sala 3, Krzaczasta Grota p.1 - sala 3, Krzaczasta Grota p.1 - sala 2, Krzaczasta Grota p.1 - sala 1, Wąwóz Zakorzenionych Dusz, Regiel Zabłąkanych, Źródło Zakorzenionego Ludu, Piaskowa Gęstwina, Źródło Zakorzenionego Ludu, Jaskinia Korzennego Czaru p.2 - sala 1, Jaskinia Korzennego Czaru p.3, Jaskinia Korzennego Czaru p.2 - sala 1, Jaskinia Korzennego Czaru p.1 - sala 1, Jaskinia Korzennego Czaru p.1 - sala 3, Jaskinia Korzennego Czaru p.1 - sala 4, Jaskinia Korzennego Czaru p.1 - sala 3, Jaskinia Korzennego Czaru p.1 - sala 1, Jaskinia Korzennego Czaru p.2 - sala 1, Źródło Zakorzenionego Ludu, Regiel Zabłąkanych, Wąwóz Zakorzenionych Dusz"
    },
    "Maddoki": {
      map: "Zawodzące Kaskady, Skryty Azyl, Złota Dąbrowa, Oślizgłe Przejście - sala 1, Oślizgłe Przejście - sala 2, Złota Dąbrowa, Mglisty Las, Grota porośniętych Stalagmitów - sala wyjściowa, Grota porośniętych Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala boczna, Grota porośniętych, Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala główna, Grota porośniętych Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala wyjściowa, Złota Dąbrowa, Mglisty Las, Grota porośniętych Stalagmitów - sala wyjściowa, Grota porośniętych Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala główna, Grota porośniętych Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala boczna, Grota porośniętych Stalagmitów - przejście, Grota porośniętych Stalagmitów - sala wyjściowa, Mglisty Las, Złota Dąbrowa, Oślizgłe Przejście - sala 2, Oślizgłe Przejście - sala 1, Złota Dąbrowa, Skryty Azyl"
    },
          "Anuraki": {
      map: "Dolina Pełznącego Krzyku, Grzęzawisko Rozpaczy, Zatrute Torfowiska, Gnijące Topielisko, Bagna Umarłych, Gnijące Topielisko, Zatrute Torfowiska, Grzęzawisko Rozpaczy, Dolina Pełznącego Krzyku"
    },
    "Maho bez PIRAMIDY": {
      map: "Altepetl Mahoptekan, Niecka Xiuh Atl, Dolina Chmur, Niecka Xiuh Atl, Altepetl Mahoptekan, Dolina Chmur, Złota Góra p.1, Złota Góra p.2, Złota Góra p.3, Złota Góra p.2, Złota Góra p.1, Dolina Chmur, Altepetl Mahoptekan, Mictlan p.1, Altepetl Mahoptekan"
    },
    "Maho z PIRAMIDA": {
      map: "Altepetl Mahoptekan, Niecka Xiuh Atl, Dolina Chmur, Niecka Xiuh Atl, Altepetl Mahoptekan, Dolina Chmur, Złota Góra p.1, Złota Góra p.2, Złota Góra p.3, Złota Góra p.2, Złota Góra p.1, Dolina Chmur, Altepetl Mahoptekan, Mictlan p.1, Mictlan p.2, Mictlan p.3, Mictlan p.4, Mictlan p.5, Mictlan p.6, Mictlan p.7, Mictlan p.8, Mictlan p.7, Mictlan p.6, Mictlan p.5, Mictlan p.4, Mictlan p.3, Mictlan p.2, Mictlan p.1"
    },
          "Wiedzmy te WIEKSZE": {
      map: "Potępione Zamczysko, Potępione Zamczysko - korytarz wejściowy, Potępione Zamczysko - lochy zachodnie, Potępione Zamczysko - korytarz wejściowy, Potępione Zamczysko - korytarz wejściowy, Potępione Zamczysko - korytarz wschodni, Wieża Szlochów p.1, Potępione Zamczysko - korytarz wschodni, Potępione Zamczysko - korytarz wejściowy, Potępione Zamczysko, Plugawe Pustkowie, Jęczywąwóz, Pogranicze Wisielców, Jęczywąwóz, Plugawe Pustkowie, Potępione Zamczysko"
    },
    "Katakumby poleglych": {
      map: "Katakumby Gwałtownej Śmierci, Korytarz Porzuconych Marzeń, Katakumby Opętanych Dusz, Katakumby Odnalezionych Skrytobójców, Korytarz Porzuconych Nadziei, Katakumby Opętanych Dusz, Zachodni Tunel Jaźni, Katakumby Krwawych Wypraw, Wschodni Tunel Jaźni"
    },
    "Pustynia Shaiharroud": {
      map: "Pustynia Shaiharrud - wschód, Jurta Nomadzka, Pustynia Shaiharrud - wschód, Grota Poświęcenia, Pustynia Shaiharrud - wschód, Namiot Pustynnych Smoków, Pustynia Shaiharrud - wschód, Pustynia Shaiharrud - zachód, Jaskinia Piaskowej Burzy s.1, Jaskinia Piaskowej Burzy s.2, Namiot Naznaczonych, Pustynia Shaiharrud - zachód, Namiot Piechoty Piłowej, Pustynia Shaiharrud - zachód, Jaskinia Szczęk, Jurta Czcicieli, Pustynia Shaiharrud - zachód, Namiot Gwardii Smokoszczękich, Pustynia Shaiharrud - zachód, Sępiarnia, Pustynia Shaiharrud - zachód, Jaskinia Smoczej Paszczy p.1, Jaskinia Smoczej Paszczy p.2, Jaskinia Smoczej Paszczy p.1, Jurta Chaegda, Pustynia Shaiharrud - zachód, Smocze Skalisko, Jaskinia Odwagi, Smocze Skalisko, Urwisko Vapora, Smocze Skalisko, Pustynia Shaiharrud - zachód"
    }
  };

  //algorytm A*
  class AStar {
    constructor(
      collisionsString,
      width,
      height,
      start,
      end,
      additionalCollisions
    ) {
      this.width = width;
      this.height = height;
      this.collisions = this.parseCollisions(collisionsString, width, height);
      this.additionalCollisions = additionalCollisions || {};
      this.start = this.collisions[start.x][start.y];
      this.end = this.collisions[end.x][end.y];
      this.start.beginning = true;
      this.start.g = 0;
      this.start.f = heuristic(this.start, this.end);
      this.end.target = true;
      this.end.g = 0;
      this.addNeighbours();
      this.openSet = [];
      this.closedSet = [];
      this.openSet.push(this.start);
    }

    parseCollisions(collisionsString, width, height) {
      const collisions = new Array(width);
      for (let w = 0; w < width; w++) {
        collisions[w] = new Array(height);
        for (let h = 0; h < height; h++) {
          collisions[w][h] = new Point(
            w,
            h,
            collisionsString.charAt(w + h * width) === "1"
          );
        }
      }
      return collisions;
    }

    addNeighbours() {
      for (let i = 0; i < this.width; i++) {
        for (let j = 0; j < this.height; j++) {
          this.addPointNeighbours(this.collisions[i][j]);
        }
      }
    }

    addPointNeighbours(point) {
      const x = point.x,
        y = point.y;
      const neighbours = [];
      if (x > 0) neighbours.push(this.collisions[x - 1][y]);
      if (y > 0) neighbours.push(this.collisions[x][y - 1]);
      if (x < this.width - 1) neighbours.push(this.collisions[x + 1][y]);
      if (y < this.height - 1) neighbours.push(this.collisions[x][y + 1]);
      point.neighbours = neighbours;
    }

    anotherFindPath() {
      while (this.openSet.length > 0) {
        let currentIndex = this.getLowestF();
        let current = this.openSet[currentIndex];
        if (current === this.end) return this.reconstructPath();
        else {
          this.openSet.splice(currentIndex, 1);
          this.closedSet.push(current);
          for (const neighbour of current.neighbours) {
            if (this.closedSet.includes(neighbour)) continue;
            else {
              const tentative_score = current.g + 1;
              let isBetter = false;
              if (
                this.end == this.collisions[neighbour.x][neighbour.y] ||
                (!this.openSet.includes(neighbour) &&
                  !neighbour.collision &&
                  !this.additionalCollisions[neighbour.x + 256 * neighbour.y])
              ) {
                this.openSet.push(neighbour);
                neighbour.h = heuristic(neighbour, this.end);
                isBetter = true;
              } else if (
                tentative_score < neighbour.g &&
                !neighbour.collision
              ) {
                isBetter = true;
              }
              if (isBetter) {
                neighbour.previous = current;
                neighbour.g = tentative_score;
                neighbour.f = neighbour.g + neighbour.h;
              }
            }
          }
        }
      }
    }

    getLowestF() {
      let lowestFIndex = 0;
      for (let i = 0; i < this.openSet.length; i++) {
        if (this.openSet[i].f < this.openSet[lowestFIndex].f) lowestFIndex = i;
      }
      return lowestFIndex;
    }

    reconstructPath() {
      const path = [];
      let currentNode = this.end;
      while (currentNode !== this.start) {
        path.push(currentNode);
        currentNode = currentNode.previous;
      }
      return path;
    }
  }

  class Point {
    constructor(x, y, collision) {
      this.x = x;
      this.y = y;
      this.collision = collision;
      this.g = 10000000;
      this.f = 10000000;
      this.neighbours = [];
      this.beginning = false;
      this.target = false;
      this.previous = undefined;
    }
  }

  function heuristic(p1, p2) {
    return Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);
  }

  function a_getWay(x, y) {
    return new AStar(
      map.col,
      map.x,
      map.y, {
        x: hero.x,
        y: hero.y
      }, {
        x: x,
        y: y
      },
      g.npccol
    ).anotherFindPath();
  }

  function a_goTo(x, y) {
    let _road_ = a_getWay(x, y);
    if (!Array.isArray(_road_)) return;
    window.road = _road_;
  }

  //localStorage dla ostatnich mapek
  if (!localStorage.getItem(`adi-bot_lastmaps`)) {
    localStorage.setItem(`adi-bot_lastmaps`, JSON.stringify(new Array()));
  }

  let self = this;
  let blokada = false;
  let blokada2 = false;
  let $m_id;
  let herolx,
    heroly,
    increment = 0;

  let bolcka = false;
  let start = false;

  g.loadQueue.push({
    fun: () => {
      start = true;
    }
  });

  let deade = true;
  let globalArray = new Array();

  function addToGlobal(id) {
    let npc = g.npc[id];
    if (npc.grp) {
      for (let i in g.npc) {
        if (g.npc[i].grp == npc.grp && !globalArray.includes(g.npc[i].id)) {
          globalArray.push(g.npc[i].id);
        }
      }
    } else if (!globalArray.includes(id)) {
      globalArray.push(id);
    }
  }

  function chceckBlockade() {
    for (let i in g.npc) {
      let n = g.npc[i];
      if (
        (n.type == 2 || n.type == 3) &&
        n.wt < 19 &&
        checkGrp(n.id) &&
        hero.lvl + 30 >= n.lvl &&
        Math.abs(hero.x - n.x) < 2 &&
        Math.abs(hero.y - n.y) < 2 &&
        checkHeroHp()
      ) {
        return _g(`fight&a=attack&ff=1&id=-${n.id}`);
      }
    }
  }

  function getTime() {
    let czas = new Date(),
      godzina = czas.getHours(),
      sekunda = czas.getSeconds(),
      minuta = czas.getMinutes();
    if (godzina < 10) godzina = `0${godzina}`;
    if (minuta < 10) minuta = `0${minuta}`;
    if (sekunda < 10) sekunda = `0${sekunda}`;
    return `${godzina}:${minuta}:${sekunda}`;
  }

  //testowa opcja
  setInterval(function () {
    if ($m_id) {
      $m_id = undefined;
    }
  }, 4000);
  let $map_cords = undefined;
  this.PI = parseInput;
  parseInput = function (a) {
    let ret = self.PI.apply(this, arguments); //tutaj dodałem chwilowo poki nie daje rady xd
    if (!g.battle && !g.dead && start) {
      if (!$m_id && !bolcka) {
        $m_id = self.findBestMob();
        if (!$m_id && localStorage.getItem(`adi-bot_expowiska`)) {
          let tmp_naj1,
            tmp_naj2 = 9999;
          if (expowiska[localStorage.getItem(`adi-bot_expowiska`)].mobs_id) {
            let exP_mobs =
              expowiska[localStorage.getItem(`adi-bot_expowiska`)].mobs_id;
            for (let i in exP_mobs) {
              if (g.npc[exP_mobs[i]]) {
                tmp_naj1 = a_getWay(g.npc[exP_mobs[i]].x, g.npc[exP_mobs[i]].y)
                  .length;
                if (tmp_naj1 < tmp_naj2) {
                  tmp_naj2 = tmp_naj1;
                  $m_id = exP_mobs[i];
                }
              }
            }
          }
        }
        blokada2 = false;
        blokada = false;
      }
      if ($m_id) {
        let mob = g.npc[$m_id];
        if (!mob) {
          $m_id = undefined;
          return ret;
        }
        if (
          Math.abs(hero.x - mob.x) < 2 &&
          Math.abs(hero.y - mob.y) < 2 &&
          !blokada
        ) {
          blokada = true;
          if (checkGrp(mob.id)) {
            _g(`fight&a=attack&ff=1&id=-${mob.id}`, function (res) {
              //sprawdzenie czy walczy z innym
              if (
                res.alert &&
                res.alert == `Przeciwnik walczy już z kimś innym`
              ) {
                addToGlobal(mob.id);
                $m_id = undefined;
              }
            });
          }
          setTimeout(function () {
            $m_id = undefined;
          }, 500);
        } else if (!blokada2 && !blokada) {
          a_goTo(mob.x, mob.y);
          blokada2 = true;
        }
      } else if (document.querySelector(`#adi-bot_maps`).value.length > 0) {
        //g.gwIds - obiekt id mapy i kordy -> 1: `1.13`
        //g.townname - obiekt id mapy i nazwa -> 1: `Ithan`
        $map_cords = self.findBestGw();
        if ($map_cords && !bolcka) {
          if (hero.x == $map_cords.x && hero.y == $map_cords.y) {
            _g(`walk`);
          } else {
            a_goTo($map_cords.x, $map_cords.y);
            bolcka = true;
            setTimeout(function () {
              bolcka = false;
            }, 2000);
          }
        }
      }

      if (heroly == hero.y && herolx == herolx) {
        increment++;
        if (increment > 4) {
          chceckBlockade();
          increment = 0;
          $m_id = undefined;
          $map_cords = undefined;
          bolcka = false;
        }
      } else {
        heroly = hero.y;
        herolx = hero.x;
        increment = 0;
      }
    }

    //wylogowanie po dedzie na główną
    if (g.dead && deade) {
      deade = false;
      document.location.href = `http://margonem.pl`;
    }

    //rozpoczecie walki
    if (a.hasOwnProperty("f") && a.f.init == 1 && hero.clan > 0) {
      if (!Object.keys(a.f.w).some(id => id < 0)) {
        const team1 = [],
          team2 = [];
        for (let x of Object.values(a.f.w))
          (x.team == 1 && team1.push(`${x.name} ${x.lvl}${x.prof}`)) ||
          team2.push(`${x.name} ${x.lvl}${x.prof} `);
        if (
          a.f.myteam == 2 &&
          document.querySelector(`#adi-bot_maps`).value.indexOf(map.name) > -1
        ) {
          const msg = `Zostałem zaatakowany na mapie ${
            map.name
          } o godzinie ${getTime()}.\n${team1.join(", ")} vs. ${team2.join(
            ", "
          )}`;
        }
      }
    }
    return ret;
  };

  function checkGrp(id) {
    if (g.npc[id].grp) {
      //tutaj
      if (
        !checke2(g.npc[id].grp) ||
        (expowiska[localStorage.getItem(`adi-bot_expowiska`)].ignore_grp &&
          expowiska[
            localStorage.getItem(`adi-bot_expowiska`)
          ].ignore_grp.includes(g.npc[id].grp))
      ) {
        return false;
      }
    }
    return true;
  }

  function checke2(grpid) {
    for (let i in g.npc) {
      if (g.npc[i].grp == grpid && g.npc[i].wt > 19) {
        return false;
      }
    }
    return true;
  }

  function checkHeroHp() {
    if ((hero.hp / hero.maxhp) * 100 > 70) {
      return true;
    }
    return false;
  }

  this.findBestMob = function () {
    let b1,
      b2 = 9999,
      id;
    for (let i in g.npc) {
      let n = g.npc[i];
      let xxx;
      let min;
      let max;
      if (document.querySelector(`#adi-bot_mobs`).value.indexOf(`-`) > -1) {
        xxx = document.querySelector(`#adi-bot_mobs`).value.split(`-`);
        min = parseInt(xxx[0]);
        max = parseInt(xxx[1]);
      }

      if (
        (n.type == 2 || n.type == 3) &&
        xxx &&
        n.lvl <= max &&
        n.lvl >= min &&
        checkGrp(n.id) &&
        !globalArray.includes(n.id) &&
        n.wt < 20
      ) {
        b1 = a_getWay(n.x, n.y);
        if (b1 == undefined) continue;
        if (b1.length < b2) {
          b2 = b1.length;
          id = n.id;
        }
      }
    }
    return id;
  };

  if (!localStorage.getItem(`alksjd`)) {
    localStorage.setItem(`alksjd`, 0);
  }

  this.findBestGw = function () {
    let obj,
      txt = document.querySelector(`#adi-bot_maps`).value.split(`, `),
      inc = parseInt(localStorage.getItem(`alksjd`));

    for (let i in g.townname) {
      //bo admini daja podwojna spacje w nazwach mapy??????
      if (txt[inc] == g.townname[i].replace(/ +(?= )/g, "")) {
        let c = g.gwIds[i].split(`.`);
        if (a_getWay(c[0], c[1]) == undefined) continue;
        obj = {
          x: c[0],
          y: c[1]
        };
      }
      if (obj) {
        return obj;
      }
    }
    inc++;
    if (inc > txt.length) {
      inc = 0;
    }
    localStorage.setItem(`alksjd`, parseInt(inc));
  };

  this.initHTML = function () {
    //localStorage pozycji
    if (!localStorage.getItem(`adi-bot_position`)) {
      let tmpobj = {
        x: 0,
        y: 0
      };
      localStorage.setItem(`adi-bot_position`, JSON.stringify(tmpobj));
    }
    let position = JSON.parse(localStorage.getItem(`adi-bot_position`));

    //boxy
    let box = document.createElement(`div`);
    box.id = `adi-bot_box`;
    box.setAttribute(`tip`, `Złap i przenieś :)`);

    let input1 = document.createElement(`input`);
    input1.type = `text`;
    input1.id = `adi-bot_mobs`;
    input1.classList.add(`adi-bot_inputs`);
    input1.setAttribute(`tip`, `Wprowadź lvl mobków w postaci np. '50-70'`);
    box.appendChild(input1);

    let input2 = document.createElement(`input`);
    input2.type = `text`;
    input2.id = `adi-bot_maps`;
    input2.classList.add(`adi-bot_inputs`);
    input2.setAttribute(`tip`, `Wprowadź nazwy map`);
    box.appendChild(input2);

    let select = document.createElement(`select`);
    select.id = `adi-bot_list`;
    select.classList.add(`adi-bot_inputs`);
    select.setAttribute(
      `tip`,
      `Wybierz expowisko, aby dodatek wpisał mapy za Ciebie`
    );
    for (let i = 0; i < Object.keys(expowiska).length; i++) {
      let option = document.createElement(`option`);
      option.setAttribute(`value`, Object.keys(expowiska)[i]);
      option.text = Object.keys(expowiska)[i];
      select.appendChild(option);
    }
    box.appendChild(select);

    document.body.appendChild(box);

    let style = document.createElement(`style`);
    style.type = `text/css`;
    let css = `
            #adi-bot_box {
               position: absolute;
               border: 3px solid lime;
              padding: 5px;
              text-align: center;
               background: url(http://i.imgur.com/iQISZHL.png);
               cursor: grab;
               left: ${position.x}px;
               top: ${position.y}px;
              width: auto;
               height: auto;
               z-index: 390;
             }
            .adi-bot_inputs {
                -webkit-box-sizing: content-box;
                -moz-box-sizing: content-box;
                box-sizing: content-box;
                margin: 0 auto;
                margin-bottom: 3px;
                padding: 2px;
                cursor: pointer;
                border: 2px solid lime;
                -webkit-border-radius: 5px;
                border-radius: 5px;
                font: normal 16px/normal "Comic Sans MS", Times, serif;
                color: #000;
                -o-text-overflow: clip;
                text-overflow: clip;
                background: rgba(234,227,227,1);
                -webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
                box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
                text-shadow: 1px 1px 0 rgba(255,255,255,0.66) ;
                display: block;
              }
              input[id=adi-bot_mobs] {
                  text-align: center;
              }
              #adi-bot_blessingbox {
                  border: 1px solid red;
                  background: gray;
                  height: 32px;
                  width: 32px;
                  margin: 0 auto;
              }
        `;
    style.appendChild(document.createTextNode(css));
    document.head.appendChild(style);

    bB = () => {};

    var oldBattleMsgAFC = battleMsg;
    battleMsg = function (c, t) {
      var ret = oldBattleMsgAFC(c, t);
      if (c.search(/winner=/) >= 0) {
        $("#battleclose").click();
      }
      return ret;
    };

    var oldFight = fight;
    fight = f => {
      oldFight(f);
      if (f.init) _g("fight&a=f");
    };

    document.addEventListener("keyup", async function (e) {
      if (
        e.target.tagName != "INPUT" &&
        e.target.tagName != "TEXTAREA" &&
        e.which == 90 &&
        !g.battle
      ) {
        if (!g.engineStopped && parseInput !== window.adiwilkTestBot.PI) {
          window.adiwilkTestBot.copyPI = parseInput;
          parseInput = window.adiwilkTestBot.PI;
          a_goTo(hero.x, hero.y);
          message("Bot zatrzymany");
        } else {
          parseInput = window.adiwilkTestBot.copyPI;
          message("Bot uruchomiony");
        }
      }
    });

    //localStorage dla mobów i mapek
    if (localStorage.getItem(`adi-bot_mobs`)) {
      input1.value = localStorage.getItem(`adi-bot_mobs`);
    }
    if (localStorage.getItem(`adi-bot_maps`)) {
      input2.value = localStorage.getItem(`adi-bot_maps`);
    }
    if (localStorage.getItem(`adi-bot_expowiska`)) {
      if (expowiska[localStorage.getItem(`adi-bot_expowiska`)]) {
        select.value = localStorage.getItem(`adi-bot_expowiska`);
      }
    }
    //listenery
    input1.addEventListener(`keyup`, () => {
      localStorage.setItem(`adi-bot_mobs`, input1.value);
    });
    input2.addEventListener(`keyup`, () => {
      localStorage.setItem(`adi-bot_maps`, input2.value);
    });
    select.addEventListener(`change`, () => {
      localStorage.setItem(`adi-bot_expowiska`, select.value);
      input2.value = expowiska[select.value].map;
      localStorage.setItem(`adi-bot_maps`, input2.value);
      localStorage.setItem(`alksjd`, 0);
      message(`Zapisano expowisko "${select.value}"`);
    });

    $(`#adi-bot_box`).draggable({
      stop: () => {
        let tmpobj = {
          x: parseInt(document.querySelector(`#adi-bot_box`).style.left),
          y: parseInt(document.querySelector(`#adi-bot_box`).style.top)
        };
        localStorage.setItem(`adi-bot_position`, JSON.stringify(tmpobj));
        message(`Zapisano pozycję`);
      }
    });
  };
  this.initHTML();
}();

 

Odnośnik do komentarza

@ED3K jak by miały to nie znajdowałyby się tutaj

W dniu 29.11.2019 o 09:25, WALDEk napisał:

@matics22 skrypty, które są udostępnione w pierwszym poście tego tematu zostały sprawdzone i nie zawierają keyloggera.

Odnośnik do komentarza

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  Tagi

×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę. Regulamin. Polityka prywatności