Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Bot exp (testowy)
  3. // @version 2.01
  4. // @description jakis se bot na exp z przechodzeniem przez mapki
  5. // @author adi wilk
  6. // @match *://*/
  7. // @grant none
  8. // ==/UserScript==
  9. !function(d,e){localStorage.getItem("adibot_mapid")||localStorage.setItem("adibot_mapid","");var f=document.createElement("div");f.id="adibot_inputpole",f.style="position: absolute; bottom: 0px; right: 0px; width: 290px; height: 50px; text-align: center; color: blue; background-color: yellow; border: 2px solid red",document.body.appendChild(f);var h=document.createElement("input");h.id="adibot_input",f.appendChild(h);var j=document.createElement("input");j.id="adibot_input2",f.appendChild(j),localStorage.getItem("adibot1")||localStorage.setItem("adibot1","Wprowad\u017A nazw\u0119 mob\xF3w"),localStorage.getItem("adibot2")||localStorage.setItem("adibot2","Wprowad\u017A nazw\u0119 map"),h.value=localStorage.getItem("adibot1"),j.value=localStorage.getItem("adibot2"),h.addEventListener("keyup",()=>localStorage.setItem("adibot1",h.value)),j.addEventListener("keyup",()=>localStorage.setItem("adibot2",j.value));var m,n,o,q,r,y,B,C,k=!1,l=0,p=9999999,s=[],u=[],v=0,w=!1,x=[],z=9999999,A=0,D=!1,E=!1;g.loadQueue.push({fun:function(){D=!0,hero.sp=hero.searchPatch}}),setInterval(function(){s=[],u=[]},12e4),parseInput=(F,G,H)=>{if(d(F,G,H),!g.battle&&!0==D&&!g.dead)if(k&&!w)g.npc[l]?(m=g.npc[l].x,n=g.npc[l].y,1>=Math.abs(hero.x-m)&&1>=Math.abs(hero.y-n)?(_g(`fight&a=attack&ff=1&id=-${l}`),l=0):(hero.sp(m,n),r=hero.x+","+hero.y,r==q?v++:(v=0,q=r),4<v&&(s.push(l),k=!1,l=0,v=0))):(l=0,k=!1);else if(k&&w)localStorage.getItem("adibot_mapid")==map.id?(hero.sp(B,C),hero.x==B&&hero.y==C&&_g("walk"),r=hero.x+","+hero.y,r==q?v++:(v=0,q=r),4<v&&(u.push(A),k=!1,w=!1,A=0,v=0)):(w=!1,k=!1);else if(!w&&!k){for(var I in g.npc){var J=g.npc[I];-1<h.value.indexOf(J.nick)&&!s.includes(J.id)&&(2==J.type||3==J.type)&&(o=Math.sqrt(Math.pow(Math.abs(hero.x-J.x),2))+Math.sqrt(Math.pow(Math.abs(hero.y-J.y),2)),o<p&&(p=o,l=J.id))}0==l?(w=!0,k=!1):(p=9999999,k=!0)}else if(w&&!k){for(var I in g.townname)-1<j.value.indexOf(g.townname[I])&&localStorage.getItem("adibot_mapid")!=I&&x.push(I);if(0<x.length){for(var I in g.gwIds)x.includes(I)&&!u.includes(I)&&(y=Math.sqrt(Math.pow(Math.abs(hero.x-+g.gwIds[I].substring(0,g.gwIds[I].indexOf("."))),2))+Math.sqrt(Math.pow(Math.abs(hero.y-+g.gwIds[I].substring(g.gwIds[I].indexOf(".")+1)),2)),y<z&&(z=y,B=+g.gwIds[I].substring(0,g.gwIds[I].indexOf(".")),C=+g.gwIds[I].substring(g.gwIds[I].indexOf(".")+1),A=I));0!=A&&(localStorage.setItem("adibot_mapid",map.id),A=0,k=!0,z=9999999)}else A=0,k=!1,w=!1,localStorage.setItem("adibot_mapid","")}!0==g.dead&&!E&&D&&(document.location.href="http://margonem.pl",E=!0)},battleMsg=(F,G)=>{k=!0;var H=e(F,G);return-1<F.indexOf("winner=")&&(_g("fight&a=quit"),k=!1,w=!1,A=0,l=0),H}}(parseInput,battleMsg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement