aboutsummaryrefslogtreecommitdiff
path: root/commands/coords/temple.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/coords/temple.js')
-rw-r--r--commands/coords/temple.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/commands/coords/temple.js b/commands/coords/temple.js
new file mode 100644
index 0000000..f60e724
--- /dev/null
+++ b/commands/coords/temple.js
@@ -0,0 +1,46 @@
+import constants from "../../util/constants"
+import { waypointRender } from "../../util/helperFunctions"
+
+const PREFIX = constants.PREFIX
+let waypoints = []
+
+export function temple(arg)
+{
+ const WAYPOINTNAME = "Temple"
+
+ if(arg != "toggle")
+ {
+ new TextComponent(`${PREFIX}&bStand on the leftmost key guardian and do /cw ${WAYPOINTNAME} toggle`)
+ .chat()
+ }
+ else
+ {
+ if(waypoints[0] == undefined)
+ {
+ let startPos = [Player.getX(), Player.getY(), Player.getZ()],
+ x = startPos[0],
+ y = startPos[1],
+ z = startPos[2]
+
+ waypoints.push([x + 61, y + -44, z + 18])
+
+ ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`)
+ }
+ else
+ {
+ waypoints = []
+ ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`)
+ }
+ }
+}
+
+register("renderWorld", () => {
+ waypointRender(waypoints)
+})
+
+
+register("worldLoad", () => {
+ waypoints = []
+})
+
+export default "" \ No newline at end of file