diff options
Diffstat (limited to 'commands/coords')
-rw-r--r-- | commands/coords/automatons.js | 53 | ||||
-rw-r--r-- | commands/coords/divans.js | 83 | ||||
-rw-r--r-- | commands/coords/spiral.js | 55 | ||||
-rw-r--r-- | commands/coords/throne.js | 50 | ||||
-rw-r--r-- | commands/coords/yog.js | 62 |
5 files changed, 303 insertions, 0 deletions
diff --git a/commands/coords/automatons.js b/commands/coords/automatons.js new file mode 100644 index 0000000..4114eec --- /dev/null +++ b/commands/coords/automatons.js @@ -0,0 +1,53 @@ +import constants from "../../util/constants" +import { waypointRender } from "../../util/helperFunctions" + +const PREFIX = constants.PREFIX +let waypoints = [] + +export function automatons(arg) +{ + const WAYPOINTNAME = "Automatons" + + if(arg != "toggle") + { + new TextComponent(`${PREFIX}&bStand in the pot in &3this&b picture and do /cw ${WAYPOINTNAME} toggle`) + .setClickAction("open_url") + .setClickValue("https://media.discordapp.net/attachments/1049475464667856926/1052749218055475210/image.png") + .chat() + } + else + { + if(waypoints[0] == undefined) + { + let startPos = [Player.getX(), Player.getY(), Player.getZ()], + x = startPos[0], + y = startPos[1], + z = startPos[2] + + let coordsRows = FileLib.read("Coleweight", "data/automatons.txt").split("\r\n") + coordsRows.forEach(unsplitRow => { + let row = unsplitRow.split(" ") + + waypoints.push([x + parseInt(row[0]), y + parseInt(row[1]), z + parseInt(row[2])]) + }) + + 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 diff --git a/commands/coords/divans.js b/commands/coords/divans.js new file mode 100644 index 0000000..98b56dd --- /dev/null +++ b/commands/coords/divans.js @@ -0,0 +1,83 @@ +import constants from "../../util/constants" +import { waypointRender } from "../../util/helperFunctions" + +const PREFIX = constants.PREFIX +let divanWaypoints = [] + +export function divans(arg2) +{ + const WAYPOINTNAME = "Divan" + + if(arg2 != "toggle") + { + new TextComponent(`${PREFIX}&bGo to the middle of jade crystal then do /cw coords divans toggle.`) + .chat() + } + else + { + if(divanWaypoints[0] == undefined) + { + let startPos = [Player.getX(), Player.getY(), Player.getZ()], + x = startPos[0], + y = startPos[1], + z = startPos[2] + + console.log(x + " " + y + " " + z) + divanWaypoints.push([x + 1, y + -40, z + -20]) + divanWaypoints.push([x + 30, y + -39, z + -25]) + divanWaypoints.push([x + -31, y + -39, z + -12]) + divanWaypoints.push([x + 1, y + -39, z + 20]) + divanWaypoints.push([x + -14, y + -39, z + 43]) + divanWaypoints.push([x + -12, y + -39, z + -44]) + divanWaypoints.push([x + -20, y + -40, z + 0]) + divanWaypoints.push([x + 22, y + -39, z + -14]) + divanWaypoints.push([x + 29, y + -39, z + -44]) + divanWaypoints.push([x + 12, y + -39, z + 7]) + divanWaypoints.push([x + 23, y + -40, z + -39]) + divanWaypoints.push([x + -37, y + -39, z + 11]) + divanWaypoints.push([x + 7, y + -39, z + 11]) + divanWaypoints.push([x + 6, y + -39, z + 11]) + divanWaypoints.push([x + -38, y + -40, z + 26]) + divanWaypoints.push([x + 12, y + -40, z + -22]) + divanWaypoints.push([x + -5, y + -39, z + 16]) + divanWaypoints.push([x + 40, y + -40, z + -30]) + divanWaypoints.push([x + 42, y + -37, z + -41]) + divanWaypoints.push([x + -23, y + -40, z + 40]) + divanWaypoints.push([x + 20, y + -40, z + 0]) + divanWaypoints.push([x + -24, y + -40, z + 12]) + divanWaypoints.push([x + 38, y + -40, z + -26]) + divanWaypoints.push([x + 43, y + -39, z + -16]) + divanWaypoints.push([x + -40, y + -40, z + 18]) + divanWaypoints.push([x + -17, y + -39, z + 20]) + divanWaypoints.push([x + 19, y + -40, z + 29]) + divanWaypoints.push([x + -37, y + -39, z + -14]) + divanWaypoints.push([x + -14, y + -39, z + 22]) + divanWaypoints.push([x + -42, y + -38, z + -28]) + divanWaypoints.push([x + -43, y + -40, z + -40]) + divanWaypoints.push([x + 25, y + -40, z + 17]) + divanWaypoints.push([x + 12, y + -40, z + 31]) + divanWaypoints.push([x + -31, y + -39, z + -40]) + divanWaypoints.push([x + -36, y + -38, z + 42]) + divanWaypoints.push([x + 7, y + -39, z + 22]) + divanWaypoints.push([x + 20, y + -39, z + -26]) + divanWaypoints.push([x + 12, y + -39, z + -43]) + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`) + } + else + { + divanWaypoints = [] + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`) + } + } +} + +register("renderWorld", () => { + waypointRender(divanWaypoints) +}) + + +register("worldLoad", () => { + divanWaypoints = [] +}) + +export default ""
\ No newline at end of file diff --git a/commands/coords/spiral.js b/commands/coords/spiral.js new file mode 100644 index 0000000..7092aa9 --- /dev/null +++ b/commands/coords/spiral.js @@ -0,0 +1,55 @@ +import constants from "../../util/constants" +import { waypointRender } from "../../util/helperFunctions" + +const PREFIX = constants.PREFIX +let spiralWaypoints = [] + +export function spiral(arg2) +{ + if(arg2 != "toggle") + { + new TextComponent(`${PREFIX}&bGo to the place in &3this&b picture and do /cw spiral toggle`) + .setClickAction("open_url") + .setClickValue("https://i.imgur.com/dyL30GD.png") + .chat() + } + else + { + if(spiralWaypoints[0] == undefined) + { + let startPos = [Player.getX(), Player.getY(), Player.getZ()] + spiralWaypoints.push([startPos[0]+2, startPos[1]-3, startPos[2]+14]) + spiralWaypoints.push([startPos[0]+3, startPos[1]-21, startPos[2]+6]) + spiralWaypoints.push([startPos[0]+6, startPos[1]-23, startPos[2]-1]) + spiralWaypoints.push([startPos[0]+19, startPos[1]+4, startPos[2]-5]) + spiralWaypoints.push([startPos[0]+21, startPos[1]-7, startPos[2]]) + spiralWaypoints.push([startPos[0]+25, startPos[1]-35, startPos[2]-8]) + spiralWaypoints.push([startPos[0]+39, startPos[1]-36, startPos[2]]) + spiralWaypoints.push([startPos[0]+52, startPos[1]-24, startPos[2]+1]) + spiralWaypoints.push([startPos[0]+48, startPos[1]+3, startPos[2]+3]) + spiralWaypoints.push([startPos[0]+47, startPos[1]+4, startPos[2]+22]) + spiralWaypoints.push([startPos[0]+55, startPos[1]-8, startPos[2]+42]) + spiralWaypoints.push([startPos[0]+46, startPos[1]-11, startPos[2]+49]) + spiralWaypoints.push([startPos[0]+26, startPos[1]+5, startPos[2]+39]) + spiralWaypoints.push([startPos[0]+20, startPos[1]+3, startPos[2]+41]) + spiralWaypoints.push([startPos[0]+8, startPos[1]-23, startPos[2]+32]) + spiralWaypoints.push([startPos[0]+4, startPos[1]-23, startPos[2]+28]) + ChatLib.chat(`${PREFIX}&bSpiral waypoints turned on!`) + } + else + { + spiralWaypoints = [] + ChatLib.chat(`${PREFIX}&bSpiral waypoints turned off!`) + } + } +} + +register("renderWorld", () => { + waypointRender(spiralWaypoints, true, true) +}) + +register("worldLoad", () => { + spiralWaypoints = [] +}) + +export default ""
\ No newline at end of file diff --git a/commands/coords/throne.js b/commands/coords/throne.js new file mode 100644 index 0000000..6e1e104 --- /dev/null +++ b/commands/coords/throne.js @@ -0,0 +1,50 @@ +import constants from "../../util/constants" +import { waypointRender } from "../../util/helperFunctions" + +const PREFIX = constants.PREFIX +let throneWaypoints = [] + + +export function throne(arg2) +{ + if(arg2 != "toggle") + { + ChatLib.chat(`${PREFIX}&bGo to the throne and sit on the back block then run /cw throne toggle.`) + } + else + { + 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 + 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 + { + throneWaypoints = [] + ChatLib.chat(`${PREFIX}&bThrone waypoints turned off!`) + } + } +} + + +register("renderWorld", () => { + waypointRender(throneWaypoints, true, true) +}) + + +register("worldLoad", () => { + throneWaypoints = [] +}) diff --git a/commands/coords/yog.js b/commands/coords/yog.js new file mode 100644 index 0000000..e02b4a2 --- /dev/null +++ b/commands/coords/yog.js @@ -0,0 +1,62 @@ +import constants from "../../util/constants" +import { waypointRender } from "../../util/helperFunctions" + +const PREFIX = constants.PREFIX +let yogWaypoints = [] + +export function yog(arg2) +{ + const WAYPOINTNAME = "Yog" + + if(arg2 != "toggle") + { + new TextComponent(`${PREFIX}&bGo to the leftmost corner of the topaz crystal facing bal close to bal then do /cw coords yog toggle.`) + .chat() + } + else + { + if(yogWaypoints[0] == undefined) + { + let startPos = [Player.getX(), Player.getY(), Player.getZ()], + x = startPos[0], + y = startPos[1], + z = startPos[2] + + console.log(x + " " + y + " " + z) + yogWaypoints.push([x + 10, y - 7, z - 27]) + yogWaypoints.push([x + 10, y - 7, z - 27]) + yogWaypoints.push([x + 28, y - 8, z + 15]) + yogWaypoints.push([x - 41, y - 3, z + 26]) + yogWaypoints.push([x - 32, y - 3, z + 45]) + yogWaypoints.push([x - 22, y - 3, z - 34]) + yogWaypoints.push([x + 28, y - 8, z + 36]) + yogWaypoints.push([x - 47, y - 3, z + 32]) + yogWaypoints.push([x - 43, y - 1, z + 4]) + yogWaypoints.push([x - 47, y + 2, z - 20]) + yogWaypoints.push([x + 11, y - 13, z + 40]) + yogWaypoints.push([x + 15, y - 13, z + 43]) + yogWaypoints.push([x - 44, y + 2, z - 29]) + yogWaypoints.push([x + 33, y - 4, z - 15]) + yogWaypoints.push([x - 6, y - 4, z - 34]) + yogWaypoints.push([x + 19, y - 12, z + 35]) + yogWaypoints.push([x + 16, y - 9, z - 15]) + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`) + } + else + { + yogWaypoints = [] + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`) + } + } +} + +register("renderWorld", () => { + if(yogWaypoints.length < 1) return + waypointRender(yogWaypoints) +}) + +register("worldLoad", () => { + yogWaypoints = [] +}) + +export default ""
\ No newline at end of file |