Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.11 KB | None | 0 0
  1. // ==UserScript==
  2. // @name auto dobijanie
  3. // @version 4.5
  4. // @description wersja numer cztery piec
  5. // @author nwm
  6. // @match *://berufs.margonem.pl/
  7. // @match *://aldous.margonem.pl/
  8. // @match *://game7.margonem.pl/
  9. // @grant none
  10. // ==/UserScript==
  11. (function(f,h,j,k,l){function m(){for(let I in g.other)f.querySelector(`#other${I}`).style.backgroundColor=""}function n(I,J,K,L,M,N,O){let P=f.createElement("span");P.classList.add("adison9711"),P.innerHTML=`<br>${I}. `;let Q=f.createElement("span");Q.innerHTML=`${K}`,Q.tip="Naci\u015Bnij, aby napisa\u0107 do tej osoby.",Q.addEventListener("click",function(){chatTo(`${K}`)}),Q.style.fontWeight="bold",0<O&&(Q.style.color="gold");"fr"===L?Q.style.color="green":"en"===L?Q.style.color="red":"cl"===L?Q.style.color="lightblue":void 0;P.appendChild(Q);let R=f.createElement("span");R.innerHTML=` ${M}${N} `,P.appendChild(R);let S=f.createElement("span"),T=Math.round(Math.sqrt(Math.pow(g.other[J].x-hero.x,2)+Math.pow(g.other[J].y-hero.y,2)));S.innerHTML=`[Odl.: ${T}] `,S.tip="Naci\u015Bnij, aby podej\u015B\u0107.",S.addEventListener("click",function(){hero.adigoto(g.other[J].x,g.other[J].y)}),P.appendChild(S);let U=f.createElement("span");U.innerHTML=`[ATAKUJ]`,U.tip="Naci\u015Bnij, aby aktywowa\u0107 po\u015Bcig.",U.addEventListener("click",function(){g.battle?message(`Trwa walka!`):2==map.pvp?(z=J,message(`Rozpoczęto pościg za: ${g.other[J].nick}!`)):message(`Nie jesteś na czerwonej mapce!`)}),P.appendChild(U),P.addEventListener("mouseover",function(){m(),f.querySelector(`#other${J}`).style.backgroundColor="rgb(255, 102, 0, .65)",f.querySelector(`#other${J}`).style.borderRadius="7px"}),P.addEventListener("mouseleave",function(){g.other[J]&&(f.querySelector(`#other${J}`).style.backgroundColor="")}),w.appendChild(P)}function p(){for(let I in y=1,w.innerHTML="",g.other){let J="";J=10>y?`0${y}`:y;let K=g.other[I];void 0===K.nick||(n(J,K.id,K.nick,K.relation,K.lvl,K.prof,K.rights),y++)}}function q(I){let J=g.npc[I];if(99<J.wt)F.play(),G.style.display="block",message(`<center>Tytan: ${J.nick} ${J.lvl}lvl<br><img src=${J.icon} /><br>[${J.x}, ${J.y}]</center>`);else{let K=Math.sqrt(Math.pow(Math.abs(hero.x-J.x),2))+Math.sqrt(Math.pow(Math.abs(hero.y-J.y),2));!g.battle&&8<K?mAlert(`<center>Heros:<br><img src=${J.icon} /><br><b>${J.nick}</b> ${J.lvl}lvl<br>${map.name}(${J.x},${J.y})<br>Czy chcesz podejść?</center>`,2,[function(){miniMapPlus?miniMapPlus.searchPath(J.x,J.y):hero.adigoto(J.x,J.y)},function(){return!1}]):message(`<center>Heros: ${J.nick} ${J.lvl}lvl<br><img src=${J.icon} /><br>[${J.x}, ${J.y}]</center>`)}}let r=[],s=f.createElement("span");s.id="enepere123",s.style="position: absolute; background: black; color: white; top: 0px; left: 0px; width: auto; height: auto; font-size: 14px",f.body.appendChild(s);let t=f.createElement("span");t.innerHTML="UCIECZKA",t.style.fontWeight="bold",t.tip="Naci\u015Bnij podczas walki, aby po walce automatycznie uciec na Kwieciste Przej\u015Bcie.";let u=!1,v;t.addEventListener("click",function(){if(g.battle)if(!u){for(let I in g.item)if("g"==g.item[I].loc&&"Zw\xF3j teleportacji na Kwieciste Przej\u015Bcie"==g.item[I].name){u=!0,v=I,t.style.color="green",t.innerHTML="UCIECZKA AKTYWNA";break}}else t.style.color="white",t.innerHTML="UCIECZKA",u=!1}),s.appendChild(t);let w=f.createElement("span");s.appendChild(w);let x=f.createElement("style");x.innerHTML=".adison9711:hover{background:#686868}",f.head.appendChild(x);let y,z=0,A,B,C,D,E=[];f.querySelector("#nick").addEventListener("click",function(){0!=z&&(z=0,message(`Przerwałeś pościg!`))});let F=new Audio;F.src="https://s1.vocaroo.com/media/download_temp/Vocaroo_s1fNYs9qyded.mp3";let G=f.createElement("span");G.id="adison_zarcik",G.style="position: absolute; background-color: blue; top: 100px; right: 100px; color: white; font-size: 35px; display: none; text-align: center; padding: 10px; cursor: pointer",G.innerHTML="Wy\u0142\u0105cz syren\u0119",f.body.appendChild(G),G.addEventListener("click",function(){G.style.display="none",F.pause()}),g.loadQueue.push({fun:()=>hero.adigoto=hero.searchPath}),parseInput=function(I,J,K){if(h(I,J,K),I.hasOwnProperty("emo"))for(let L in I.emo)"battle"!=I.emo[L].name||E.includes(I.emo[L].source_id)?"battle"!=I.emo[L].name&&E.includes(I.emo[L].source_id)&&E.splice(E.indexOf(I.emo[L].source_id),1):E.push(I.emo[L].source_id);f.querySelector("#enepere123").style.width=f.querySelector("#centerbox").style.left,p()},newNpc=function(I){for(let J in j(I),I)if(79<I[J].wt&&5!=map.mode&&"experimental"!=g.worldname&&!r.includes(I[J].id)){q(J),r.push(I[J].id);break}},hero.run=function(){0!=z&&g.other[z]&&(A=g.other[z].x,B=g.other[z].y,C=hero.x,D=hero.y,g.battle?(z=0,message(`Jest walka!`)):(2>=Math.abs(C-A)&&2>=Math.abs(D-B)&&!E.includes(+z)&&_g(`fight&a=attack&id=${z}`),(C!=A||D!=B)&&hero.adigoto(A,B))),k.apply(this,arguments)};let H;battleMsg=function(I,J){let K=l(I,J);return-1<I.indexOf("winner=")&&(_g("fight&a=quit"),u&&(_g(`moveitem&st=1&id=${v}`),u=!1,t.style.color="white",t.innerHTML="UCIECZKA"),H=setInterval(function(){g.battle?_g("fight&a=quit"):clearInterval(H)},100)),K}})(document,parseInput,newNpc,hero.run,battleMsg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement