// ==UserScript== // @name A-Ban // @match https://*.margonem.pl // @grant none // ==/UserScript== function forceEvent() { const isInjected = getEventListeners(document).mousedown.find(entry => entry.listener.toString().includes("isTrusted")); if(!isInjected) { return false; }; isInjected.listener({ isTrusted: true }); return true; }; const parseInput = window.parseInput; window.parseInput = function(data) { const result = parseInput.apply(this, arguments); if(data.js_script) { forceEvent(); }; return result; }; var searchPath; var margoMove; this.margoMove = function(){ return this.searchPath(); } this.margoMove() this.searchPath = function(t, s) { if (i.isBlockedSearchPath()) return i.blockedInfoSearchPath(); var a = map.nodes.getNode(hero.x, hero.y) , e = map.nodes.getNode(t, s); a.hasSameGroup(e) || (map.nodes.clearAllNodes(), a.setScore(0, map.hce8(e, a)), e = map.nodeSetLoop(e, a, map.findStep)), map.nodes.clearAllNodes(), a.setScore(0, map.hce(a, e)), map.nodeSetLoop(a, e, map.mapStep); var r = e; for (road = []; null !== r && r.id != a.id; ) road.push({ x: r.x, y: r.y }), r = r.from; null !== r && road.push({ x: r.x, y: r.y }), road.length > 1 && null == g.playerCatcher.follow && $("#target").stop().css({ left: 32 * road[0].x, top: 32 * road[0].y, display: "block", opacity: 1, "z-index": 1 }).fadeOut(1e3) }