From 9e37dc333023e88371b4109b91e264d69798f758 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 5 Jun 2022 11:03:55 +0800 Subject: + alert when all divan tools are in inventory when metal detecting --- features/mining/index.js | 25 +++++++++++++++++++++++-- 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", -- cgit