aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/hud/index.js3
-rw-r--r--features/nether/index.js6
-rw-r--r--features/slayers/index.js26
3 files changed, 16 insertions, 19 deletions
diff --git a/features/hud/index.js b/features/hud/index.js
index a4b8eb2..8c03e1e 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -95,6 +95,7 @@ class Hud extends Feature {
.requires(this.petEnabledSetting)
.editTempText("&6Pet&7> &7[Lvl 100] &aEnderman"))
this.hudElements.push(this.petElement)
+ this.scanGuiForPet = new ToggleSetting("Scan pets menu gui for selected pet", "Only disable if you get a lot of lag in the pets menu", true, "scan_pets_menu", true).requires(this.petEnabledSetting)
this.soulflowEnabledSetting = new ToggleSetting("Show Soulflow", "Whether the soulflow count is rendered onto the screen", true, "soulflow_enabled", this)
this.soulflowShowWarningSetting = new ToggleSetting("Show no Talisman Warning", "Shows a warning if you dont have a soulflow talis in ur inv", true, "soulflow_notalis_warning", this).requires(this.soulflowEnabledSetting)
@@ -441,7 +442,7 @@ class Hud extends Feature {
this.cpsElement.setText("&6Cps&7> &f" + cpsText)
//Scan opened inventory for all pet levels
- if (Player && Player.getContainer() && Player.getContainer().getName().includes(") Pets")) {
+ if (this.scanGuiForPet.getValue() && Player && Player.getContainer() && Player.getContainer().getName().includes(") Pets")) {
let inv = Player.getContainer().getItems()
for (let i = 0; i < inv.length; i++) {
if (inv[i] != null && inv[i].getName().includes("[Lvl ")) {
diff --git a/features/nether/index.js b/features/nether/index.js
index ba4fdd0..e0c5cd3 100644
--- a/features/nether/index.js
+++ b/features/nether/index.js
@@ -2,7 +2,7 @@
/// <reference lib="es2015" />
import { m } from "../../../mappings/mappings";
import Feature from "../../featureClass/class";
-import { drawBoxAtBlock } from "../../utils/renderUtils";
+import { drawBoxAtBlock, drawLine } from "../../utils/renderUtils";
import ToggleSetting from "../settings/settingThings/toggle";
const MCBlock = Java.type("net.minecraft.block.Block");
@@ -23,7 +23,6 @@ class Nether extends Feature {
this.registerEvent("renderWorld", this.renderWorld)
this.blocks = []
-
this.inSwiftness = false
this.lastBlock = undefined
this.registerChat("&r&r&r &r&aTest of Swiftness &r&e&lOBJECTIVES&r", () => {
@@ -49,7 +48,7 @@ class Nether extends Feature {
this.blocks.push({ loc: position, time: Date.now() + 3000 })
}
if (blockState === 57379) {
- this.blocks.filter(b => {
+ this.blocks = this.blocks.filter(b => {
if (b.loc.x === position.x && b.loc.y === position.y && b.loc.z === position.z) {
return false
}
@@ -81,6 +80,7 @@ class Nether extends Feature {
this.blocks.forEach(data => {
Tessellator.drawString(Math.max(0, (data.time - Date.now()) / 1000).toFixed(1) + "s", data.loc.getX() + 0.5, data.loc.getY() + 0.5, data.loc.getZ() + 0.5, 0, false, 0.05, false)
})
+ if (this.blocks.length >= 2) drawLine(this.blocks[0].loc.getX(), this.blocks[0].loc.getY(), this.blocks[0].loc.getZ(), this.blocks[1].loc.getX(), this.blocks[1].loc.getY(), this.blocks[1].loc.getZ(), 255, 0, 0)
}
if (this.lastBlock && this.inSwiftness) drawBoxAtBlock(this.lastBlock[0], this.lastBlock[1], this.lastBlock[2], 0, 255, 0, 1, 1)
diff --git a/features/slayers/index.js b/features/slayers/index.js
index e3629ba..408c123 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -41,15 +41,18 @@ class Slayers extends Feature {
this.blazeTowerDink = new ToggleSetting("DinkDonk & Box for blaze tower", "(the tower might not nessesarily belong to your boss though)", true, "blaze_tower_dinkdink", this);
this.slayerProgressAlert = new ToggleSetting("Shows slayer progress in middle of screen when close", "(blame dulkir)", false, "slayer_progress_alert", this);
+ this.dulkirThingElement = new HudTextElement()
+ .setText("")
+ .setToggleSetting(this.slayerProgressAlert)
+ .setLocationSetting(new LocationSetting("Slayer progress location", "Allows you to edit the location of the dulkir thing", "dulkir_thing_location", this, [10, 150, 1, 1]).requires(this.slayerProgressAlert).editTempText("&e98&7/&c100&7 Kills"));
+
+ this.hudElements.push(this.dulkirThingElement);
this.lastSlayerFinishes = [];
this.lastSlayerExps = [];
this.slayerExp = {};
this.slayerExpLoaded = false;
- this.slayerProgressAlertText = ""
- this.slayerProgressAlertTime = 0
-
this.lastSlayerType = "";
this.lastSlayerExp = 0;
this.lastBossSlain = 0;
@@ -201,6 +204,7 @@ class Slayers extends Feature {
this.bossSlainMessage = false;
let dis1 = false;
+ this.dulkirThingElement.setText("")
Scoreboard.getLines().forEach((line, i) => {
if (ChatLib.removeFormatting(line.getName()).includes("Slayer Quest")) {
let slayerInfo = ChatLib.removeFormatting(Scoreboard.getLines()[i - 1].getName().replace(/ยง/g, "&"));
@@ -237,18 +241,16 @@ class Slayers extends Feature {
}
let lineSplitThing = ChatLib.removeFormatting(line.getName()).replace(/[^a-z/0-9 ]/gi, "").trim().split(" ")
// ChatLib.chat(ChatLib.removeFormatting(line.getName()).replace(/[^a-z/0-9 ]+/gi, "").trim())
+
if (this.slayerProgressAlert.getValue() && lineSplitThing[0]
&& lineSplitThing[0].split("/").length === 2
&& lineSplitThing[1] === "Kills") {
let kills = lineSplitThing[0].split("/").map(a => parseInt(a))
- if (kills[0] / kills[1] > 0.9) {
- this.slayerProgressAlertText = line.getName()
- this.slayerProgressAlertTime = Date.now() + 1000
+ console.log(kills[0], kills[1])
+ if (kills[0] / kills[1] >= 0.9) {
+ this.dulkirThingElement.setText(line.getName())
}
}
- // this.slayerProgressAlert
- // this.slayerProgressAlertText = ""
- // this.slayerProgressAlertTime = 0
});
if (!dis1) {
this.lastBossNotSpawnedTime = Date.now();
@@ -455,12 +457,6 @@ class Slayers extends Feature {
Renderer.drawString("&4BOSS SPAWNED", Renderer.screen.getWidth() * 0.125 * scale, (Renderer.screen.getHeight() / 2 - 9 / scale) * scale);
Renderer.scale(1, 1);
}
- if (this.slayerProgressAlert.getValue() && Date.now() < this.slayerProgressAlertTime) {
- let scale = Renderer.getStringWidth(ChatLib.removeFormatting(this.slayerProgressAlertText)) / (Renderer.screen.getWidth() * 0.5);
- Renderer.scale(1 / scale, 1 / scale);
- Renderer.drawString(this.slayerProgressAlertText, Renderer.screen.getWidth() * 0.125 * scale, (Renderer.screen.getHeight() / 2 + 9 / scale) * scale);
- Renderer.scale(1, 1);
- }
}
step() {