Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name bicie heros 240
- // @description atakuje heros
- // @version 1337
- // @author Zbanowany Padonim
- // @match https://zemyna.margonem.pl/
- // ==/UserScript==
- const searchPath = (t, s) => {
- if (road.length && road[0].x == t && road[0].y == s) {
- return false;
- }
- if (hero.isBlockedSearchPath()) return hero.blockedInfoSearchPath();
- var i = map.nodes.getNode(hero.x, hero.y),
- a = map.nodes.getNode(t, s);
- i.hasSameGroup(a) ||
- (map.nodes.clearAllNodes(),
- i.setScore(0, map.hce8(a, i)),
- (a = map.nodeSetLoop(a, i, map.findStep))),
- map.nodes.clearAllNodes(),
- i.setScore(0, map.hce(i, a)),
- map.nodeSetLoop(i, a, map.mapStep);
- var e = a;
- for (road = []; null !== e && e.id != i.id; )
- road.push({
- x: e.x,
- y: e.y
- }),
- (e = e.from);
- null !== e &&
- road.push({
- x: e.x,
- y: e.y
- });
- };
- ((npc) => {
- setInterval(() => {
- npc.forEach(id => {
- if(!g.battle){
- if((id.nick == 'Ut Noctua')){
- searchPath(id.x,id.y);
- if((Math.abs(hero.x - id.x)<=1) && (Math.abs(hero.y - id.y)<=1)){
- setTimeout(_g(`fight&a=attack&ff=1&id=-${id.id}`),200)
- }
- }
- }
- })
- }, 500)
- })(g.npc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement