SHARE
TWEET

Untitled

a guest Apr 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Podmieniane Mapy
  3. // @version      1.0
  4. // @description  Podmienia grafike mapki
  5. // @author       You
  6. // @match        http://*.margonem.pl/
  7. // @grant        none
  8. // ==/UserScript==
  9.  
  10. ((drawMap, maps) => {
  11.     const image = new Image();
  12.  
  13.     window.Engine.map.draw = data => {
  14.         if (maps[window.Engine.map.d.name] !== undefined) {
  15.             const [x, y] = window.Engine.map.offset;
  16.  
  17.             if (image.src !== maps[window.Engine.map.d.name]) {
  18.                 image.src = maps[window.Engine.map.d.name];
  19.             }
  20.  
  21.             return data.drawImage(image, -x, -y);
  22.         }
  23.  
  24.         drawMap(data);
  25.     }
  26. })(window.Engine.map.draw, {
  27.     "Osada Śmiałków": "https://vgy.me/0X3yku.png",
  28.     "Nazwa Mapy": "link_do_mapy.png"
  29. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top