Skip to content

Commit 4306b13

Browse files
authoredDec 1, 2024··
1.5.8
2 parents a5da104 + e73a129 commit 4306b13

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed
 

‎changelog.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
= fix random /bingo
1+
= make 'Show potion abbreviation' show the correct colour
2+
Bingo Party message formatter stuff:
3+
+ add voicemail support
4+
= fixed it triggering when it shouldn't
5+
= fixed custom prefix

‎features/party/messageFormatter.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import constants from "../../utils/constants"
33
import { onChatPacket } from "../../utils/Events"
44
import Party from "../../utils/Party"
55

6-
const incomingRegex = new RegExp(`^From (?:\\[.*?\\] )?${Party.getBotIGN(false)}: (.*) \\|.*$`)
6+
const incomingRegex = new RegExp(`^(?:From|Voicemail) (?:\\[.*?\\] )?${Party.getBotIGN(false)}: (.*)$`)
77
const outgoingRegex = new RegExp(`^To (?:\\[.*?\\] )?${Party.getBotIGN(false)}: !p .*$`)
88

99
// incoming formatter
1010
onChatPacket((message, event) => {
1111
if (!settings().bingoPartyIncomingFormatter) return
12-
const prefix = settings().bingoPartyMessageFormatterPrefix == "" ?
12+
const prefix = settings().bingoPartyMessageFormatterPrefix !== "" ?
1313
settings().bingoPartyMessageFormatterPrefix :
1414
constants.DEFAULT_MESSAGE_FORMATTER_PREFIX
15-
let final = `${prefix}&r${message}`
15+
16+
let final = `${prefix}&r${message.slice(0, message.lastIndexOf("|"))}`
1617
ChatLib.chat(final)
1718
cancel(event)
1819
}).setCriteria(incomingRegex)

‎features/splasher/potionUtils.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ const nameRegex = /^§\w(.*?) (Splash )?Potion$/ // https://regex101.com/r/aWdGG
66
const loreRegex = /§(\w).*/ // https://regex101.com/r/kht3Li/2
77

88
// Show potion abbreviation
9+
// thanks chick man
10+
const items = new (Java.type('java.util.WeakHashMap'))();
911
registerWhen(register("renderItemIntoGui", (item, x, y) => {
10-
const name = item.getName()
11-
if (!name.includes("Splash Potion")) return
12-
const text = name.slice(0,5) + "."
13-
14-
Renderer.translate(x, y, 251) // 251 puts it behind the tooltip, in front of its texture, and in front of head other textures
12+
const stack = item.itemStack
13+
let str = items.get(stack)
14+
if (str === '') return
15+
if (!str) {
16+
const n = item.getName()
17+
str = n.includes('Splash Potion') ? item.getLore()[2].match(/^([§\w]*§\w\w{1,3})/)[1] + '.' : ''
18+
items.put(stack, str)
19+
if (!str) return
20+
}
21+
Renderer.translate(x, y, 251)
1522
Renderer.scale(0.6)
16-
Renderer.drawString(text, 0, 0)
17-
23+
Renderer.drawString(str, 0, 0)
1824
}), () => settings().potionAbbreviation && Skyblock.inSkyblock)
1925

2026
// these functions will have a use eventually trust

‎index.js

+7
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ import "./features/world/windCompass"
6161

6262

6363
/*
64+
1.5.8 changelog
65+
= make 'Show potion abbreviation' show the correct colour
66+
Bingo Party message formatter stuff:
67+
+ add voicemail support
68+
= fixed it triggering when it shouldn't
69+
= fixed custom prefix
70+
6471
1.5.7 changelog
6572
= fix random /bingo
6673

‎metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "BingoPlus",
44
"creator": "ooffyy",
55
"description": "A module with various Bingo-related features",
6-
"version": "1.5.7",
6+
"version": "1.5.8",
77
"entry": "index.js",
88
"requires": ["Amaterasu", "PogData", "requestV2", "RenderLibV2", "BeaconBeam"]
99
}

0 commit comments

Comments
 (0)
Please sign in to comment.