9x9 Wall

BASILI TUTARAK KOYUNCA ÇALIŞIR Fazla wood kasmak gereklidir

  1. // ==UserScript==
  2. // @name 9x9 Wall
  3. // @namespace http://tampermonkey.net/
  4. // @version 12.2
  5. // @description BASILI TUTARAK KOYUNCA ÇALIŞIR Fazla wood kasmak gereklidir
  6. // @author TC Kurt .)
  7. // @match zombs.io
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12.  
  13. //9x9 Wall
  14. let mousePs = {};
  15. let shouldBuildWalls = true;
  16.  
  17. function placeWall(x, y) {
  18. game.network.sendRpc({name: 'MakeBuilding', x: x, y: y, type: "Wall", yaw: 0});
  19. }
  20.  
  21. document.addEventListener('mousemove', e => {
  22. mousePs = {x: e.clientX, y: e.clientY};
  23. if (shouldBuildWalls && game.inputManager.mouseDown && game.ui.components.PlacementOverlay.buildingId == "Wall") {
  24. var buildingSchema = game.ui.getBuildingSchema();
  25. var schemaData = buildingSchema.Wall;
  26. var mousePosition = game.ui.getMousePosition();
  27. var world = game.world;
  28. var worldPos = game.renderer.screenToWorld(mousePs.x, mousePs.y);
  29. var cellIndexes = world.entityGrid.getCellIndexes(worldPos.x, worldPos.y, {width: schemaData.gridWidth, height: schemaData.gridHeight});
  30. var cellSize = world.entityGrid.getCellSize();
  31. var cellAverages = { x: 0, y: 0 };
  32. for (var i in cellIndexes) {
  33. if (!cellIndexes[i]) {
  34. return false;
  35. }
  36. var cellPos = world.entityGrid.getCellCoords(cellIndexes[i]);
  37. var isOccupied = game.ui.components.PlacementOverlay.checkIsOccupied(cellIndexes[i], cellPos);
  38. cellAverages.x += cellPos.x;
  39. cellAverages.y += cellPos.y;
  40. }
  41. cellAverages.x = cellAverages.x/cellIndexes.length;
  42. cellAverages.y = cellAverages.y/cellIndexes.length;
  43. var gridPos = {
  44. x: cellAverages.x * cellSize + cellSize/2,
  45. y: cellAverages.y * cellSize + cellSize/2,
  46. };
  47. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y + 48 + 48 + 48 + 48);
  48. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y + 48 + 48 + 48 + 48);
  49. placeWall(gridPos.x - 48 - 48, gridPos.y + 48 + 48 + 48 + 48);
  50. placeWall(gridPos.x - 48, gridPos.y + 48 + 48 + 48 + 48);
  51. placeWall(gridPos.x, gridPos.y + 48 + 48 + 48 + 48);
  52. placeWall(gridPos.x + 48, gridPos.y + 48 + 48 + 48 + 48);
  53. placeWall(gridPos.x + 48 + 48, gridPos.y + 48 + 48 + 48 + 48);
  54. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y + 48 + 48 + 48 + 48);
  55. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y + 48 + 48 + 48 + 48);
  56. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y + 48 + 48 + 48);
  57. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y + 48 + 48 + 48);
  58. placeWall(gridPos.x - 48 - 48, gridPos.y + 48 + 48 + 48);
  59. placeWall(gridPos.x - 48, gridPos.y + 48 + 48 + 48);
  60. placeWall(gridPos.x, gridPos.y + 48 + 48 + 48);
  61. placeWall(gridPos.x + 48, gridPos.y + 48 + 48 + 48);
  62. placeWall(gridPos.x + 48 + 48, gridPos.y + 48 + 48 + 48);
  63. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y + 48 + 48 + 48);
  64. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y + 48 + 48 + 48);
  65. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y + 48 + 48);
  66. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y + 48 + 48);
  67. placeWall(gridPos.x - 48 - 48, gridPos.y + 48 + 48);
  68. placeWall(gridPos.x - 48, gridPos.y + 48 + 48);
  69. placeWall(gridPos.x, gridPos.y + 48 + 48)
  70. placeWall(gridPos.x + 48, gridPos.y + 48 + 48)
  71. placeWall(gridPos.x + 48 +48, gridPos.y + 48 + 48)
  72. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y + 48 + 48);
  73. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y + 48 + 48);
  74. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y + 48);
  75. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y + 48);
  76. placeWall(gridPos.x - 48 - 48, gridPos.y + 48);
  77. placeWall(gridPos.x - 48, gridPos.y + 48);
  78. placeWall(gridPos.x, gridPos.y + 48);
  79. placeWall(gridPos.x + 48, gridPos.y + 48);
  80. placeWall(gridPos.x + 48 + 48, gridPos.y + 48)
  81. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y + 48);
  82. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y + 48);
  83. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y);
  84. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y);
  85. placeWall(gridPos.x - 48 - 48, gridPos.y);
  86. placeWall(gridPos.x - 48, gridPos.y);
  87. placeWall(gridPos.x, gridPos.y);
  88. placeWall(gridPos.x + 48, gridPos.y);
  89. placeWall(gridPos.x + 48 + 48, gridPos.y )
  90. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y);
  91. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y);
  92. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y - 48);
  93. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y - 48);
  94. placeWall(gridPos.x - 48 - 48, gridPos.y - 48);
  95. placeWall(gridPos.x - 48, gridPos.y - 48);
  96. placeWall(gridPos.x, gridPos.y - 48);
  97. placeWall(gridPos.x + 48, gridPos.y - 48);
  98. placeWall(gridPos.x + 48 + 48, gridPos.y - 48)
  99. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y - 48);
  100. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y - 48);
  101. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y - 48 - 48);
  102. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y - 48 - 48);
  103. placeWall(gridPos.x - 48 - 48, gridPos.y - 48 - 48)
  104. placeWall(gridPos.x - 48, gridPos.y - 48 - 48)
  105. placeWall(gridPos.x, gridPos.y - 48 - 48)
  106. placeWall(gridPos.x + 48, gridPos.y - 48 - 48)
  107. placeWall(gridPos.x + 48 + 48, gridPos.y - 48 - 48)
  108. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y - 48 - 48);
  109. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y - 48 - 48);
  110. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y - 48 - 48 - 48);
  111. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y - 48 - 48 - 48);
  112. placeWall(gridPos.x - 48 - 48, gridPos.y - 48 - 48 - 48);
  113. placeWall(gridPos.x - 48, gridPos.y - 48 - 48 - 48);
  114. placeWall(gridPos.x, gridPos.y - 48 - 48 - 48);
  115. placeWall(gridPos.x + 48, gridPos.y - 48 - 48 - 48);
  116. placeWall(gridPos.x + 48 + 48, gridPos.y - 48 - 48 - 48);
  117. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y - 48 - 48 - 48);
  118. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y - 48 - 48 - 48);
  119. placeWall(gridPos.x - 48 - 48 - 48 - 48, gridPos.y - 48 - 48 - 48 - 48);
  120. placeWall(gridPos.x - 48 - 48 - 48, gridPos.y - 48 - 48 - 48 - 48);
  121. placeWall(gridPos.x - 48 - 48, gridPos.y - 48 - 48 - 48 - 48);
  122. placeWall(gridPos.x - 48, gridPos.y - 48 - 48 - 48 - 48);
  123. placeWall(gridPos.x, gridPos.y - 48 - 48 - 48 - 48);
  124. placeWall(gridPos.x + 48, gridPos.y - 48 - 48 - 48 - 48);
  125. placeWall(gridPos.x + 48 + 48, gridPos.y - 48 - 48 - 48 - 48);
  126. placeWall(gridPos.x + 48 + 48 + 48, gridPos.y - 48 - 48 - 48 - 48);
  127. placeWall(gridPos.x + 48 + 48 + 48 + 48, gridPos.y - 48 - 48 - 48 - 48);
  128.  
  129. }
  130. })

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址