diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-05 11:03:55 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-05 11:03:55 +0800 |
commit | 9e37dc333023e88371b4109b91e264d69798f758 (patch) | |
tree | d86b30dc66083e2296c06b2793c4d138a8545e00 | |
parent | 16a5c01f0d19517f514aa5407a5df2eaacd3e841 (diff) | |
download | SoopyV2-9e37dc333023e88371b4109b91e264d69798f758.tar.gz SoopyV2-9e37dc333023e88371b4109b91e264d69798f758.tar.bz2 SoopyV2-9e37dc333023e88371b4109b91e264d69798f758.zip |
+ alert when all divan tools are in inventory when metal detecting
-rw-r--r-- | features/mining/index.js | 25 | ||||
-rw-r--r-- | metadata.json | 4 |
2 files changed, 25 insertions, 4 deletions
diff --git a/features/mining/index.js b/features/mining/index.js index 644a100..f8f7843 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -69,6 +69,7 @@ class Mining extends Feature { this.metalDetectorSolver = new ToggleSetting("Metal detector solver", "", true, "metal_detector_solver", this) + this.alertTools = new ToggleSetting("Alert when all 4 tools in inventory", "", true, "alert_tools", this) this.seenBalDamages = [] this.balHP = 250 @@ -187,6 +188,28 @@ class Mining extends Feature { let ignoreLocation = undefined let registerActionBar = this.registerCustom("actionbar", (dist) => { + + let lapis = false + let diamond = false + let emerald = false + let gold = false + Player.getInventory().getItems().forEach(i => { + if (i && i.getName().includes("Scavenged Lapis")) { + lapis = true + } + if (i && i.getName().includes("Scavenged Diamond")) { + diamond = true + } + if (i && i.getName().includes("Scavenged Emerald")) { + emerald = true + } + if (i && i.getName().includes("Scavenged Golden")) { + gold = true + } + }) + + if (this.alertTools.getValue() && lapis && diamond && gold && emerald) Client.showTitle("§cALL TOOLS", "", 10, 40, 20) + if (!this.metalDetectorSolver.getValue()) return let distance = parseFloat(dist) if (!this.baseCoordinates) this.findBaseCoordinates(); @@ -196,8 +219,6 @@ class Mining extends Feature { return } - let lastLocation = this.predictedChestLocations[0] - this.predictedChestLocations = [] this.chestCoords.forEach((coordinates) => { diff --git a/metadata.json b/metadata.json index 3f7ac07..b0a9541 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.94", - "versionId": 221, + "version": "2.1.95", + "versionId": 222, "requires": [ "soopyApis", "soopyAddonsData", |