diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/changeLogGUI/index.js | 8 | ||||
-rw-r--r-- | features/cosmetics/cosmetic/dragon/dragonWings.js | 2 | ||||
-rw-r--r-- | features/cosmetics/index.js | 2 | ||||
-rw-r--r-- | features/dataLoader/index.js | 4 | ||||
-rw-r--r-- | features/dungeonMap/index.js | 19 | ||||
-rw-r--r-- | features/dungeonRoutes/index.js | 71 | ||||
-rw-r--r-- | features/dungeonRoutes/routesData.json | 1299 | ||||
-rw-r--r-- | features/dungeonSolvers/index.js | 6 | ||||
-rw-r--r-- | features/events/index.js | 2 | ||||
-rw-r--r-- | features/globalSettings/index.js | 37 | ||||
-rw-r--r-- | features/networthGUI/index.js | 12 | ||||
-rw-r--r-- | features/settings/helpDataLoader.js | 22 | ||||
-rw-r--r-- | features/spamHider/index.js | 2 | ||||
-rw-r--r-- | features/statHistoryGui/index.js | 8 | ||||
-rw-r--r-- | features/streamsGUI/index.js | 4 | ||||
-rw-r--r-- | features/suggestionsGui/index.js | 14 |
16 files changed, 1244 insertions, 268 deletions
diff --git a/features/changeLogGUI/index.js b/features/changeLogGUI/index.js index d370b50..4d392bd 100644 --- a/features/changeLogGUI/index.js +++ b/features/changeLogGUI/index.js @@ -24,7 +24,7 @@ class ChangeLogGui extends Feature { onEnable() { this.initVariables() - + this.ChangelogPage = new ChangelogPage() this.latestAnnouncedVersion = this.ChangelogPage.currVersionId @@ -137,7 +137,7 @@ class ChangelogPage extends GuiPage { } loadChangeLog() { - fetch("http://soopymc.my.to/api/soopyv2/changelog.json").json(data => { + fetch("http://soopy.dev/api/soopyv2/changelog.json").json(data => { this.changelogData = data.changelog.reverse() @@ -168,7 +168,7 @@ class ChangelogPage extends GuiPage { this.openSidebarPage(this.updatingSidebar) } - + downloadUpdate() { new Thread(() => { this.updatingSidebarConfirmPage.location.location.x.set(-1, 500) @@ -178,7 +178,7 @@ class ChangelogPage extends GuiPage { this.progressBar.setProgress(0.1) - this.urlToFile("http://soopymc.my.to/api/soopyv2/downloadLatest.zip", "./config/ChatTriggers/modules/SoopyAddonsTempDownload/SoopyAddons.zip", 10000, 20000) + this.urlToFile("http://soopy.dev/api/soopyv2/downloadLatest.zip", "./config/ChatTriggers/modules/SoopyAddonsTempDownload/SoopyAddons.zip", 10000, 20000) this.progressBar.setProgress(0.5) diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/features/cosmetics/cosmetic/dragon/dragonWings.js index fc447d3..a309e58 100644 --- a/features/cosmetics/cosmetic/dragon/dragonWings.js +++ b/features/cosmetics/cosmetic/dragon/dragonWings.js @@ -19,7 +19,7 @@ let loadingTextures = new Set() function loadTexture(id) { new Thread(() => { loadingTextures.add(id) - textures.set(id, renderLibs.getImage("http://soopymc.my.to/api/soopyv2/textures/cosmetic/dragon/" + id + "/img.png", true)) + textures.set(id, renderLibs.getImage("http://soopy.dev/api/soopyv2/textures/cosmetic/dragon/" + id + "/img.png", true)) }).start() } loadTexture("classic") diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js index 6c832ef..dcac5e9 100644 --- a/features/cosmetics/index.js +++ b/features/cosmetics/index.js @@ -84,7 +84,7 @@ class Cosmetics extends Feature { } loadCosmeticsData() { - fetch("http://soopymc.my.to/api/soopyv2/cosmetics.json").json(data => { + fetch("http://soopy.dev/api/soopyv2/cosmetics.json").json(data => { this.cosmeticsData = data this.playerHasACosmeticA = !!data[Player.getUUID().toString().replace(/-/g, "")] if (this.playerHasACosmeticA && !this.postRenderEntityTrigger) { diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js index d31bd86..d4134d2 100644 --- a/features/dataLoader/index.js +++ b/features/dataLoader/index.js @@ -94,7 +94,7 @@ class DataLoader extends Feature { } step_5min() { - fetch("http://soopymc.my.to/api/v2/mayor").json(data => { + fetch("http://soopy.dev/api/v2/mayor").json(data => { if (!data.success) return this.mayorData = data.data this.currentMayorPerks = new Set(data.data.mayor.perks.map(a => a.name)) @@ -111,7 +111,7 @@ class DataLoader extends Feature { this.loadApiData("skyblock", false) } loadApi() { - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + Player.getUUID().replace(/-/g, "")).json(data => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + Player.getUUID().replace(/-/g, "")).json(data => { if (!data.success) return diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index 68adf7e..cdc3ade 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -64,6 +64,7 @@ class DungeonMap extends Feature { this.keys = 0 this.roomDataStuff = new Map() + this.roomDataStuffRender = new Map() // this.invMapImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB) // this.renderImage = new BufferedImage(this.IMAGE_SIZE, this.IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB) this.mapData = undefined @@ -189,7 +190,7 @@ class DungeonMap extends Feature { lastXY = loc.join(",") return } - if (curr === max) curr = "&a" + curr + // if (curr === max) curr = "&a" + curr if (this.roomDataStuff.get(loc.join(",")) !== curr + " " + max) { this.roomDataStuff.set(loc.join(","), curr + " " + max) @@ -353,7 +354,7 @@ class DungeonMap extends Feature { drawOtherMisc2(x2, y2, size, scale) { if (this.currDungeonBossImage) return if (this.roomsecrets.getValue()) { - for (let ent of this.roomDataStuff.entries()) { + for (let ent of this.roomDataStuffRender.entries()) { let [loc, val] = ent let [x, y] = loc.split(",") @@ -855,6 +856,7 @@ class DungeonMap extends Feature { if (this.offset && this.offset.length === 2) { + this.roomDataStuffRender.clear() for (let ent of this.roomDataStuff.entries()) { let [loc] = ent let [x, y] = loc.split(",") @@ -863,19 +865,24 @@ class DungeonMap extends Feature { let renderY = Math.round((parseInt(y) + 16) / this.mapScale + this.offset[1])// / 128 * size // console.log(renderX, renderY) let isGreen = false + let color = "&8" for (let i = 0; i < 10; i++) { if (bytes[renderX + i + (renderY + i) * 128] === 30 || bytes[renderX + i + 1 + (renderY + i) * 128] === 30) { isGreen = true + color = "&a" + } + if (bytes[renderX + i + (renderY + i) * 128] === 34 + || bytes[renderX + i + 1 + (renderY + i) * 128] === 34) { + color = "&f" } } - console.log(ent[1], isGreen) if (isGreen) { let total = ent[1].split(" ")[1] - ent[1] = "&a" + total + " " + total - console.log(ent[1]) + this.roomDataStuff.set(loc, total + " " + total) } - console.log(ent[1], isGreen) + + this.roomDataStuffRender.set(loc, color + this.roomDataStuff.get(loc)) } } // if (!this.renderImage) return diff --git a/features/dungeonRoutes/index.js b/features/dungeonRoutes/index.js index a7d8691..3eb50c3 100644 --- a/features/dungeonRoutes/index.js +++ b/features/dungeonRoutes/index.js @@ -3,6 +3,7 @@ import { m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; import { drawBoxAtBlock, drawBoxAtBlock2, drawFilledBox, drawLine, drawLinePoints } from "../../utils/renderUtils"; +import { calculateDistanceQuick } from "../../utils/utils"; import SettingBase from "../settings/settingThings/settingBase"; const EntityItem = Java.type("net.minecraft.entity.item.EntityItem") @@ -70,7 +71,8 @@ class DungeonRoutes extends Feature { this.recordingData[this.recordingData.length - 1].tnts.forEach((loc) => { drawFilledBox(loc[0], loc[1] - 0.5, loc[2], 1, 1, 1, 0, 0, 50 / 255, true) }) - this.recordingData[this.recordingData.length - 1].interacts.forEach(({ loc }) => { + this.recordingData[this.recordingData.length - 1].interacts.forEach((data) => { + let loc = data.loc drawFilledBox(loc[0], loc[1], loc[2], 1, 1, 0, 0, 1, 50 / 255, true) drawBoxAtBlock(loc[0] - 0.5, loc[1], loc[2] - 0.5, 0, 0, 1, 1, 1, 1) }) @@ -79,7 +81,6 @@ class DungeonRoutes extends Feature { } if (this.currRoomData) { - drawBoxAtBlock(...this.toRoomCoordinates(0, 70, 0), 1, 0, 0, 1, 1, 1) if (this.currentRouteDisplay) { this.currentRouteDisplay[this.currentActionIndex].etherwarps.forEach(loc => { let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) @@ -87,17 +88,17 @@ class DungeonRoutes extends Feature { drawBoxAtBlock(coords[0] - 0.5, coords[1], coords[2] - 0.5, 1, 0, 0, 1, 1, 1) }) this.currentRouteDisplay[this.currentActionIndex].mines.forEach(loc => { - let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) - drawFilledBox(coords[0], coords[1] + 0.5, coords[2], 1, 1, 0, 255, 0, 50 / 255, true) + let coords = this.toRoomCoordinates(loc[0], loc[1] - 0.5, loc[2]) + drawBoxAtBlock(coords[0] - 0.5, coords[1], coords[2] - 0.5, 1, 1, 0, 1, 1, 50 / 255) }) this.currentRouteDisplay[this.currentActionIndex].tnts.forEach(loc => { let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) - drawFilledBox(coords[0], coords[1] + 0.5, coords[2] + 0.5, 1, 1, 255, 0, 0, 50 / 255, true) + drawBoxAtBlock(coords[0] - 0.5, coords[1] + 0.5, coords[2] - 0.5, 1, 1, 255, 1, 1, 50 / 255) }) this.currentRouteDisplay[this.currentActionIndex].interacts.forEach((data) => { let coords = this.toRoomCoordinates(data.loc[0], data.loc[1], data.loc[2]) drawFilledBox(coords[0], coords[1], coords[2], 1, 1, 0, 0, 1, 50 / 255, true) - drawBoxAtBlock(coords[0], coords[1], coords[2], 0, 0, 1, 1, 1, 1) + drawBoxAtBlock(coords[0] - 0.5, coords[1], coords[2] - 0.5, 0, 0, 1, 1, 1, 1) }) // if (this.currentRouteDisplay.locations.length >= 2) drawLinePoints(this.currentRouteDisplay.locations.map(a => this.toRoomCoordinates(...a)).map(a => [a[0] - 0.5, a[1] + 0.1, a[2] - 0.5]), 0, 0, 255, 2, false) @@ -144,14 +145,14 @@ class DungeonRoutes extends Feature { let data = { index: this.fullRoomData[this.idMap.get(this.lastRoomId)].index, data: this.recordingData.map(a => { - a.etherwarps = a.etherwarps.map(a => this.fromRoomCoordinates(a[0] + 0.5, a[1], a[2] + 0.5)) - a.mines = a.mines.map(a => this.fromRoomCoordinates(a[0] + 0.5, a[1], a[2] + 0.5)) + a.etherwarps = a.etherwarps.map(a => this.fromRoomCoordinates(a[0], a[1], a[2])) + a.mines = a.mines.map(a => this.fromRoomCoordinates(a[0], a[1], a[2])) a.locations = a.locations.map(a => this.fromRoomCoordinates(...a)) a.interacts = a.interacts.map(b => { - b.pos = this.fromRoomCoordinates(...b.pos) + b.loc = this.fromRoomCoordinates(...b.loc) return b }) - a.tnts = a.tnts.map(a => this.fromRoomCoordinates(a[0] + 0.5, a[1], a[2] + 0.5)) + a.tnts = a.tnts.map(a => this.fromRoomCoordinates(a[0], a[1], a[2])) return a }) @@ -172,24 +173,6 @@ class DungeonRoutes extends Feature { this.registerStep(true, 5, () => { if (this.currRoomData) { if (this.currentRouteDisplay) { - // this.currentRouteDisplay.etherwarps.forEach(loc => { - // let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) - // drawFilledBox(coords[0] + 0.5, coords[1], coords[2] + 0.5, 1, 1, 1, 0, 0, 50 / 255, true) - // drawBoxAtBlock(coords[0], coords[1], coords[2], 1, 0, 0, 1, 1, 1) - // }) - // this.currentRouteDisplay.mines.forEach(loc => { - // let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) - // drawFilledBox(coords[0] + 0.5, coords[1] + 0.5, coords[2] + 0.5, 1, 1, 0, 255, 0, 50 / 255, true) - // }) - // this.currentRouteDisplay.tnts.forEach(loc => { - // let coords = this.toRoomCoordinates(loc[0], loc[1] - 1, loc[2]) - // drawFilledBox(coords[0] + 0.5, coords[1] + 0.5, coords[2] + 0.5, 1, 1, 255, 0, 0, 50 / 255, true) - // }) - // this.currentRouteDisplay.interacts.forEach(loc => { - // let coords = this.toRoomCoordinates(loc[0], loc[1], loc[2]) - // drawFilledBox(coords[0] + 0.5, coords[1], coords[2] + 0.5, 1, 1, 0, 0, 1, 50 / 255, true) - // drawBoxAtBlock(coords[0], coords[1], coords[2], 0, 0, 1, 1, 1, 1) - // }) if (this.currentRouteDisplay[this.currentActionIndex].locations.length >= 2) this.drawLineMultipleParticles(this.currentRouteDisplay[this.currentActionIndex].locations.map(a => this.toRoomCoordinates(a[0], a[1], a[2]))) @@ -202,7 +185,7 @@ class DungeonRoutes extends Feature { if (type) { this.recordingData[this.recordingData.length - 1][type].push(point) } - if (!type || type === "interact") { + if (!type || type === "interacts") { this.recordingData.push({ etherwarps: [], mines: [], @@ -411,7 +394,7 @@ class DungeonRoutes extends Feature { if (event.entity instanceof EntityItem) { // console.log("Blaze joined world") let e = new Entity(event.entity) - let pos = { x: e.getX(), y: e.getY(), z: e.getZ() } + let pos = [e.getX(), e.getY(), e.getZ()] this.tempItemIdLocs.set(event.entity[m.getEntityId.Entity](), pos) // console.log(event.entity[m.getEntityId.Entity]()) @@ -419,24 +402,46 @@ class DungeonRoutes extends Feature { } pickupItem(packet) { - if (!this.recordRoute) return let packetType = new String(packet.class.getSimpleName()).valueOf() if (packetType === "S0DPacketCollectItem") { let pos = this.tempItemIdLocs.get(packet[m.getCollectedItemEntityID]()) + let data = this.currentRouteDisplay[this.currentActionIndex].interacts[0] + if (data && data.type === "item") { + let coords = this.toRoomCoordinates(data.loc[0], data.loc[1], data.loc[2]) + if (calculateDistanceQuick(pos, coords) < 2) { + if (this.currentRouteDisplay.length >= this.currentActionIndex) { + this.currentActionIndex++ + } + } + } + + if (!this.recordRoute) return if (pos) this.addRecordingPoint("interacts", { loc: pos, type: "item" }) } } playerInteract(action, position, event) { - if (!this.recordRoute) return if (action.toString() !== "RIGHT_CLICK_BLOCK") return - let pos = { x: Player.lookingAt().getX() + 0.5, y: Player.lookingAt().getY(), z: Player.lookingAt().getZ() + 0.5 } + let pos = [Player.lookingAt().getX() + 0.5, Player.lookingAt().getY(), Player.lookingAt().getZ() + 0.5] let id = Player.lookingAt().getType().getID() if (id !== 54 && id !== 144 && id !== 69) return + + let data = this.currentRouteDisplay[this.currentActionIndex].interacts[0] + if (data && data.type === "interact") { + let coords = this.toRoomCoordinates(data.loc[0], data.loc[1], data.loc[2]) + console.log(coords.join(","), pos.join(",")) + if (coords.join(",") === pos.join(",")) { + if (this.currentRouteDisplay.length > this.currentActionIndex) { + this.currentActionIndex++ + } + } + } + + if (!this.recordRoute) return this.addRecordingPoint("interacts", { loc: pos, type: "interact" }) } diff --git a/features/dungeonRoutes/routesData.json b/features/dungeonRoutes/routesData.json index ed64acf..d701fc7 100644 --- a/features/dungeonRoutes/routesData.json +++ b/features/dungeonRoutes/routesData.json @@ -1,350 +1,1293 @@ [ { - "index": 86, + "index": 84, "data": [ { "etherwarps": [ [ - 10.5, - 82, - -20.5 + 23.5, + 83, + 12.5 + ] + ], + "mines": [], + "locations": [ + [ + -4, + 68, + 16 ], [ - 8.5, - 82, - 19.5 + 23, + 83, + 13 ], [ - 12.5, - 93, - 21.5 + 24, + 84, + 13 + ], + [ + 24, + 85, + 13 + ], + [ + 25, + 85, + 13 + ], + [ + 25, + 84, + 12 + ], + [ + 25, + 84, + 11 + ], + [ + 26, + 84, + 11 + ], + [ + 27, + 84, + 9 + ], + [ + 26, + 84, + 6 + ], + [ + 23, + 84, + 5 + ], + [ + 19, + 84, + 5 + ], + [ + 19, + 85, + 5 + ] + ], + "interacts": [ + { + "loc": [ + 17.5, + 84, + 5.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [ + [ + -1.5, + 85, + 23.5 ] ], "mines": [ [ - 4.5, - 82.5, - -19.5 + -2.5, + 84.5, + 23.5 ] ], "locations": [ [ - 18, - 69, - -25 + 19, + 85, + 5 ], [ - 16, - 69, - -24 + 21, + 85, + 5 ], [ - 15, - 69, - -24 + 22, + 84, + 5 ], [ - 14, - 69, - -24 + 25, + 84, + 7 ], [ - 14, - 67, - -24 + 26, + 84, + 10 ], [ - 14, - 64, - -24 + 25, + 84, + 13 ], [ - 14, - 61, - -24 + 24, + 85, + 13 ], [ - 11, - 82, - -20 + 24, + 84, + 14 ], [ - 10, - 82, - -20 + 23, + 83, + 14 ], [ - 9, - 82, - -20 + -2, + 85, + 24 ], [ - 8, - 82, - -19 + -2, + 84, + 24 ], [ - 7, - 82, - -19 + -3, + 84, + 24 ], [ - 6, - 82, - -19 + -6, + 84, + 24 ], [ - 6, + -8, 83, - -19 + 24 ], [ - 5, + -8, + 81, + 24 + ], + [ + -8, + 84, + 24 + ], + [ + -11, + 83, + 24 + ], + [ + -15, + 83, + 24 + ], + [ + -18, + 83, + 24 + ], + [ + -21, + 83, + 25 + ] + ], + "interacts": [ + { + "loc": [ + -21.5, + 83, + 25.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [ + [ + -18.5, + 91, + 24.5 + ], + [ + -9.5, + 83, + 2.5 + ] + ], + "mines": [], + "locations": [ + [ + -21, + 83, + 25 + ], + [ + -19, + 92, + 25 + ], + [ + -19, + 91, + 25 + ], + [ + -17, + 91, + 22 + ], + [ + -17, + 91, + 21 + ], + [ + -15, + 91, + 18 + ], + [ + -16, + 91, + 21 + ], + [ + -16, + 91, + 19 + ], + [ + -15, + 90, + 17 + ], + [ + -15, + 88, + 16 + ], + [ + -14, + 86, + 13 + ], + [ + -15, + 86, + 10 + ], + [ + -15, + 84, + 8 + ], + [ + -15, + 83, + 6 + ], + [ + -16, + 83, + 4 + ], + [ + -10, + 84, + 3 + ], + [ + -10, + 83, + 3 + ], + [ + -8, + 83, + 3 + ] + ], + "interacts": [ + { + "loc": [ + -4.5, + 84, + 1.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [ + [ + -4.5, + 88, + 1.5 + ], + [ + -4.5, + 92, + 1.5 + ] + ], + "mines": [], + "locations": [ + [ + -8, + 83, + 3 + ], + [ + -5, + 89, + 2 + ], + [ + -5, + 88, + 2 + ], + [ + -5, + 92, + 2 + ] + ], + "interacts": [ + { + "loc": [ + -4.5, + 93, + 1.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [], + "mines": [], + "locations": [ + [ + -5, + 92, + 2 + ], + [ + -8, + 92, + 2 + ], + [ + -11, + 92, + 1 + ], + [ + -11, + 96, + 1 + ], + [ + -11, + 97, + 1 + ], + [ + -13, + 96, + 1 + ], + [ + -13, + 97, + 1 + ], + [ + -13, + 96, + 1 + ], + [ + -13, + 92, + 1 + ], + [ + -13, + 92, + 2 + ], + [ + -13, + 92, + 1 + ], + [ + -13, + 93, + 1 + ], + [ + -13, + 92, + 1 + ] + ], + "interacts": [ + { + "loc": [ + -16.5, + 92, + 0.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [ + [ + -6.5, + 91, + 8.5 + ] + ], + "mines": [], + "locations": [ + [ + -13, + 92, + 1 + ], + [ + -13, + 93, + 1 + ], + [ + -13, + 93, + 2 + ], + [ + -14, + 92, + 2 + ], + [ + -15, + 92, + 2 + ], + [ + -16, + 92, + 2 + ], + [ + -18, + 92, + 3 + ], + [ + -18, + 92, + 4 + ], + [ + -18, + 92, + 5 + ], + [ + -18, + 93, + 5 + ], + [ + -18, + 94, + 5 + ], + [ + -18, + 93, + 8 + ], + [ + -18, + 92, + 9 + ], + [ + -18, + 90, + 10 + ], + [ + -18, + 87, + 11 + ], + [ + -18, + 84, + 11 + ], + [ + -18, + 83, + 11 + ], + [ + -7, + 91, + 9 + ], + [ + -8, + 91, + 8 + ], + [ + -8, + 93, + 8 + ], + [ + -8, + 92, + 8 + ], + [ + -10, + 92, + 10 + ], + [ + -10, + 90, + 10 + ], + [ + -10, + 87, + 11 + ], + [ + -8, + 86, + 11 + ], + [ + -7, + 85, + 12 + ], + [ + -7, + 83, + 12 + ], + [ + -5, + 83, + 10 + ], + [ + -1, + 83, + 11 + ], + [ + 3, + 83, + 12 + ], + [ + 7, + 83, + 12 + ], + [ + 9, 82, - -19 + 12 ], [ - 5, + 11, 80, - -19 + 13 ], [ - 5, - 78, - -19 + 12, + 77, + 13 ], [ - 5, - 74, - -19 + 13, + 73, + 14 ], [ - 5, - 72, - -19 + 14, + 68, + 14 ], [ - 4, - 69, + 15, + 62, + 15 + ], + [ + 15, + 55, + 15 + ], + [ + 15, + 48, + 16 + ], + [ + 13, + 46, + 16 + ], + [ + 10, + 46, + 17 + ], + [ + 7, + 46, + 17 + ], + [ + 3, + 46, + 17 + ], + [ + -1, + 46, + 16 + ], + [ + -6, + 46, + 16 + ], + [ + -9, + 45, + 15 + ], + [ + -12, + 45, + 14 + ], + [ + -17, + 47, + 13 + ], + [ + -20, + 48, + 11 + ], + [ + -23, + 48, + 10 + ], + [ + -24, + 49, + 10 + ], + [ + -24, + 48, + 10 + ], + [ + -24, + 47, + 10 + ], + [ + -25, + 48, + 10 + ], + [ + -25, + 47, + 10 + ], + [ + -25, + 36, + 10 + ], + [ + -25, + 35, + 10 + ], + [ + -25, + 34, + 10 + ], + [ + -25, + 33, + 10 + ], + [ + -14, + 29, + 10 + ], + [ + -14, + 28, + 10 + ] + ], + "interacts": [ + { + "loc": [ + -9.5, + 28, + 9.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [], + "mines": [], + "locations": [ + [ + -14, + 28, + 10 + ], + [ + -25, + 34, + 10 + ], + [ + -25, + 35, + 10 + ], + [ + -25, + 36, + 10 + ], + [ + -25, + 47, + 10 + ], + [ + -25, + 48, + 10 + ], + [ + -24, + 48, + 10 + ], + [ + -24, + 49, + 10 + ], + [ + -23, + 48, + 10 + ], + [ + -21, + 48, + 10 + ], + [ + -20, + 47, + 10 + ], + [ + -19, + 47, + 11 + ], + [ + -20, + 47, + 10 + ], + [ + -20, + 47, + 9 + ], + [ + -14, + 48, + 1 + ], + [ + -13, + 48, + 0 + ], + [ + -14, + 49, + -3 + ], + [ + -15, + 49, + -7 + ], + [ + -15, + 49, + -11 + ], + [ + -14, + 49, + -15 + ], + [ + -13, + 49, -19 ], [ - 5, - 69, + -13, + 49, + -23 + ], + [ + -13, + 50, + -24 + ], + [ + -13, + 50, + -26 + ], + [ + -13, + 50, + -28 + ], + [ + -11, + 50, + -27 + ], + [ + -9, + 50, + -27 + ] + ], + "interacts": [ + { + "loc": [ + -3.5, + 50, + -26.5 + ], + "type": "interact" + } + ], + "tnts": [] + }, + { + "etherwarps": [], + "mines": [], + "locations": [ + [ + -9, + 50, + -27 + ], + [ + -10, + 50, + -28 + ], + [ + -11, + 50, + -29 + ], + [ + -13, + 50, + -26 + ], + [ + -13, + 50, + -24 + ], + [ + -14, + 50, + -22 + ], + [ + -16, + 50, + -20 + ], + [ + -18, + 49, -19 ], [ - 7, - 69, + -21, + 50, -16 ], [ - 8, - 71, - -16 + -23, + 52, + -14 ], [ - 9, - 71, - -15 + -25, + 53, + -10 ], [ - 9, - 72, + -26, + 55, + -8 + ], + [ + -26, + 55, + -5 + ], + [ + -26, + 55, + -3 + ], + [ + -24, + 55, + -3 + ], + [ + -20, + 55, + -3 + ], + [ + -17, + 55, -2 ], [ - 9, - 71, - -1 + -13, + 55, + -2 ], [ - 9, + -10, + 55, + -3 + ], + [ + -9, + 55, + -2 + ], + [ + -9, + 67, + -7 + ], + [ + -9, + 66, + -7 + ], + [ + -9, 68, - 0 + -9 ], [ - 8, - 65, - 1 + -9, + 69, + -12 ], [ - 4, - 70, - 12 + -10, + 69, + -16 ], [ - -1, - 71, - 22 + -14, + 69, + -17 ], [ - -1, + -16, 69, - 22 + -17 ], [ - -1, + -17, 69, - 23 + -17 ], [ - 0, + -18, 69, - 25 + -16 + ] + ], + "interacts": [], + "tnts": [] + } + ] + }, + { + "index": 12, + "data": [ + { + "etherwarps": [ + [ + 2.5, + 80, + -1.5 + ] + ], + "mines": [ + [ + 1.5, + 83.5, + -0.5 + ] + ], + "locations": [ + [ + -7, + 69, + 3 ], [ - 0, + -6, + 69, + 3 + ], + [ + -3, 69, - 26 + 0 ], [ - 0, + -1, 69, - 27 + -2 ], [ 0, 69, - 25 + -4 ], [ 1, 69, - 22 + -5 ], [ 3, 69, - 21 + -7 + ], + [ + 3, + 69, + -10 + ], + [ + 5, + 69, + -12 ], [ 8, 69, - 20 + -12 ], [ - 9, + 11, 69, - 20 + -10 ], [ - 9, - 82, - 20 + 11, + 69, + -8 ], [ 11, - 82, - 19 + 69, + -9 ], [ - 12, - 82, - 19 + 10, + 69, + -12 ], [ - 13, - 94, - 22 + 7, + 69, + -12 ], [ - 13, - 93, - 22 + 3, + 69, + -11 ], [ - 15, - 93, - 23 + 2, + 69, + -8 ], [ - 17, - 91, - 23 + 1, + 69, + -4 ], [ - 17, - 89, - 23 + 1, + 69, + -3 ], [ - 18, - 85, - 23 + 2, + 69, + -3 ], [ - 18, - 82, - 23 + 2, + 80, + -1 ], [ - 17, - 82, - 22 + 1, + 80, + 0 ], [ - 15, - 82, - 18 + 1, + 80, + 1 ], [ - 13, - 82, - 14 + 1, + 80, + 0 ], [ - 11, - 82, - 11 + 1, + 80, + 1 ], [ - 10, + 0, 80, - 9 + 3 ], [ - 9, - 77, - 8 + -1, + 78, + 5 ], [ - 8, - 73, - 6 + -2, + 76, + 5 ], [ - 8, - 68, + -3, + 75, 5 ], [ - 6, - 65, - 3 + -4, + 73, + 5 ], [ - 2, - 65, - 2 + -4, + 70, + 5 ], [ - 0, - 65, - 1 + -5, + 69, + 5 ] ], "interacts": [], "tnts": [ [ - 12.5, - 69.5, - -24.5 - ], - [ - 0.5, + 3.5, 70.5, - 25.5 + -7.5 ] ] } diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 2095e10..21730ad 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -48,8 +48,6 @@ class DungeonSolvers extends Feature { Arcade: "&e", }; - this.IceSprayWarn = new ToggleSetting("Ice Spray Drop Ping", "Renders a big title so you don't miss ice spray wands", true, "ice_spray_ping", this).contributor("EmeraldMerchant"); - this.lastWorldload = Date.now() this.lividFindEnabled = new ToggleSetting("Correct livid finder", "Finds the real livid to kill in the f5 boss fight", true, "livid_find_enabled", this); this.lividFindHud = new ToggleSetting("Show Livid Hp", "Shows the nametag of the correct livid", true, "livid_hud_enabled", this).requires(this.lividFindEnabled); @@ -103,6 +101,8 @@ class DungeonSolvers extends Feature { this.forgorEnabled = new ToggleSetting("Change withermancer death message to forgor ", "", true, "withermancer_forgor", this); this.f7waypoints = new ToggleSetting("Waypoints for P3 F7/M7", "(Only shows unfinished ones)", true, "f7_waypoints", this); + this.IceSprayWarn = new ToggleSetting("Ice Spray Drop Ping", "Renders a big title so you don't miss ice spray wands", false, "ice_spray_ping", this).contributor("EmeraldMerchant"); + this.registerChat("&r&c ☠ &r${player} were killed by Withermancer&r&7 and became a ghost&r&7.&r", (player, e) => { if (this.forgorEnabled.getValue()) { cancel(e); @@ -584,7 +584,7 @@ class DungeonSolvers extends Feature { } }) } else { - fetch(`http://soopymc.my.to/api/v2/player_skyblock/${uuid}`).json(data => { + fetch(`http://soopy.dev/api/v2/player_skyblock/${uuid}`).json(data => { if (!data.success) return if (data.data.profiles[data2.data.stats.currentProfileId].members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")) { diff --git a/features/events/index.js b/features/events/index.js index de5d119..847de49 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -231,7 +231,7 @@ class Events extends Feature { let mythMobs = [] this.todoE.forEach(e => { e = new Entity(e) - let health = e.getName().removeFormatting().split(" ")[4].split("/")[0] + let health = e.getName().removeFormatting().split(" ")[4]?.split("/")[0] if (this.MythMobsHP.getValue() && health != 0 && (e.getName().removeFormatting().includes("Exalted") || e.getName().removeFormatting().includes("Stalwart"))) { mythMobs.push(e.getName()) } diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index c317eb4..25b2eaf 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -47,6 +47,7 @@ class GlobalSettings extends Feature { this.reportErrorsSetting = new ToggleSetting("Send module errors to soopy server", "This will allow me to more effectivly fix them", false, "privacy_send_errors", this) this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: this may cause more lag because of render entity event", false, "hide_falling_sand", this) + this.twitchCommands = new ToggleSetting("Ingame twitch bot commands", "Allows u to use twitch bot commands ingame (eg -sa)", true, "twitch_commands_ingame", this) this.privacySettings = [this.reportErrorsSetting] @@ -84,11 +85,11 @@ class GlobalSettings extends Feature { this.registerEvent("tick", this.fixNEU) } - try { //This enables links from soopymc.my.to to be shown in patcher image preview + try { //This enables links from soopy.dev to be shown in patcher image preview let hasHost = false for (let host of Java.type("gg.essential.util.TrustedHostsUtil").INSTANCE.getTrustedHosts()) { - if (host.getName() === "soopymc") { + if (host.getName() === "soopy.dev") { hasHost = true } } @@ -97,9 +98,9 @@ class GlobalSettings extends Feature { let TrustedHost = Java.type("gg.essential.api.utils.TrustedHostsUtil").TrustedHost let TreeSet = Java.type("java.util.TreeSet") let hosts = new TreeSet() - hosts.add("soopymc.my.to") + hosts.add("soopy.dev") - let host = new TrustedHost(124123, "soopymc", hosts) + let host = new TrustedHost(124123, "soopy.dev", hosts) Java.type("gg.essential.util.TrustedHostsUtil").INSTANCE.addTrustedHost(host) } @@ -136,12 +137,32 @@ class GlobalSettings extends Feature { cancel(e) } }) + + this.registerEvent("messageSent", (message, event) => { + if (!this.twitchCommands.getValue()) return + + if (message.startsWith("-")) { + cancel(event) + fetch("http://soopy.dev/api/soopyv2/botcommand?m=" + encodeURIComponent(message.replace("-", "")) + "&u=" + Player.getName()).text(text => { + ChatLib.chat(this.FeatureManager.messagePrefix + "&7" + message) + let sendMessage = text + sendMessage = sendMessage.split(" ").map(a => { + if (a.match(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm)) { + return new TextComponent("&f&n" + a + ' ').setHover("show_text", "Click to open " + a).setClick("open_url", a) + } else { + return new TextComponent("&f" + a + ' ') + } + }) + sendMessage.reduce((c, curr) => c.addTextComponent(curr), new Message().addTextComponent(new TextComponent(this.FeatureManager.messagePrefix))).chat() + }) + } + }) } // renderWebpage() { // let url = this.getField(Client.currentGui.get(), f.linkText) - // let image = renderLibs.getImage("https://soopymc.my.to/api/soopyv2/webpage?webpage=" + url) + // let image = renderLibs.getImage("https://soopy.dev/api/soopyv2/webpage?webpage=" + url) // if (image) { // let scale = Renderer.screen.getHeight() * 0.5 / image.getTextureHeight() @@ -226,7 +247,7 @@ class GlobalSettings extends Feature { this.currentPlayerOpen = uuid this.currentPlayerNetworth = {} - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + uuid).json(data => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + uuid).json(data => { if (!data.success) return if (this.currentPlayerOpen === data.data.uuid) { @@ -257,13 +278,13 @@ class GlobalSettings extends Feature { ChatLib.chat(this.FeatureManager.messagePrefix + "Finding senither weight for " + user) - fetch("http://soopymc.my.to/api/v2/player/" + user).json(userData => { + fetch("http://soopy.dev/api/v2/player/" + user).json(userData => { if (!userData.success) { ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + userData.error.description) return } - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + userData.data.uuid).json(sbData => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + userData.data.uuid).json(sbData => { if (!sbData.success) { ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + sbData.error.description) diff --git a/features/networthGUI/index.js b/features/networthGUI/index.js index af358a4..7ba2394 100644 --- a/features/networthGUI/index.js +++ b/features/networthGUI/index.js @@ -55,7 +55,7 @@ class NetworthPage extends GuiPage { button.addEvent(new SoopyMouseClickEvent().setHandler(() => { java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopymc.my.to/networth") + new java.net.URI("https://soopy.dev/networth") ); })) @@ -120,7 +120,7 @@ class NetworthPage extends GuiPage { this.statArea.clearChildren() this.statArea.addChild(this.loadingElm) - fetch("http://soopymc.my.to/api/v2/player/" + player).json(playerData => { + fetch("http://soopy.dev/api/v2/player/" + player).json(playerData => { if (player !== this.playerLoad) return @@ -132,7 +132,7 @@ class NetworthPage extends GuiPage { return } - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { if (player !== this.playerLoad) return @@ -182,7 +182,7 @@ class NetworthPage extends GuiPage { }) if (selectedProf === skyblockData.data.stats.bestProfileId) { - fetch("http://soopymc.my.to/api/v2/leaderboard/networth/user/" + playerData.data.uuid).json(leaderboardData => { + fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + playerData.data.uuid).json(leaderboardData => { if (player !== this.playerLoad) return if (leaderboardData.success) nameElm.setText("§0#" + numberWithCommas(leaderboardData.data.data.position + 1) + " " + playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")) @@ -202,7 +202,7 @@ class NetworthPage extends GuiPage { } sidebarSearch(user) { - fetch("http://soopymc.my.to/api/v2/leaderboard/networth/user/" + user).json(data => { + fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + user).json(data => { if (!data.success) { return } @@ -222,7 +222,7 @@ class NetworthPage extends GuiPage { if (scroll) this.leaderboardArea._scrollAmount = 0 if (scroll) this.leaderboardArea.location.scroll.y.set(0, 100) - fetch("http://soopymc.my.to/api/v2/leaderboard/networth/" + page).json(data => { + fetch("http://soopy.dev/api/v2/leaderboard/networth/" + page).json(data => { this.leaderboardArea.clearChildren() data.data.data.forEach((user, i) => { this.leaderboardArea.addChild( diff --git a/features/settings/helpDataLoader.js b/features/settings/helpDataLoader.js index 3a2e8f5..7c463b2 100644 --- a/features/settings/helpDataLoader.js +++ b/features/settings/helpDataLoader.js @@ -5,30 +5,30 @@ class HelpDataLoader { this.availableHelpData = {} this.dataCach = {} - fetch("http://soopymc.my.to/api/soopyv2/settingshelpoptions.json").json(data=>{ - Object.keys(data).forEach(category=>{ + fetch("http://soopy.dev/api/soopyv2/settingshelpoptions.json").json(data => { + Object.keys(data).forEach(category => { this.availableHelpData[category] = new Set(data[category]) }); }) } - hasData(category, id){ + hasData(category, id) { return this.availableHelpData[category] && this.availableHelpData[category].has(id) } - getData(category, id, callback){ - if(!this.hasData(category, id)){ + getData(category, id, callback) { + if (!this.hasData(category, id)) { callback("") return } - if(this.dataCach[category] && this.dataCach[category][id]){ + if (this.dataCach[category] && this.dataCach[category][id]) { callback(this.dataCach[category][id]) return } - fetch("http://soopymc.my.to/api/soopyv2/settingshelp/" + category + "/" + id).text(data=>{ - if(!this.dataCach[category]){ + fetch("http://soopy.dev/api/soopyv2/settingshelp/" + category + "/" + id).text(data => { + if (!this.dataCach[category]) { this.dataCach[category] = {} } @@ -39,10 +39,10 @@ class HelpDataLoader { } } -if(!global.helpDataLoader){ +if (!global.helpDataLoader) { global.helpDataLoader = new HelpDataLoader(); - - register("gameUnload", ()=>{ + + register("gameUnload", () => { global.helpDataLoader = undefined }) } diff --git a/features/spamHider/index.js b/features/spamHider/index.js index e1c79f3..1d13e57 100644 --- a/features/spamHider/index.js +++ b/features/spamHider/index.js @@ -132,7 +132,7 @@ class SpamHider extends Feature { } loadSpamMessages() { - fetch("http://soopymc.my.to/api/soopyv2/spamHiderMessages.json").json(messages => { + fetch("http://soopy.dev/api/soopyv2/spamHiderMessages.json").json(messages => { this.hideMessages = messages.hideMessages this.moveMessages = messages.moveMessages diff --git a/features/statHistoryGui/index.js b/features/statHistoryGui/index.js index 4c02b2c..282c40d 100644 --- a/features/statHistoryGui/index.js +++ b/features/statHistoryGui/index.js @@ -54,7 +54,7 @@ class StatGraphPage extends GuiPage { button.addEvent(new SoopyMouseClickEvent().setHandler(() => { java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopymc.my.to/stathistory") + new java.net.URI("https://soopy.dev/stathistory") ); })) @@ -92,7 +92,7 @@ class StatGraphPage extends GuiPage { this.statArea.clearChildren() this.statArea.addChild(this.loadingElm) - fetch("http://soopymc.my.to/api/v2/player/" + player).json(playerData => { + fetch("http://soopy.dev/api/v2/player/" + player).json(playerData => { if (player !== this.playerLoad) return @@ -108,7 +108,7 @@ class StatGraphPage extends GuiPage { this.statArea.addChild(nameElm) this.statArea.addChild(this.loadingElm) - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { if (player !== this.playerLoad) return if (!skyblockData.success) { @@ -130,7 +130,7 @@ class StatGraphPage extends GuiPage { })) this.statArea.addChild(profileSelect) - fetch("http://soopymc.my.to/statgraphgenerations/" + playerData.data.uuid + "/" + selectedProf).json(graphData => { + fetch("http://soopy.dev/statgraphgenerations/" + playerData.data.uuid + "/" + selectedProf).json(graphData => { if (player !== this.playerLoad) return new Thread(() => { diff --git a/features/streamsGUI/index.js b/features/streamsGUI/index.js index fec9bfa..390f625 100644 --- a/features/streamsGUI/index.js +++ b/features/streamsGUI/index.js @@ -50,7 +50,7 @@ class StreamPage extends GuiPage { button.addEvent(new SoopyMouseClickEvent().setHandler(() => { java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopymc.my.to/skyblockstreams") + new java.net.URI("https://soopy.dev/skyblockstreams") ); })) @@ -64,7 +64,7 @@ class StreamPage extends GuiPage { } updateStreams() { - fetch("http://soopymc.my.to/api/skyblockstreams").json(streams => { + fetch("http://soopy.dev/api/skyblockstreams").json(streams => { this.streamsBox.clearChildren() let y = 0 diff --git a/features/suggestionsGui/index.js b/features/suggestionsGui/index.js index 57d76cb..8ddaa24 100644 --- a/features/suggestionsGui/index.js +++ b/features/suggestionsGui/index.js @@ -72,7 +72,7 @@ class SuggestionPage extends GuiPage { button.addEvent(new SoopyMouseClickEvent().setHandler(() => { java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopymc.my.to/soopyv2suggestion?uuid=" + Player.getUUID().toString().replace(/-/g, "")) + new java.net.URI("https://soopy.dev/soopyv2suggestion?uuid=" + Player.getUUID().toString().replace(/-/g, "")) ); })) @@ -82,7 +82,7 @@ class SuggestionPage extends GuiPage { this.pages[0].addChild(this.suggestionsArea) - fetch("http://soopymc.my.to/api/soopyv2/suggestionTags.json").json(data => { + fetch("http://soopy.dev/api/soopyv2/suggestionTags.json").json(data => { this.tags = data }) @@ -91,7 +91,7 @@ class SuggestionPage extends GuiPage { loadSuggestionPage() { - fetch("http://soopymc.my.to/api/soopyv2/suggestion/new").json(data => { + fetch("http://soopy.dev/api/soopyv2/suggestion/new").json(data => { this.suggestionElements = {} this.suggestionsArea.clearChildren() @@ -127,7 +127,7 @@ class SuggestionPage extends GuiPage { } loadSuggestion(id) { - fetch("http://soopymc.my.to/api/soopyv2/suggestion/" + id + "/user/" + Player.getUUID().toString().replace(/-/g, "")).json(data => { + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/user/" + Player.getUUID().toString().replace(/-/g, "")).json(data => { let sideBarElm = new SoopyGuiElement().setLocation(0, 0, 1, 1).setScrollable(true) if (!data.success) { sideBarElm.addChild(new SoopyTextElement().setText("§cError loading suggestion").setMaxTextScale(3).setLocation(0.5, 0.5, 0.5, 0.5)) @@ -154,13 +154,13 @@ class SuggestionPage extends GuiPage { drop.addEvent(new SoopyContentChangeEvent().setHandler((newVal) => { if (newVal === "delete") { - fetch("http://soopymc.my.to/api/soopyv2/suggestion/" + id + "/delete/" + this.password).async() + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/delete/" + this.password).async() this.loadSuggestionPage() this.closeSidebarPage() return } - fetch("http://soopymc.my.to/api/soopyv2/suggestion/" + id + "/status/" + newVal + "/" + this.password).async() + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/status/" + newVal + "/" + this.password).async() this.loadSuggestion(id) })) @@ -204,7 +204,7 @@ class SuggestionPage extends GuiPage { } voteSuggestion(id, type) { - fetch("http://soopymc.my.to/api/soopyv2/suggestion/" + id + "/vote/" + (type) + "/" + Player.getUUID().toString().replace(/-/g, "")).async() + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/vote/" + (type) + "/" + Player.getUUID().toString().replace(/-/g, "")).async() this.loadSuggestion(id) } |