diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-05 22:44:05 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-05 22:44:05 +0800 |
commit | e2e2d676ee056e9f44f6c67e29f0952b9ef956b2 (patch) | |
tree | 6e0a8f8084ea665561eb7c28b50b1dbbf5b4ae8c /features | |
parent | 4f4ad2492a0819726fbf897746fde46d9467a359 (diff) | |
download | SoopyV2-e2e2d676ee056e9f44f6c67e29f0952b9ef956b2.tar.gz SoopyV2-e2e2d676ee056e9f44f6c67e29f0952b9ef956b2.tar.bz2 SoopyV2-e2e2d676ee056e9f44f6c67e29f0952b9ef956b2.zip |
+ waypoints for hostage rescue
Diffstat (limited to 'features')
-rw-r--r-- | features/nether/index.js | 46 | ||||
-rw-r--r-- | features/nether/metadata.json | 2 | ||||
-rw-r--r-- | features/slayers/index.js | 13 | ||||
-rw-r--r-- | features/waypoints/index.js | 5 |
4 files changed, 52 insertions, 14 deletions
diff --git a/features/nether/index.js b/features/nether/index.js index a7db6bb..26ab29a 100644 --- a/features/nether/index.js +++ b/features/nether/index.js @@ -2,12 +2,27 @@ /// <reference lib="es2015" /> import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; -import { drawBoxAtBlock, drawBoxAtEntity, drawLine, drawLineWithDepth, renderBeaconBeam } from "../../utils/renderUtils"; +import { drawBoxAtBlock, drawBoxAtEntity, drawCoolWaypoint, drawLine, drawLineWithDepth, renderBeaconBeam } from "../../utils/renderUtils"; import ToggleSetting from "../settings/settingThings/toggle"; const MCBlock = Java.type("net.minecraft.block.Block"); const ArmorStand = Java.type("net.minecraft.entity.item.EntityArmorStand") const MCItem = Java.type("net.minecraft.item.Item"); +let locationData = { + barbarian: { + "Ⓐ": [16, 148, -929], + "Ⓑ": [-37, 122, -1020], + "Ⓒ": [-30, 137, -888], + "Ⓓ": [-6, 156, -881], + }, + mage: { + "Ⓐ": [-664, 124, -981], + "Ⓑ": [-635, 160, -1056], + "Ⓒ": [-726, 123, -997], + "Ⓓ": [-685, 124, -1049], + } +} + class Nether extends Feature { constructor() { super(); @@ -33,6 +48,8 @@ class Nether extends Feature { this.blocks = [] this.dojoFireBalls = [] this.inSwiftness = false + this.rescueMissionDifficulty = undefined + this.rescueMissionType = undefined this.lastBlock = undefined this.registerChat("&r&r&r &r&aTest of Swiftness &r&e&lOBJECTIVES&r", () => { if (this.speedNextBlock.getValue()) { @@ -44,9 +61,29 @@ class Nether extends Feature { this.inSwiftness = false this.lastBlock = undefined }) + //&e[NPC] &eRescue Recruiter&f: &rPerfect! Go see our &eUndercover Agent &rat the &5Cathedral &rarea in &5Mage &rterritory to get started.&r + this.registerChat("&e[NPC] &eRescue Recruiter&f: &rPerfect! Go see our &eUndercover Agent &rat the ${*} in ${type} &rterritory to get started.&r", (type) => { + // console.log(type) + this.rescueMissionType = ChatLib.removeFormatting(type) === "Mage" ? "barbarian" : "mage" + // console.log(this.rescueMissionDifficulty, this.rescueMissionType) + }) + + this.registerChat("You completed your rescue quest! Visit the Town Board to claim the rewards,", () => { + this.rescueMissionDifficulty = this.rescueMissionType = undefined + }) + this.registerEvent("worldLoad", () => { + this.rescueMissionDifficulty = this.rescueMissionType = undefined + }) } tick() { + if (Player.getContainer().getName() === "Rescue") { + let difficulty = ChatLib.removeFormatting(Player.getContainer().getStackInSlot(22).getName()).trim()[0] + + this.rescueMissionDifficulty = difficulty + // console.log(this.rescueMissionDifficulty, this.rescueMissionType) + } + this.todoE2.forEach(e => { let item = e[m.getHeldItem]() if (!item) return @@ -137,6 +174,11 @@ class Nether extends Feature { let change = [entitylocation[0] - lastLocation[0], entitylocation[1] - lastLocation[1], entitylocation[2] - lastLocation[2]] drawLineWithDepth(entitylocation[0] + change[0] * 100 + offset[0], entitylocation[1] + change[1] * 100 + offset[1], entitylocation[2] + change[2] * 100 + offset[2], entitylocation[0] + offset[0], entitylocation[1] + offset[1], entitylocation[2] + offset[2], 255, 0, 0, 2) }) + + if (this.rescueMissionDifficulty && this.rescueMissionType) { + let location = locationData[this.rescueMissionType][this.rescueMissionDifficulty] + drawCoolWaypoint(location[0], location[1], location[2], 255, 0, 0, { name: "Hostage" }) + } } step1S() { @@ -159,4 +201,4 @@ class Nether extends Feature { let nether = new Nether() module.exports = { class: nether, -};
\ No newline at end of file +}; diff --git a/features/nether/metadata.json b/features/nether/metadata.json index e68fb41..8b8a989 100644 --- a/features/nether/metadata.json +++ b/features/nether/metadata.json @@ -3,6 +3,6 @@ "description": "May cause some lag if enabled when not in nether", "isHidden": false, "isTogglable": true, - "defaultEnabled": true, + "defaultEnabled": false, "sortA": 1 }
\ No newline at end of file diff --git a/features/slayers/index.js b/features/slayers/index.js index d494096..db5983c 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -124,14 +124,6 @@ class Slayers extends Feature { this.registerEvent("worldLoad", this.worldLoad); this.registerEvent("renderOverlay", this.renderHud); this.registerStep(true, 2, this.step); - this.registerForge(Java.type("net.minecraftforge.client.event.RenderWorldLastEvent"), this.renderWorldLast) - } - - renderWorldLast() { - if (!this.otherSlayerWaypoints) return - Object.keys(this.slayerLocationDataH).forEach(key => { - drawCoolWaypoint(this.slayerLocationDataH[key][0][0], this.slayerLocationDataH[key][0][1], this.slayerLocationDataH[key][0][2], 255, 0, 0, { name: key + "'s boss" }) - }) } slayerLocationData(loc, user) { @@ -212,6 +204,11 @@ class Slayers extends Feature { drawBoxAtBlock(x - 0.5, y + 0.7, z - 0.5, 255, 0, 0); }); + if (this.otherSlayerWaypoints) { + Object.keys(this.slayerLocationDataH).forEach(key => { + drawCoolWaypoint(this.slayerLocationDataH[key][0][0], this.slayerLocationDataH[key][0][1], this.slayerLocationDataH[key][0][2], 255, 0, 0, { name: key + "'s boss" }) + }) + } } entityJoinWorldEvent(event) { diff --git a/features/waypoints/index.js b/features/waypoints/index.js index 6be0f5f..1f256ce 100644 --- a/features/waypoints/index.js +++ b/features/waypoints/index.js @@ -5,7 +5,6 @@ import Feature from "../../featureClass/class"; import { drawCoolWaypoint } from "../../utils/renderUtils"; import SettingBase from "../settings/settingThings/settingBase"; -const RenderWorldLastEvent = Java.type("net.minecraftforge.client.event.RenderWorldLastEvent") class Waypoints extends Feature { constructor() { @@ -28,7 +27,7 @@ class Waypoints extends Feature { this.updateWaypointsHashes() this.waypointsChanged = false - this.registerForge(RenderWorldLastEvent, this.renderWorldLast) + this.registerEvent("renderWorld", this.renderWorld) this.registerCommand("addwaypoint", (name, x = Math.floor(Player.getX()).toString(), y = Math.floor(Player.getY()).toString(), z = Math.floor(Player.getZ()).toString(), r = "0", g = "255", b = "0", area = "") => { let lx = 0 @@ -108,7 +107,7 @@ class Waypoints extends Feature { } } - renderWorldLast() { + renderWorld() { for (let waypoint of this.userWaypointsAll) { drawCoolWaypoint(waypoint.x, waypoint.y, waypoint.z, waypoint.r, waypoint.g, waypoint.b, waypoint.options) } |