Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. // ==UserScript==
  2. // @name anty wywalanie z gry
  3. // @version 21.378
  4. // @description chuj
  5. // @author hunti
  6. // @match http://*.margonem.pl/
  7. // @match http://jaruna.margonem.pl/
  8. // @match http://unia.margonem.pl/
  9. // @grant none
  10. // ==/UserScript==
  11. (()=>{window.g.loadQueue.push({fun:()=>{let a=window.hero.go,b=window.parseInput,c=[window.hero.x,window.hero.y],e=!1,f=!1,g=!1,h=()=>{return 900000-Math.floor(Math.random()*240000)},i=()=>{const a={[`${window.hero.x-1},${window.hero.y}`]:window.isCollision(window.hero.x-1,window.hero.y),[`${window.hero.x+1},${window.hero.y}`]:window.isCollision(window.hero.x+1,window.hero.y),[`${window.hero.x},${window.hero.y-1}`]:window.isCollision(window.hero.x,window.hero.y-1),[`${window.hero.x},${window.hero.y+1}`]:window.isCollision(window.hero.x,window.hero.y+1)},b=[];for(let c in a)a[c]||b.push(c);e=b[Math.floor(Math.random()*(b.length-1))].split(`,`),e[0]=+e[0],e[1]=+e[1],f=[window.hero.x,window.hero.y]},j=setTimeout(i,Math.floor(3*(60*(1e3*Math.random())))+60000);window.parseInput=function(){(window.hero.x!=c[0]||window.hero.y!=c[1])&&(c=[window.hero.x,window.hero.y],clearTimeout(j),j=setTimeout(i,h())),5==window.g.init&&0==window.g.lock.list.length&&4==window.hero.isMoving&&(e?e[0]==window.hero.x&&e[1]==window.hero.y?(e=!1,setTimeout(()=>{g=!0},1e3)):window.hero.ooooooooooooooooooooooooo(e[0],e[1]):f&&g&&(f[0]==window.hero.x&&f[1]==window.hero.y?f=!1:window.hero.ooooooooooooooooooooooooo(f[0],f[1]))),b.apply(this,arguments)}}})})();
  12. window.hero.ooooooooooooooooooooooooo=function(j,k){if(this.isBlockedSearchPath())return this.blockedInfoSearchPath();for(var n=[],h=128&hero.opt?8:20,i=Math.max(0,Math.min(j,this.x)-h),p=Math.min(map.x-1,Math.max(j,this.x)+h),q=Math.max(0,Math.min(k,this.y)-h),o=Math.min(map.y-1,Math.max(k,this.y)+h),e=i-1;p+1>=e;e++){n[e]=[];for(var r=q-1;o+1>=r;r++)n[e][r]=!(e>=i&&p>=e&&r>=q&&o>=r)||isset(g.npccol[e+256*r])||map.col&&"0"!=map.col.charAt(e+r*map.x)?-2:-1}n[this.x][this.y]=0,b=-1,road=[];for(var s={x:-1,y:-1,dist:99},c=1;p-i+o-q+3>c;c++)for(var e=i;p>=e;e++)for(var r=q;o>=r;r++){if(-1!=n[e][r]||n[e][r-1]!=c-1&&n[e][r+1]!=c-1&&n[e-1][r]!=c-1&&n[e+1][r]!=c-1||(n[e][r]=c),0<n[j][k]){e=p+1;break}s.dist2=Math.abs(j-e)+Math.abs(k-r),n[e][r]==c&&s.dist2<s.dist&&(s.x=e,s.y=r,s.dist=s.dist2)}if(s.hdist=Math.abs(j-hero.x)+Math.abs(k-hero.y),0<n[j][k]||s.dist<s.hdist){0>n[j][k]&&(j>s.x?b=2:j<s.x?b=1:k>s.y?b=0:k<s.y&&(b=3),j=s.x,k=s.y),road[0]={x:j,y:k};for(var u=n[j][k]-1,v=j,w=k;0<u;u--)n[v][w-1]==u?w--:n[v][w+1]==u?w++:n[v-1][w]==u?v--:n[v+1][w]==u?v++:u=0,u&&(road[n[j][k]-u]={x:v,y:w})}1<road.length&&null==g.playerCatcher.follow&&$("#target").stop().css({left:32*j,top:32*k,display:"block",opacity:1}).fadeOut(1e3)};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement