Enemy map

Patched enemy radar

目前为 2016-10-01 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Enemy map
  3. // @namespace HighNoon
  4. // @version 0.2.1
  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. setInterval(function() {
  15. socket.emit("cht", "Hey everybody, I'm using the Enemy Map mod,", "");
  16. setTimeout(function() { socket.emit("cht", "found here: greasyfork.org/en/scripts/23558/", ""); }, 5000);
  17. }, 20000);
  18. window.drawMiniMap = function() {
  19. mapCanvas.width = mapCanvas.width, mapContext.globalAlpha = 1;
  20. for (var a = 0; a < gameObjects.length; ++a)
  21. "player" == gameObjects[a].type &&
  22. gameObjects[a].onScreen &&
  23. (gameObjects[a].index == player.index ||
  24. gameObjects[a].team !== player.team ||
  25. gameObjects[a].team == player.team ||
  26. gameObjects[a].isBoss) &&
  27. (mapContext.fillStyle = gameObjects[a].index == player.index ? "#fff" : gameObjects[a].isBoss ? "#db4fcd" : gameObjects[a].team !== player.team ? "#d20d12" : "#5151d9",
  28. mapContext.beginPath(),
  29. mapContext.arc(gameObjects[a].x / gameWidth * mapScale, gameObjects[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  30. mapContext.closePath(),
  31. mapContext.fill());
  32. if (null != gameMap) {
  33. for (mapContext.globalAlpha = 1, a = 0; a < gameMap.pickups.length; ++a)
  34. gameMap.pickups[a].active &&
  35. ("lootcrate" == gameMap.pickups[a].type ? mapContext.fillStyle = "#ffd100" : "healthpack" == gameMap.pickups[a].type &&
  36. (mapContext.fillStyle = "#5ed951"),
  37. mapContext.beginPath(),
  38. mapContext.arc(gameMap.pickups[a].x / gameWidth * mapScale, gameMap.pickups[a].y / gameHeight * mapScale, pingScale, 0, 2 * mathPI, !0),
  39. mapContext.closePath(),
  40. mapContext.fill());
  41. mapContext.globalAlpha = 1.0,
  42. a = getCachedMiniMap(),
  43. null != a &&
  44. mapContext.drawImage(a, 0, 0, mapScale, mapScale),
  45. delete a
  46. }
  47. }
  48. });