diff options
author | Ninjune <enderknight537@gmail.com> | 2022-11-27 19:41:13 -0600 |
---|---|---|
committer | Ninjune <enderknight537@gmail.com> | 2022-11-27 19:41:13 -0600 |
commit | 584dbd71d9bfe6a3b6fdd5d91f8025df3193f889 (patch) | |
tree | 40972c73be86e71240afea9d7212192a2ac0dd6a /commands/throne.js | |
parent | f8aacdf7e45003719efd949ecb8bc30001e24e17 (diff) | |
download | coleweight-584dbd71d9bfe6a3b6fdd5d91f8025df3193f889.tar.gz coleweight-584dbd71d9bfe6a3b6fdd5d91f8025df3193f889.tar.bz2 coleweight-584dbd71d9bfe6a3b6fdd5d91f8025df3193f889.zip |
v1.6.6v1.6.7
Diffstat (limited to 'commands/throne.js')
-rw-r--r-- | commands/throne.js | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/commands/throne.js b/commands/throne.js index 717ba3c..cab7779 100644 --- a/commands/throne.js +++ b/commands/throne.js @@ -1,5 +1,8 @@ import constants from "../util/constants" +import { waypointRender } from "../util/waypoints" + const PREFIX = constants.PREFIX +let throneWaypoints = [] export function throne(arg2) { @@ -9,28 +12,36 @@ export function throne(arg2) } else { - if(constants.throneValues[0] == undefined) + if(throneWaypoints[0] == undefined) { let startPos = [Player.getX()-24, Player.getY()+6, Player.getZ()-59] // calculated below values at a weird start so adjusting them - constants.throneValues.push([startPos[0]+8, startPos[1]+2, startPos[2]-5]) - constants.throneValues.push([startPos[0]+11, startPos[1]-35, startPos[2]-3]) - constants.throneValues.push([startPos[0]+2, startPos[1]-34, startPos[2]-4]) - constants.throneValues.push([startPos[0]+-2, startPos[1]-1, startPos[2]+49]) - constants.throneValues.push([startPos[0]+2, startPos[1]-13, startPos[2]+52]) - constants.throneValues.push([startPos[0]+27, startPos[1]-9, startPos[2]+51]) - constants.throneValues.push([startPos[0]+38, startPos[1]-15, startPos[2]+47]) - constants.throneValues.push([startPos[0]+41, startPos[1]-44, startPos[2]+46]) - constants.throneValues.push([startPos[0]+50, startPos[1]-28, startPos[2]+38]) - constants.throneValues.push([startPos[0]+55, startPos[1]-36, startPos[2]+29]) - constants.throneValues.push([startPos[0]+49, startPos[1]-31, startPos[2]+1]) - constants.throneValues.push([startPos[0]+50, startPos[1]-1, startPos[2]+10]) - constants.throneValues.push([startPos[0]+45, startPos[1]-3, startPos[2]-4]) + throneWaypoints.push([startPos[0]+8, startPos[1]+2, startPos[2]-5]) + throneWaypoints.push([startPos[0]+11, startPos[1]-35, startPos[2]-3]) + throneWaypoints.push([startPos[0]+2, startPos[1]-34, startPos[2]-4]) + throneWaypoints.push([startPos[0]+-2, startPos[1]-1, startPos[2]+49]) + throneWaypoints.push([startPos[0]+2, startPos[1]-13, startPos[2]+52]) + throneWaypoints.push([startPos[0]+27, startPos[1]-9, startPos[2]+51]) + throneWaypoints.push([startPos[0]+38, startPos[1]-15, startPos[2]+47]) + throneWaypoints.push([startPos[0]+41, startPos[1]-44, startPos[2]+46]) + throneWaypoints.push([startPos[0]+50, startPos[1]-28, startPos[2]+38]) + throneWaypoints.push([startPos[0]+55, startPos[1]-36, startPos[2]+29]) + throneWaypoints.push([startPos[0]+49, startPos[1]-31, startPos[2]+1]) + throneWaypoints.push([startPos[0]+50, startPos[1]-1, startPos[2]+10]) + throneWaypoints.push([startPos[0]+45, startPos[1]-3, startPos[2]-4]) ChatLib.chat(`${PREFIX}&bThrone waypoints turned on!`) } else { - constants.throneValues = [] + throneWaypoints = [] ChatLib.chat(`${PREFIX}&bThrone waypoints turned off!`) } } -}
\ No newline at end of file +} + +register("renderWorld", () => { + waypointRender(throneWaypoints) +}) + +register("worldLoad", () => { + throneWaypoints = [] +}) |