aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--features/globalSettings/index.js13
-rw-r--r--features/guild/index.js4
-rw-r--r--features/soopyGui/index.js1
-rw-r--r--features/specialMining/index.js2
4 files changed, 9 insertions, 11 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index a0cdc48..d97da1b 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -54,7 +54,7 @@ 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.handChat = new ToggleSetting("Replace [hand] with ur currently held item", "Only shows for soopy users", true, "hand_chat", this)
+ this.handChat = new ToggleSetting("Replace [hand] with ur currently held item", "Idea from Synthesis im only adding cus i dont have D:", true, "hand_chat", this)
this.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this)
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)
@@ -267,11 +267,7 @@ class GlobalSettings extends Feature {
return;
}
- // if (/\[ITEM:[0-9]+\]/g.test(message)) {
-
-
- // }
- if (message.toLowerCase().includes("[hand]")) {
+ if (this.handChat.getValue() && message.toLowerCase().includes("[hand]")) {
cancel(event)
ChatLib.addToSentMessageHistory(message)
@@ -292,7 +288,7 @@ class GlobalSettings extends Feature {
}
})
- this.registerChat("${*}[ITEM:${*}", (event) => {
+ let ev = this.registerChat("${*}[ITEM:${*}", (event) => {
cancel(event)
let message = new Message(event)
@@ -300,7 +296,6 @@ class GlobalSettings extends Feature {
let id = _.replace("[ITEM:", "").replace(/\]$/g, "")
fetch("http://soopy.dev/api/soopyv2/itemdown/" + id).json(([name, lore]) => {
- console.log(JSON.stringify(lore, undefined, 2))
for (let i = 0; i < message.getMessageParts().length; i++) {
let component = message.getMessageParts()[i]
@@ -315,11 +310,11 @@ class GlobalSettings extends Feature {
message.chat()
}).error(() => {
ChatLib.chat(this.FeatureManager.messagePrefix + "There was an error downloading the item data!")
- message.setRecursive(true)
message.chat()
})
})
+ ev.trigger.setPriority(Priority.HIGHEST)
}
worldLoad() {
diff --git a/features/guild/index.js b/features/guild/index.js
index 73d298b..e8e2895 100644
--- a/features/guild/index.js
+++ b/features/guild/index.js
@@ -24,7 +24,8 @@ class Guild extends Feature {
//&r&2Guild > &6[MVP&0++&6] zZzSNOW &e[STAFF]&f: &r@niftynathan7, niftynathan7's weight: 20 087 (#1 198) (Skill: 8 771, Slayer: 1 263, Dungeons: 10 053) ,.,,,..,.,,.,,,....,,,,,,,,,..,,,,,..,,,..,,,.,,.,,.,..,,....,,....,,..,.&r
//&r&2Guild > &6[MVP&4++&6] Soopyboo32 &e[STAFF]&f: &rasd&r
//&r&2Guild > &6[MVP&1++&6] niftynathan7 &e[E]&f: &r@Soopyboo32, Soopyboo32's networth: $8 424 131 866 (#2 592) ,..,...,....,.,,,....,,,...,,,,,,,..,,.,,..,,.,.,,,.........,.....,,,,.....,..,,...,.,.,...,.,&r
- this.registerChat('&r&2Guild > ${player}&f: &r${msg}&r', (player, msg, event) => {
+ let ev = this.registerChat('&r&2Guild > ${player}&f: &r${msg}&r', (player, msg, event) => {
+ if (msg.includes("[ITEM:")) return
if (player.includes(":")) return; //stop people sending weard messages to troll using this
//player = &6[MVP&0++&6] zZzSNOW &e[STAFF]
@@ -56,6 +57,7 @@ class Guild extends Feature {
toMessageWithLinks(message).chat()
})
+ ev.trigger.triggerIfCanceled(false)
}
onDisable() {
diff --git a/features/soopyGui/index.js b/features/soopyGui/index.js
index 0ad6b8c..1b26af1 100644
--- a/features/soopyGui/index.js
+++ b/features/soopyGui/index.js
@@ -10,6 +10,7 @@ import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseCl
import SoopyOpenGuiEvent from "../../../guimanager/EventListener/SoopyOpenGuiEvent";
import SoopyGui2 from "../../../guimanager/SoopyGui";
import categoryManager from "./categoryManager";
+import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement";
class SoopyGui extends Feature {
diff --git a/features/specialMining/index.js b/features/specialMining/index.js
index d896f82..e35388f 100644
--- a/features/specialMining/index.js
+++ b/features/specialMining/index.js
@@ -287,7 +287,7 @@ class PowderAndScatha extends Feature {
if (this.PowderElement.getValue() && this.inCrystalHollows) {
this.overlayLeft.push(`&b2x Powder:`)
- this.overlayRight.push(this.dPowder ? "&a" + timeNumber(this.dPowder - Date.now()) : "&cINACTIVE")
+ this.overlayRight.push(this.dPowder ? "&a" + timeNumber(Math.max(0, this.dPowder - Date.now())) : "&cINACTIVE")
if (this.miningData.powder.chests) {
let c = this.miningData.powder.chests