Advertisement
Nolifeq

Untitled

Apr 5th, 2022
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. // ==UserScript==
  2. // @name bicie mob
  3. // @description bije se moba tak o
  4. // @version 21.37
  5. // @author affke
  6. // @match https://zemyna.margonem.pl/
  7. // ==/UserScript==
  8.  
  9.  
  10. const searchPath = (t, s) => {
  11. if (road.length && road[0].x == t && road[0].y == s) {
  12. return false;
  13. }
  14.  
  15. if (hero.isBlockedSearchPath()) return hero.blockedInfoSearchPath();
  16. var i = map.nodes.getNode(hero.x, hero.y),
  17. a = map.nodes.getNode(t, s);
  18. i.hasSameGroup(a) ||
  19. (map.nodes.clearAllNodes(),
  20. i.setScore(0, map.hce8(a, i)),
  21. (a = map.nodeSetLoop(a, i, map.findStep))),
  22. map.nodes.clearAllNodes(),
  23. i.setScore(0, map.hce(i, a)),
  24. map.nodeSetLoop(i, a, map.mapStep);
  25. var e = a;
  26. for (road = []; null !== e && e.id != i.id; )
  27. road.push({
  28. x: e.x,
  29. y: e.y
  30. }),
  31. (e = e.from);
  32. null !== e &&
  33. road.push({
  34. x: e.x,
  35. y: e.y
  36. });
  37. };
  38.  
  39. ((npc) => {
  40. setInterval(() => {
  41. npc.forEach(id => {
  42. if(!g.battle){
  43. if((id.nick == 'Rabuś' || id.nick == 'Twoja Stara' || id.nick == 'Twoja Stara' || id.nick == 'Zając'))
  44. if((Math.abs(hero.x - id.x)<=1) && (Math.abs(hero.y - id.y)<=1)){
  45. setTimeout(_g(`fight&a=attack&ff=1&id=-${id.id}`),200)
  46. }
  47. }
  48.  
  49.  
  50. })
  51. }, 500)
  52. })(g.npc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement