// ==UserScript== // @name Zapisywanie Red // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author xxxx // @match http://*/* // @match http://berufs.margonem.pl/ // @grant none // ==/UserScript== ((_parseInput) => { window.parseInput = (data, b, c) => { if (data.hasOwnProperty("npc") && data.npc !== undefined && window.map.pvp === 2) { for (const [id, npc] of Object.entries(data.npc)) { if (window.g.npc[id] !== undefined && npc.hasOwnProperty("del") && npc.del === 1) { const {x, y} = window.g.npc[id]; if(Math.hypot(window.hero.x - x, window.hero.y - y) > 16){ delete data.npc[id]; } } } } _parseInput(data, b, c); } })(window.parseInput)