diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/divans.js | 83 | ||||
-rw-r--r-- | commands/grieferList.js | 23 | ||||
-rw-r--r-- | commands/help.js | 50 | ||||
-rw-r--r-- | commands/spiral.js | 51 | ||||
-rw-r--r-- | commands/throne.js | 43 | ||||
-rw-r--r-- | commands/yog.js | 2 |
6 files changed, 197 insertions, 55 deletions
diff --git a/commands/divans.js b/commands/divans.js new file mode 100644 index 0000000..b1ee97c --- /dev/null +++ b/commands/divans.js @@ -0,0 +1,83 @@ +import constants from "../util/constants" +import { waypointRender } from "../util/waypoints" + +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/grieferList.js b/commands/grieferList.js new file mode 100644 index 0000000..0762f8e --- /dev/null +++ b/commands/grieferList.js @@ -0,0 +1,23 @@ +/*import settings from "../settings" // future +import constants from "../util/constants" +const PREFIX = constants.PREFIX + +export function grieferList(arg2, arg3) +{ + switch(arg2) + { + case "list": + break + case "add": + let griefers = JSON.parse(FileLib.read("Coleweight", "config/grieferlist.txt")) + griefers.push({griefers: [name]}) + FileLib.write("Coleweight", "config/grieferlist.txt", `${JSON.stringify(griefers)}`) + ChatLib.chat(`${PREFIX}&aAdded ${arg3} to griefer list!`) + break + case "remove": + break + default: + ChatLib.chat(`${PREFIX}&cArgument '${arg2 ?? ""}' not found`) + break + } +}*/
\ No newline at end of file diff --git a/commands/help.js b/commands/help.js index 1157c65..05c5a04 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,22 +1,34 @@ -import constants from "../util/constants" -const PREFIX = constants.PREFIX +const PREFIX = "◆" export function help() { - ChatLib.chat("") - ChatLib.chat(`${PREFIX}&b/cw [username] => Gets coleweight`) - ChatLib.chat(`${PREFIX}&b/cw help => This menu.`) - ChatLib.chat(`${PREFIX}&b/cw settings => Open settings.`) - ChatLib.chat(`${PREFIX}&b/cw time => Prints time on timer (timer gui doesn't have to be visible).`) - ChatLib.chat(`${PREFIX}&b/cw tick <mining speed> <('r','jade', etc) || breaking power of block> => Shows tick data.`) - ChatLib.chat(`${PREFIX}&b/cw info => Prints coleweight info.`) - ChatLib.chat(`${PREFIX}&b/cw claim <throne || spiral> => Claims a chollows sapphire structure in a lobby.`) - ChatLib.chat(`${PREFIX}&b/cw setkey <key> => Sets API key (can also use /api new)`) - ChatLib.chat(`${PREFIX}&b/cw reload => Reloads the gui.`) - ChatLib.chat(`${PREFIX}&b/cw throne => Guide for setting up waypoints for throne.`) - ChatLib.chat(`${PREFIX}&b/cw spiral => Guide for setting up waypoints for spiral.`) - ChatLib.chat(`${PREFIX}&b/cw yog => Guide for setting up waypoints for yogs.`) - ChatLib.chat(`${PREFIX}&b/cw leaderboard => Gets leaderboard within a specific range (like 20 40)`) - ChatLib.chat(`${PREFIX}&b/fetchdiscord (username) => Gets discord of username (if linked)`) - ChatLib.chat("") -}
\ No newline at end of file + ChatLib.chat("&b--------------[ &a&lColeweight &b]--------------") + ChatLib.chat(ChatLib.getCenteredText("&a&lInfo")) + helpCommand("", "Gets Coleweight of specified user", "(username)") + helpCommand("help", "This menu.", "") + helpCommand("time", "Prints time on timer (timer gui doesn't have to be visible).", "") + helpCommand("tick", "Shows tick data.", "(mining speed) (('r','jade', etc) || breaking power of block))") + helpCommand("leaderboard", "Shows leaderboard.", "(min) [max]") + helpCommand("info", "Prints coleweight info.", "") + ChatLib.chat(ChatLib.getCenteredText("&a&lSettings")) + helpCommand("settings", "Opens settings.", "") + helpCommand("claim", "Claims a chollows sapphire structure in a lobby.", "(throne || spiral)") + helpCommand("setkey", "Sets API key (can also use /api new)-", "(key)") + helpCommand("reload", "Reloads the gui.", "") + ChatLib.chat(ChatLib.getCenteredText("&a&lWaypoints")) + helpCommand("coords", "Opens coords gui.", "") + helpCommand("throne", "Guide for setting up waypoints for throne.", "[toggle]") + helpCommand("spiral", "Guide for setting up waypoints for spiral", "[toggle]") + helpCommand("yog", "Shows instructions for yog waypoints.", "[toggle]") + helpCommand("divans", "Guide for setting up waypoints for Mines of Divan treasures.", "[toggle]") + ChatLib.chat(ChatLib.getCenteredText("&a&lMiscellaneous")) + ChatLib.chat(`&a${PREFIX} /fetchdiscord (username) => &bGets discord of username (if linked)`) + ChatLib.chat("&b------------------------------------------") +} + +// Made by Almighty Stylla <3 +function helpCommand(command, desc, usage) +{ + ChatLib.chat(new TextComponent(`&a${PREFIX} /cw ${command} => &b${desc}`).setHoverValue(`${"/cw " + command + " " + usage}`)) +} + diff --git a/commands/spiral.js b/commands/spiral.js index 122ee08..e25bbb5 100644 --- a/commands/spiral.js +++ b/commands/spiral.js @@ -1,5 +1,8 @@ import constants from "../util/constants" +import { waypointRender } from "../util/waypoints" + const PREFIX = constants.PREFIX +let spiralWaypoints = [] export function spiral(arg2) { @@ -12,31 +15,41 @@ export function spiral(arg2) } else { - if(constants.spiralValues[0] == undefined) + if(spiralWaypoints[0] == undefined) { let startPos = [Player.getX(), Player.getY(), Player.getZ()] - constants.spiralValues.push([startPos[0]+2, startPos[1]-3, startPos[2]+14]) - constants.spiralValues.push([startPos[0]+3, startPos[1]-21, startPos[2]+6]) - constants.spiralValues.push([startPos[0]+6, startPos[1]-23, startPos[2]-1]) - constants.spiralValues.push([startPos[0]+19, startPos[1]+4, startPos[2]-5]) - constants.spiralValues.push([startPos[0]+21, startPos[1]-7, startPos[2]]) - constants.spiralValues.push([startPos[0]+25, startPos[1]-35, startPos[2]-8]) - constants.spiralValues.push([startPos[0]+39, startPos[1]-36, startPos[2]]) - constants.spiralValues.push([startPos[0]+52, startPos[1]-24, startPos[2]+1]) - constants.spiralValues.push([startPos[0]+48, startPos[1]+3, startPos[2]+3]) - constants.spiralValues.push([startPos[0]+47, startPos[1]+4, startPos[2]+22]) - constants.spiralValues.push([startPos[0]+55, startPos[1]-8, startPos[2]+42]) - constants.spiralValues.push([startPos[0]+46, startPos[1]-11, startPos[2]+49]) - constants.spiralValues.push([startPos[0]+26, startPos[1]+5, startPos[2]+39]) - constants.spiralValues.push([startPos[0]+20, startPos[1]+3, startPos[2]+41]) - constants.spiralValues.push([startPos[0]+8, startPos[1]-23, startPos[2]+32]) - constants.spiralValues.push([startPos[0]+4, startPos[1]-23, startPos[2]+28]) + 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 { - constants.spiralValues = [] + spiralWaypoints = [] ChatLib.chat(`${PREFIX}&bSpiral waypoints turned off!`) } } -}
\ No newline at end of file +} + +register("renderWorld", () => { + waypointRender(spiralWaypoints) +}) + +register("worldLoad", () => { + spiralWaypoints = [] +}) + +export default ""
\ No newline at end of file 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 = [] +}) diff --git a/commands/yog.js b/commands/yog.js index 15a3d9b..9758321 100644 --- a/commands/yog.js +++ b/commands/yog.js @@ -9,7 +9,7 @@ export function yog(arg2) if(arg2 != "toggle") { - new TextComponent(`${PREFIX}&bGo to the leftmost corner of the topaz crystal facing bal close to bal then do /cw yog 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 |