If you like this site and you like coffee, why not buy me one. Because I love it

Click to buy coffe
avatar
Untitled

Guest 88 18th Jul, 2022

MARKUP 8.49 KB
                                           
                         // ==UserScript==
// @name         UCIEKANIE BRUTUS
// @version      1.6
// @description  co tu opisywac duzo, fajny dodatek... i przydatny....
// @author       chujcieto
// @match        http://berufs.margonem.pl/
// @match        https://berufs.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,"&quot;")}">`,-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);
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
Ta strona używa plików cookie w celu usprawnienia i ułatwienia dostępu do serwisu oraz prowadzenia danych statystycznych. Dalsze korzystanie z tej witryny oznacza akceptację tego stanu rzeczy.
Wykorzystywanie plików Cookie
Jak wyłączyć cookies?
ROZUMIEM