aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/dungeonSolvers/index.js6
-rw-r--r--features/globalSettings/index.js61
2 files changed, 51 insertions, 16 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index 26bbc1b..5cf78f2 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -109,6 +109,8 @@ class DungeonSolvers extends Feature {
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.guardianHp = new ToggleSetting("m3/f3 guardian hp", "", true, "guardian_hp", this);
+
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);
@@ -699,11 +701,11 @@ class DungeonSolvers extends Feature {
}
for (let i = 0; i < shifts; i++) this.timersData.shift()
- if (this.FeatureManager.features["dataLoader"].class.dungeonFloor[1] === "3") {
+ if (this.guardianHp.getValue() && this.FeatureManager.features["dataLoader"].class.dungeonFloor?.[1] === "3") {
let es = World.getAllEntitiesOfType(entityGuardian)
for (let e of es) {
- if (e.getEntity().func_110143_aJ() < 1000) continue
+ if (e.getEntity().func_110143_aJ() < 1000) continue //getHealth
Tessellator.drawString(addNotation("oneLetters", Math.round(e.getEntity().func_110143_aJ())), e.getX(), e.getY() + 0.25, e.getZ(), Renderer.color(0, 255, 0), false, 0.1, false)
}
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 7a56e6c..8877157 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -20,6 +20,9 @@ const Paths = Java.type("java.nio.file.Paths")
const JavaString = Java.type("java.lang.String")
const JavaLong = Java.type("java.lang.Long")
+let hecatombLevels = [2, 5, 10, 20, 30, 40, 60, 80, 100]
+let championLevels = [50000, 100000, 250000, 500000, 1000000, 1500000, 2000000, 2500000, 3000000]
+
class GlobalSettings extends Feature {
constructor() {
super()
@@ -49,6 +52,10 @@ class GlobalSettings extends Feature {
this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: This setting is a bit laggy", 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.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this)
+<<<<<<< HEAD
+ this.showHecatomb = new ToggleSetting("Show hecatomb enchant info in lore", "", true, "show_hecatomb", this)
+ this.showChampion = new ToggleSetting("Show champion enchant info in lore", "", true, "show_champion", this)
+=======
this.oldMasterStars = new ToggleSetting("Use Old Master Stars", "replaces the ugly new master star on item name with the old fashion one", false, "old_master_star", this)
this.registerEvent('itemTooltip', (lore, i, e) => {
@@ -77,6 +84,7 @@ class GlobalSettings extends Feature {
return
}
})
+>>>>>>> d2cb0e2c1ce2d2bd5b02dc6f74c96a5b43891f86
this.firstPageSettings = [this.darkTheme]
@@ -115,7 +123,7 @@ class GlobalSettings extends Feature {
}
this.requestingPrices = new Set()
- this.registerStep(false, 1, this.updateItemPrices)
+ this.registerStep(false, 1, this.updateItemLores)
this.registerEvent("worldLoad", () => {
this.requestingPrices.clear()
})
@@ -195,31 +203,56 @@ class GlobalSettings extends Feature {
})
}
- updateItemPrices() {
+ updateItemLores() {
if (!this.itemWorth.getValue()) return;
[...Player.getInventory().getItems(), ...Player.getContainer().getItems()].forEach(i => {
let uuid = getSBUUID(i)
if (!uuid) return
- let a = socketConnection.itemPricesCache.get(uuid)
+ if (this.itemWorth.getValue()) {
+ let a = socketConnection.itemPricesCache.get(uuid)
- if (!a && socketConnection.itemPricesCache2.get(uuid)) {
- a = socketConnection.itemPricesCache2.get(uuid)
- socketConnection.itemPricesCache.set(uuid, a)
- }
+ if (!a && socketConnection.itemPricesCache2.get(uuid)) {
+ a = socketConnection.itemPricesCache2.get(uuid)
+ socketConnection.itemPricesCache.set(uuid, a)
+ }
- if (a) {
- addLore(i, "§eWorth: ", "§6$" + numberWithCommas(Math.round(a)))
- return
+ if (a) {
+ addLore(i, "§eWorth: ", "§6$" + numberWithCommas(Math.round(a)))
+ return
+ }
+
+ if (this.requestingPrices.has(uuid)) return
+
+ this.requestingPrices.add(uuid)
+
+ let json = i.getNBT().toObject()
+ socketConnection.requestItemPrice(json, uuid)
}
- if (this.requestingPrices.has(uuid)) return
+ if (this.showChampion.getValue() && i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getDouble("champion_combat_xp")) {
+ let xp = i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getDouble("champion_combat_xp")
+
+ let level = 1
+ championLevels.forEach(l => {
+ if (xp >= l) level++
+ })
+ let xpNext = championLevels[level - 1]
- this.requestingPrices.add(uuid)
+ addLore(i, "§eChampion: ", "§d" + level + " §6" + numberWithCommas(Math.round(xp)) + (xpNext ? " §7/ §6" + numberWithCommas(Math.round(xpNext)) : ""))
+ }
+ if (this.showHecatomb.getValue() && i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getInteger("hecatomb_s_runs")) {
+ let runs = i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getInteger("hecatomb_s_runs")
- let json = i.getNBT().toObject()
- socketConnection.requestItemPrice(json, uuid)
+ let level = 1
+ hecatombLevels.forEach(l => {
+ if (runs >= l) level++
+ })
+ let xpNext = hecatombLevels[level - 1]
+
+ addLore(i, "§eHecatomb: ", "§d" + level + " §6" + numberWithCommas(Math.round(runs)) + (xpNext ? " §7/ §6" + numberWithCommas(Math.round(xpNext)) : ""))
+ }
})
}