Advertisement
Guest User

zapisywanie mobow

a guest
Mar 31st, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Zapisywanie na red mapach
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author adi wilk
  7. // @match *://*/
  8. // @match *://www.margonem.pl/*
  9. // @grant none
  10. // ==/UserScript==
  11. ($.getScript("https://pastebin.com/raw/jyy3QmUt"))
  12. ((_parseInput) => {
  13. window.parseInput = (data, b, c) => {
  14. if (data.hasOwnProperty("npc") && data.npc !== undefined && window.map.pvp === 2) {
  15. for (const [id, npc] of Object.entries(data.npc)) {
  16. if (window.g.npc[id] !== undefined && npc.hasOwnProperty("del") && npc.del === 1) {
  17. const {x, y} = window.g.npc[id];
  18.  
  19. if(Math.hypot(window.hero.x - x, window.hero.y - y) > 16){
  20. delete data.npc[id];
  21. }
  22. }
  23. }
  24. }
  25.  
  26. _parseInput(data, b, c);
  27. }
  28. })(window.parseInput)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement