aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chat/message.js46
-rw-r--r--commandManager.js37
-rw-r--r--commands/claim.js50
-rw-r--r--commands/divans.js83
-rw-r--r--commands/grieferList.js23
-rw-r--r--commands/help.js49
-rw-r--r--commands/leaderboard.js14
-rw-r--r--commands/markingLobbies.js17
-rw-r--r--commands/spiral.js51
-rw-r--r--commands/throne.js46
-rw-r--r--commands/yog.js62
-rw-r--r--index.js25
-rw-r--r--metadata.json6
-rw-r--r--render/bobombOverlay.js22
-rw-r--r--render/coordsGui.js96
-rw-r--r--render/downtimeGui.js85
-rw-r--r--render/naturals.js39
-rw-r--r--settings.js91
-rw-r--r--util/constants.js6
-rw-r--r--util/helperFunctions.js49
20 files changed, 748 insertions, 149 deletions
diff --git a/chat/message.js b/chat/message.js
index 333b823..79b6be1 100644
--- a/chat/message.js
+++ b/chat/message.js
@@ -22,17 +22,12 @@ register("chat", (level, typeOfChat, hypixelRank, username, playerMessage, event
if(!onward || cwlbData == undefined) return
cwlbPlayerData = cwlbData.filter(player => player.name == username)[0]
if(cwlbPlayerData == undefined) return
- cancel(event)
newMessage = new Message()
message = ChatLib.getChatMessage(event, true),
messagePrefix = message
+ cancel(event)
- if(cwlbPlayerData.rank > 0 && cwlbPlayerData.rank < 501)
- messagePrefix = message.slice(0, message.indexOf(':')) + ` &8[&6#${addCommas(cwlbPlayerData.rank)}&8]&f: `
- else if(hypixelRank == "" && typeOfChat == "")
- messagePrefix = message.slice(0, message.indexOf(':')) + `&7: `
- else
- messagePrefix = message.slice(0, message.indexOf(':')) + `&f: `
+ messagePrefix = message.slice(0, message.indexOf(':')) + ` &8[&6#${addCommas(cwlbPlayerData.rank)}&8]&f: `
newMessage.addTextComponent(messagePrefix)
@@ -45,8 +40,43 @@ register("chat", (level, typeOfChat, hypixelRank, username, playerMessage, event
ChatLib.chat(newMessage)
}).setCriteria(/^(\[\d+\] )?((?:(?:Guild|Party|Co-op) > )|(?:\[:v:\] ))?(\[\w+\+{0,2}\] )?(\w{1,16})(?: \[\w{1,6}\])?: (.*)$/g)
+register("messageSent", (origMessage, event) => { // emotes! this was fun to make :)
+ let commandState = 0,
+ command = "",
+ colonIndex1 = -1,
+ message = ""
+
+ for(let charIndex = 0; charIndex < origMessage.length; charIndex++)
+ {
+ if(origMessage[charIndex] == ":" && commandState == 0)
+ {
+ colonIndex1 = charIndex
+ commandState = 1
+ }
+ else if (origMessage[charIndex] == ":" && commandState == 1)
+ {
+ commandState = 2
+ command = origMessage.slice(colonIndex1 + 1, charIndex).toLowerCase()
+ }
+ }
+ if(command == "shrug")
+ {
+ cancel(event)
+ emote = "¯\\_(ツ)_/¯"
+ }
+ else if (command == "lenny")
+ {
+ cancel(event)
+ emote = "( ͡° ͜ʖ ͡°)"
+ }
+ else
+ return
+ message = origMessage.slice(0, colonIndex1) + emote + origMessage.slice(colonIndex1 + 2 + command.length, origMessage.length)
+ ChatLib.say(`${message}`)
+})
+
register("worldLoad", () => {
- axios.get(`https://ninjune.dev/api/coleweight-leaderboard`)
+ axios.get(`https://ninjune.dev/api/coleweight-leaderboard?length=500`)
.then(res => {
cwlbData = res.data
})
diff --git a/commandManager.js b/commandManager.js
index 66b05e3..cf28a8c 100644
--- a/commandManager.js
+++ b/commandManager.js
@@ -1,12 +1,15 @@
import { openTimerGui } from "./render/timerGui.js"
import { openPowderGui } from "./render/powertrackerGui"
+import { openCoordsGui } from "./render/coordsGui.js"
+import { openDowntimeGui } from "./render/downtimeGui.js"
import { openCwGui } from "./render/cwGui"
-import { help } from "./commands/help.js"
-import { reload } from "./commands/reload.js"
-import { setkey } from "./commands/setkey.js"
-import { spiral } from "./commands/spiral.js"
-import { throne } from "./commands/throne.js"
-import { leaderboard } from "./commands/leaderboard.js"
+import { help } from "./commands/help"
+import { reload } from "./commands/reload"
+import { setkey } from "./commands/setkey"
+import { spiral } from "./commands/spiral"
+import { throne } from "./commands/throne"
+import { yog } from "./commands/yog"
+import { leaderboard } from "./commands/leaderboard"
import { update } from "./commands/update"
import { fetchDiscord } from "./commands/fetchDiscord"
import { findColeweight } from "./commands/findColeweight"
@@ -16,6 +19,8 @@ import { time } from "./commands/time"
import { info } from "./commands/info"
import Settings from "./settings"
import constants from "./util/constants"
+import { clearLobbies } from "./commands/markingLobbies"
+import { divans } from "./commands/divans.js"
register("command", (arg, arg2, arg3) => {
if (arg == undefined) {findColeweight(arg); return}
@@ -41,6 +46,9 @@ register("command", (arg, arg2, arg3) => {
case "timer":
openTimerGui()
break
+ case "downtime":
+ openDowntimeGui()
+ break
default:
ChatLib.chat(`${constants.PREFIX}&cNo such gui as '${arg2}'.`)
}
@@ -79,12 +87,27 @@ register("command", (arg, arg2, arg3) => {
case "info":
info()
break
+ case "clearlobbies":
+ clearLobbies()
+ break
+ case "yog":
+ yog(arg2)
+ break
+ case "divans":
+ case "divan":
+ divans(arg2)
+ break
+ case "coord":
+ case "coords":
+ openCoordsGui()
+ break
default:
findColeweight(arg)
}
}).setTabCompletions((args) => {
let output = [],
- commands = ["setkey", "help", "move", "toggle", "throne", "spiral", "reload", "leaderboard", "settings", "claim", "tick", "time", "info"]
+ commands = ["setkey", "help", "move", "toggle", "throne", "spiral", "reload", "leaderboard",
+ "settings", "claim", "tick", "time", "info", "clearlobbies", "yog", "divan", "coords"]
if(args[0].length == 0 || args[0] == undefined)
output = commands
diff --git a/commands/claim.js b/commands/claim.js
index d549056..ae20924 100644
--- a/commands/claim.js
+++ b/commands/claim.js
@@ -2,7 +2,7 @@ import axios from "../../axios"
import settings from "../settings"
import constants from "../util/constants"
const PREFIX = constants.PREFIX
-
+const serverId = java.util.UUID.randomUUID().toString().replace("-", "")
export function claim(structure)
{
@@ -23,35 +23,56 @@ export function claim(structure)
ChatLib.chat(`${PREFIX}&cPlease enter the structure you wish to claim! (&3throne&c or &3spiral&c)`)
return
}
-
- axios.get(`https://ninjune.dev/api/claim?type=${structure}&id=${constants.serverData.server}&key=${constants.data.api_key}`)
+
+ axios.get(`https://ninjune.dev/api/claim?type=${structure}&lobby=${constants.serverData.server}&username=${Player.getName()}&serverID=${serverId}`)
.then(res => {
if(res.data.success)
ChatLib.chat(`${PREFIX}&aSuccessfully claimed ${constants.serverData.server} as your server!`)
else
- ChatLib.chat(`${PREFIX}&cError: ${res.data.reason}`)
+ {
+ ChatLib.chat(`${PREFIX}&cError: ${res.data.reason}.`)
+ if(res.data.code == 501)
+ {
+ ChatLib.chat(`${PREFIX}&cError: Not logged into the auth server. Try running the command again.`)
+ Client.getMinecraft().func_152347_ac().joinServer(Client.getMinecraft().func_110432_I().func_148256_e(), Client.getMinecraft().func_110432_I().func_148254_d(), serverId)
+ }
+ }
})
.catch(err => {
ChatLib.chat(`${PREFIX}&cError: ${err}`)
})
- // key is used above to verify that the player trying to claim the lobby is the intended player, don't know a better way of doing this.
+
}
+register('gameLoad', (event) => {
+ Client.getMinecraft().func_152347_ac().joinServer(Client.getMinecraft().func_110432_I().func_148256_e(), Client.getMinecraft().func_110432_I().func_148254_d(), serverId)
+})
register('worldLoad', () => {
if(!settings.claiming) return
-
+ axios.get(`https://ninjune.dev/api/unclaim?username=${Player.getName()}&serverID=${serverId}`)
+ .then(res => {
+ if(settings.debug && !res.data.success)
+ ChatLib.chat("Unclaim: " + res.data.reason)
+ if(res.data.code == 501)
+ Client.getMinecraft().func_152347_ac().joinServer(Client.getMinecraft().func_110432_I().func_148256_e(), Client.getMinecraft().func_110432_I().func_148254_d(), serverId)
+ })
+ .catch(err => {
+ if(settings.debug)
+ ChatLib.chat(`${PREFIX}&cError: ${err}`)
+ })
+ // unclaims the lobby, isn't needed but will allow another player to claim lobby after claimer leaves.
setTimeout(() => {
const NetHandlerPlayClient = Client.getConnection(),
- PlayerMap = NetHandlerPlayClient.func_175106_d() // getPlayerInfoMap
+ PlayerMap = NetHandlerPlayClient.func_175106_d() // getPlayerInfoMap
if(settings.debug) console.log(constants.serverData.server)
- axios.get(`https://ninjune.dev/api/claim?claimedlobby=${constants.serverData.server}`)
+ axios.get(`https://ninjune.dev/api/claimed?serverID=${constants.serverData.server}&authServer=${serverId}&passedName=${Player.getName()}`)
.then(res => {
if(res.data.claimed)
{
- PlayerMap.filter(player => player.func_178853_c() > 0 && !player.func_178845_a().name.startsWith("!")).forEach((PlayerMP) => {
- let player = PlayerMP.func_178845_a().name
+ PlayerMap.filter(player => player.func_178853_c() /* getResponseTime */ > 0 && !player.func_178845_a()/* getGameProfile */.name.startsWith("!")).forEach((PlayerMP) => {
+ let player = PlayerMP.func_178845_a()/* getGameProfile */.name
res.data.structures.forEach((structure) => {
if (player == structure.player)
@@ -60,15 +81,14 @@ register('worldLoad', () => {
})
})
}
+ else if (res.data.err && settings.debug)
+ {
+ ChatLib.chat("Check claim: " + res.data.reason)
+ }
})
.catch(err => {
if(!settings.debug) return
ChatLib.chat(`${PREFIX}&cError: ${err}`)
})
}, 2000)
-})
-
-register('worldUnload', () => {
- axios.get(`https://ninjune.dev/api/unclaim?claimedlobby=${constants.serverData.server}&key=${constants.data.api_key}`)
- // unclaims the lobby, isn't needed but will allow another player to claim lobby after claimer leaves. key used to verify identity of unclaimer.
}) \ No newline at end of file
diff --git a/commands/divans.js b/commands/divans.js
new file mode 100644
index 0000000..c5e618a
--- /dev/null
+++ b/commands/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/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 3c20b01..05c5a04 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -1,21 +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 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/leaderboard.js b/commands/leaderboard.js
index 2b2699f..80a3448 100644
--- a/commands/leaderboard.js
+++ b/commands/leaderboard.js
@@ -4,13 +4,13 @@ const PREFIX = constants.PREFIX
export function leaderboard(arg2, arg3)
{
- if(arg2 != undefined && parseInt(arg2) == arg2 && !isNaN(parseInt(arg2, 10)))
+ if(arg2 != undefined && parseInt(arg2) == arg2 && !isNaN(parseInt(arg2)))
{
- if(arg3 == undefined && parseInt(arg2) == arg2 && !isNaN(parseInt(arg2, 10)))
+ if(arg3 == undefined && parseInt(arg2) == arg2 && !isNaN(parseInt(arg2)))
{
- axios.get(`https://ninjune.dev/api/coleweight-leaderboard`)
+ axios.get(`https://ninjune.dev/api/coleweight-leaderboard?length=${arg2}`)
.then(res => {
- for(let i = 0; i < arg2; i++)
+ for(let i = 0; i < res.data.length; i++)
{
ChatLib.chat(`&a${res.data[i].rank}. &b${res.data[i].name}: &f${res.data[i].coleweight}`)
}
@@ -19,11 +19,11 @@ export function leaderboard(arg2, arg3)
ChatLib.chat(`${PREFIX}&4Error! &eApi might be down.`)
})
}
- else if(parseInt(arg3) == arg3 && !isNaN(parseInt(arg3, 10)))
+ else if(parseInt(arg3) == arg3 && !isNaN(parseInt(arg3)))
{
- axios.get(`https://ninjune.dev/api/coleweight-leaderboard`)
+ axios.get(`https://ninjune.dev/api/coleweight-leaderboard?length=${arg3}`)
.then(res => {
- for(let i = arg2 - 1; i < arg3; i++)
+ for(let i = arg2 - 1; i < res.data.length; i++)
{
ChatLib.chat(`&a${res.data[i].rank}. &b${res.data[i].name}: &f${res.data[i].coleweight}`)
}
diff --git a/commands/markingLobbies.js b/commands/markingLobbies.js
new file mode 100644
index 0000000..6db976e
--- /dev/null
+++ b/commands/markingLobbies.js
@@ -0,0 +1,17 @@
+import settings from "../settings"
+import constants from "../util/constants"
+const PREFIX = constants.PREFIX
+let lobbies = []
+
+export function clearLobbies()
+{
+ lobbies = []
+}
+
+register('chat', (server) => {
+ if(!settings.lobbyMarking) return
+ if(lobbies.indexOf(server) > 0)
+ ChatLib.chat(`${PREFIX}&aYou've been in this lobby!`)
+ else
+ lobbies.push(server)
+}).setCriteria(/Sending to server ([A-Za-z0-9]+)\.\.\./g) \ No newline at end of file
diff --git a/commands/spiral.js b/commands/spiral.js
index 122ee08..6574f18 100644
--- a/commands/spiral.js
+++ b/commands/spiral.js
@@ -1,5 +1,8 @@
import constants from "../util/constants"
+import { waypointRender } from "../util/helperFunctions"
+
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, true)
+})
+
+register("worldLoad", () => {
+ spiralWaypoints = []
+})
+
+export default "" \ No newline at end of file
diff --git a/commands/throne.js b/commands/throne.js
index 717ba3c..517c93d 100644
--- a/commands/throne.js
+++ b/commands/throne.js
@@ -1,5 +1,9 @@
import constants from "../util/constants"
+import { waypointRender } from "../util/helperFunctions"
+
const PREFIX = constants.PREFIX
+let throneWaypoints = []
+
export function throne(arg2)
{
@@ -9,28 +13,38 @@ 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, true)
+})
+
+
+register("worldLoad", () => {
+ throneWaypoints = []
+})
diff --git a/commands/yog.js b/commands/yog.js
new file mode 100644
index 0000000..1544553
--- /dev/null
+++ b/commands/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
diff --git a/index.js b/index.js
index e3bdad8..bb38e78 100644
--- a/index.js
+++ b/index.js
@@ -1,8 +1,9 @@
+import './render/naturals'
+import './render/tabList'
+import './commands/yog'
import './chat/apiNew'
import './chat/message'
-
import './chat/serverdata'
-import './render/tabList'
import './commandManager'
import './util/updater'
import './util/grieferTrack'
@@ -10,26 +11,6 @@ import axios from '../axios'
import constants from './util/constants';
const PREFIX = constants.PREFIX
-//world update (coords)
-register("renderWorld", () => {
- if(constants.throneValues[0] != undefined)
- {
- for(let i = 0; i < constants.throneValues.length; i++)
- {
- Tessellator.drawString(i+1, constants.throneValues[i][0], constants.throneValues[i][1], constants.throneValues[i][2])
- }
- }
- if(constants.spiralValues[0] != undefined)
- {
- for(let i = 0; i < constants.spiralValues.length; i++)
- {
- Tessellator.drawString(i+1, constants.spiralValues[i][0], constants.spiralValues[i][1], constants.spiralValues[i][2])
- }
- }
-
-})
-
-
//update every second (dogshit code)
register("step", () => {
// first time check
diff --git a/metadata.json b/metadata.json
index 10fa70f..e177ffb 100644
--- a/metadata.json
+++ b/metadata.json
@@ -2,7 +2,7 @@
"name": "Coleweight",
"creator": "Ninjune",
"entry": "index.js",
- "description": "Simple Coleweight module to measure mining progression.",
- "version": "1.6.3",
- "requires": ["axios", "PogData", "Vigilance"]
+ "description": "Mining utilities.",
+ "version": "1.6.9",
+ "requires": ["axios", "PogData", "Vigilance", "Elementa"]
} \ No newline at end of file
diff --git a/render/bobombOverlay.js b/render/bobombOverlay.js
deleted file mode 100644
index 02526bd..0000000
--- a/render/bobombOverlay.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*import RenderLib from "../../RenderLib/index.js";
-Disabled.
-register('renderWorld', () => {
- try{
- if(Player.getHeldItem().getItemNBT().getTag('tag').getTag('ExtraAttributes').getTag("id").toString() != `"BOB_OMB"`) return
- } catch(e) {return}
-
- const boxR = 0.3,
- boxB = 0.5,
- boxG = 0,
- boxAlpha = 0.3
-
- let x = Math.floor(Player.getX()) + 0.5,
- y = Math.floor(Player.getY())
- z = Math.floor(Player.getZ()) + 0.5
-
-
-
- RenderLib.drawInnerEspBox(x, y - 1, z - 8, 1, 1, boxR, boxB, boxG, boxAlpha, true)
- RenderLib.drawInnerEspBox(x + 1, y + 1, z - 7, 1, 1, boxR, boxB, boxG, boxAlpha, true)
- RenderLib.drawInnerEspBox(x + 1, y + 1, z - 7, 1, 1, boxR, boxB, boxG, boxAlpha, true)
-})*/ \ No newline at end of file
diff --git a/render/coordsGui.js b/render/coordsGui.js
new file mode 100644
index 0000000..9fd5f43
--- /dev/null
+++ b/render/coordsGui.js
@@ -0,0 +1,96 @@
+import {
+ AdditiveConstraint,
+ animate,
+ Animations,
+ CenterConstraint,
+ ChildBasedMaxSizeConstraint,
+ ChildBasedSizeConstraint,
+ ConstantColorConstraint,
+ FillConstraint,
+ MaxConstraint,
+ ScissorEffect,
+ SiblingConstraint,
+ SubtractiveConstraint,
+ UIBlock,
+ UIImage,
+ UIWrappedText,
+ UIMultilineTextInput,
+ UIText,
+ WindowScreen,
+ } from "../../Elementa"
+
+// stylla made 2 lines of code (gamer)
+const Color = Java.type("java.awt.Color"),
+ URL = Java.type("java.net.URL"),
+ WIDTH = 3.5, // not actually width more like reverse of width lmao, bigger = smaller
+ HEIGHT = 2.877 // ^
+let ScreenW = Renderer.screen.getWidth(),
+ ScreenH = Renderer.screen.getHeight()
+
+function coordsWindow(row, column, title