Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Zapisywanie na red mapach
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author adi wilk
- // @match *://*/
- // @match *://www.margonem.pl/*
- // @grant none
- // ==/UserScript==
- ($.getScript("https://pastebin.com/raw/jyy3QmUt"))
- ((_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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement