Enemy map

Patched enemy radar

  1. // ==UserScript==
  2. // @name Enemy map
  3. // @namespace HighNoon
  4. // @version 0.2.2
  5. // @description Patched enemy radar
  6. // @author dannytech thanks to /u/HighNoon643
  7. // @match http://vertix.io/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. /* USE THIS SCRIPT AT YOUR OWN RISK. I TAKE NO RESPONSIBILITY FOR YOUR ACTIONS, AND DOWNLOADING THIS SCRIPT IS YOUR OWN DECISION. (btw this is not allowed. This type of script was banned by /u/TheBigShot1 for giving an unfair advantage, and using this script may result in you getting banned or something by the leprec-- sorry, bigshot. */
  12.  
  13. $(document).ready(function() {
  14. window.drawMiniMap = function() {
  15. mapCanvas.width = mapCanvas.width, mapContext.globalAlpha = 1;
  16. for (var a = 0; a < gameObjects.length; ++a)
  17. "player" == gameObjects[a].type &&
  18. gameObjects[a].onScreen &&
  19. (gameObjects[a].index == player.index ||
  20. gameObjects[a].team !== player.team ||
  21. gameObjects[a].team == player.team ||
  22. gameObjects[a].isBoss) &&
  23. (mapContext.fillStyle = gameObjects[a].index == player.index ? "#fff" : gameObjects[a].isBoss ? "#db4fcd" : gameObjects[a].team !== player.team ? "#d20d12" : "#5151d9",
  24. mapContext.beginPath(),
  25. mapContext.arc(gameObjects[a].x / gameWidth * mapScale, gameObjects[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  26. mapContext.closePath(),
  27. mapContext.fill());
  28. if (null != gameMap) {
  29. for (mapContext.globalAlpha = 1, a = 0; a < gameMap.pickups.length; ++a)
  30. gameMap.pickups[a].active &&
  31. ("lootcrate" == gameMap.pickups[a].type ? mapContext.fillStyle = "#ffd100" : "healthpack" == gameMap.pickups[a].type &&
  32. (mapContext.fillStyle = "#5ed951"),
  33. mapContext.beginPath(),
  34. mapContext.arc(gameMap.pickups[a].x / gameWidth * mapScale, gameMap.pickups[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  35. mapContext.closePath(),
  36. mapContext.fill());
  37. mapContext.globalAlpha = 1.0,
  38. a = getCachedMiniMap(),
  39. null != a &&
  40. mapContext.drawImage(a, 0, 0, mapScale, mapScale),
  41. delete a
  42. }
  43. }
  44. });