Skip to content

Commit 40b42a6

Browse files
authored
1.5.9
2 parents 4306b13 + 61c9ab1 commit 40b42a6

11 files changed

+301
-90
lines changed

amaterasuSchemeTesting.txt

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.addTextInput({
2+
configName: "devAddTextInput",
3+
title: "Text Input",
4+
description: "Example of text input that does not wrap the text",
5+
category: "Dev",
6+
subcategory: "All elements",
7+
value: "",
8+
placeHolder: "Empty... :("
9+
})
10+
.addColorPicker({
11+
configName: "devAddColorPicker",
12+
title: "Color Picker",
13+
description: "Pick a color! (hopefully...)",
14+
category: "Dev",
15+
subcategory: "All elements",
16+
value: [0, 0, 255, 255]
17+
})
18+
.addSwitch({
19+
configName: "devAddSwitch",
20+
title: "Switch",
21+
description: "toggle the checkbox in Not general! tab!",
22+
category: "Dev",
23+
subcategory: "All elements"
24+
})
25+
.addToggle({
26+
configName: "devAddToggle",
27+
title: "Checkbox/Toggle",
28+
description: "Check this box",
29+
category: "Dev",
30+
subcategory: "All elements"
31+
})
32+
.addDropDown({
33+
configName: "devAddDropDown",
34+
title: "DropDown",
35+
description: "Select an option",
36+
category: "Dev",
37+
subcategory: "All elements",
38+
options: ["one", "two", "three"],
39+
value: 0
40+
})
41+
.addSlider({
42+
configName: "devAddSlider",
43+
title: "Slider",
44+
description: "Select a value",
45+
category: "Dev",
46+
subcategory: "All elements",
47+
options: [0, 100],
48+
value: 0
49+
})
50+
.addButton({
51+
configName: "devAddButton",
52+
title: "Button",
53+
description: "yay",
54+
category: "Dev",
55+
subcategory: "All elements",
56+
onClick() {
57+
ChatLib.chat("hi :P")
58+
}
59+
})

changelog.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
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
1+
+ add "Splash combo" feature
2+
+ add "Timer over Spider's Den bones" feature
3+
= fix Chicken Head Timer not hiding properly
4+
= fix incoming party message formatter again

features/bingo/chickenHeadTimer.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { BaseGui } from "../../render/BaseGui"
22
import { data } from "../../utils/constants"
33
import settings from "../../settings"
44
import Skyblock from "../../utils/Skyblock"
5-
import { registerWhen } from "../../utils/utils"
5+
import { getSkyblockItemID, registerWhen } from "../../utils/utils"
66
import { registerGui } from "../../render/registerGui"
77

88
const layCooldown = 5000
@@ -13,21 +13,19 @@ let chickenHeadTimerGui = new BaseGui('chickenHeadTimerDisplay', ['chickenHeadTi
1313
registerGui(chickenHeadTimerGui)
1414

1515
register("tick", () => {
16-
opened = (settings().chickenHeadTimer && Skyblock.inSkyblock && Player.armor?.getHelmet()?.getName()?.includes("Chicken Head")) || chickenHeadTimerGui.isOpen()
16+
opened = (settings().chickenHeadTimer && Skyblock.inSkyblock && getSkyblockItemID(Player.armor?.getHelmet()) === "CHICKEN_HEAD") || chickenHeadTimerGui.isOpen()
1717
})
1818

1919
register("worldLoad", () => {
2020
lastLay = new Date().getTime()
2121
})
2222

2323
registerWhen(register("renderOverlay", () => { // thanks bloom
24-
if (!opened) return
25-
2624
Renderer.translate(data.chickenHeadTimerDisplay.x, data.chickenHeadTimerDisplay.y)
2725
Renderer.scale(data.chickenHeadTimerDisplay.scale ?? 1)
2826

2927
// Move GUI
30-
if (chickenHeadTimerGui.isOpen()) { Renderer.drawStringWithShadow("Chicken Head Timer:", 0, 0); return }
28+
if (chickenHeadTimerGui.isOpen()) return Renderer.drawStringWithShadow("Chicken Head Timer:", 0, 0)
3129

3230
let sinceLay = new Date().getTime() - lastLay
3331
let remainingTime = layCooldown - sinceLay

features/other/splashCombo.js

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import settings from "../../settings"
2+
import Skyblock from "../../utils/Skyblock"
3+
4+
const colours = ["§8", "§c", "§6", "§e", "§2", "§a", "§b"]
5+
const thresholds = [5, 10, 15, 20, 25, 30, 35]
6+
7+
// BUFF! You were splashed by BingoSplasher with Mushed Glowy Tonic I! Press TAB or type /effects to view your active effects!
8+
const regex =
9+
/^BUFF! (?:You splashed yourself|You were splashed by (\w{1,16})) with (.*)! Press TAB or type \/effects to view your active effects!$/
10+
11+
let splashedPotions = {}
12+
let messageID = 5967
13+
14+
// splash combo!
15+
register("chat", (user = Player.getName(), potion, event) => {
16+
if (!Skyblock.inSkyblock) return
17+
if (!settings().splashCombo) return
18+
19+
// create user
20+
if (!splashedPotions[user]) {
21+
messageID += 1
22+
splashedPotions[user] = {
23+
displayName:
24+
World.getAllPlayers()
25+
?.find((player) => player?.getName() === user)
26+
?.getDisplayName()?.text || user,
27+
id: messageID,
28+
combo: 0,
29+
potions: []
30+
}
31+
}
32+
33+
let currentUser = splashedPotions[user]
34+
35+
// return if the same potion type is already splashed
36+
// TODO: disregard potion level (roman numerals)
37+
if (currentUser.potions.includes(potion)) return
38+
39+
currentUser.potions.push(potion)
40+
currentUser.combo += 1
41+
42+
let combo = currentUser.combo
43+
44+
// chat message
45+
/*
46+
ChatLib.clearChat(currentUser.id)
47+
new Message(`Combo: ${currentUser.combo}`)
48+
.setChatLineId(currentUser.id)
49+
.chat()
50+
*/
51+
52+
// title
53+
let colour = colours[thresholds.findIndex((threshold) => combo < threshold)]
54+
if (colour === undefined) colour = "&b"
55+
Client.showTitle(
56+
`${colour}${combo} combo!`,
57+
"", // TODO: fix the splasher not showing
58+
// `&7Splasher: ${currentUser.displayName}`
59+
0,
60+
60,
61+
20
62+
)
63+
64+
// sounds
65+
const pitch = 0.5 + combo / 20
66+
World.playSound("note.pling", 100, pitch)
67+
if (combo <= 10) return
68+
new Thread(() => {
69+
Thread.sleep(30)
70+
World.playSound("random.successful_hit", 100, pitch - 0.5)
71+
if (combo <= 15) return
72+
Thread.sleep(5)
73+
World.playSound("random.orb", 100, pitch - 1)
74+
}).start()
75+
}).setCriteria(regex)
76+
77+
register("worldLoad", init)
78+
79+
function init() {
80+
splashedPotions = {}
81+
messageID = 5967
82+
}

features/party/messageFormatter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import constants from "../../utils/constants"
33
import { onChatPacket } from "../../utils/Events"
44
import Party from "../../utils/Party"
55

6-
const incomingRegex = new RegExp(`^(?:From|Voicemail) (?:\\[.*?\\] )?${Party.getBotIGN(false)}: (.*)$`)
6+
// https://regex101.com/r/a9UlVQ/1
7+
const incomingRegex = new RegExp(`^(?:From|Voicemail) (?:\\[[^\\]]*?\\] )?${Party.getBotIGN(false)}: (.*)$`, 'm');
78
const outgoingRegex = new RegExp(`^To (?:\\[.*?\\] )?${Party.getBotIGN(false)}: !p .*$`)
89

910
// incoming formatter

features/splasher/brewingStandUtils.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,14 @@ register("blockBreak", (block) => {
125125
brewingStands = brewingStands.filter(stand => !compareCoords(stand, brokenStand))
126126
})
127127

128-
// get info from inside the thing
128+
// get info from inside the brewing stand
129129
register("tick", () => {
130130
if (!enabled) return
131131
if (!openedStand) return
132132

133133
const inv = Player.getContainer()
134+
if (!inv) return
135+
134136
let name, match
135137

136138
// time left

features/world/timerOverBones.js

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { drawStringWithShadow } from "../../render/utils"
2+
import { registerWhen } from "../../utils/utils"
3+
import settings from "../../settings"
4+
import Skyblock from "../../utils/Skyblock"
5+
6+
let bones = []
7+
let enabled = false
8+
9+
const reset = () => {
10+
bones = []
11+
}
12+
13+
register("tick", () => {
14+
enabled = Skyblock.area === "Spider's Den" && settings().timerOverBones
15+
})
16+
17+
// bone manager
18+
register("tick", () => {
19+
if (!enabled) return reset()
20+
21+
const entities = World.getAllEntitiesOfType(net.minecraft.entity.item.EntityItem)
22+
23+
entities.forEach(item => {
24+
if (item.name !== "item.item.bone") return
25+
// update existing bones
26+
let index = bones.findIndex(bone => bone.uuid === item.getUUID())
27+
if (index !== -1) {
28+
bones[index].item = item
29+
return
30+
}
31+
32+
bones.push({
33+
text: "",
34+
item: item,
35+
uuid: item.getUUID(),
36+
timer: 5.0
37+
})
38+
})
39+
40+
// remove bones that are no longer in the world
41+
bones.forEach(bone => {
42+
if (!entities.includes(bone.item)) {
43+
bones.splice(bones.indexOf(bone), 1)
44+
return
45+
}
46+
47+
48+
bone.timer -= 0.05
49+
50+
// -30 to ensure the bone is absolutely gone lol
51+
if (bone.timer <= -30) {
52+
bones.splice(bones.indexOf(bone), 1)
53+
}
54+
})
55+
})
56+
57+
registerWhen(register("renderWorld", () => {
58+
bones.forEach(bone => {
59+
let text, colour
60+
if (bone.timer <= 0) {
61+
text = "!!!"
62+
colour = [1, 0, 0]
63+
} else if (bone.timer <= -5) {
64+
text = "..?"
65+
colour = [1, 1, 0]
66+
} else {
67+
text = bone.timer.toFixed(1)
68+
colour = [1, 1, 1]
69+
}
70+
71+
72+
drawStringWithShadow(
73+
text,
74+
bone.item.getX(),
75+
bone.item.getY() + 2,
76+
bone.item.getZ(),
77+
3,
78+
colour
79+
)
80+
})
81+
}), () => enabled && bones.length > 0)

index.js

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import "./features/party/messageFormatter"
2929

3030
import "./features/chat/oringoCost"
3131

32+
import "./features/other/splashCombo"
33+
3234
import "./features/splasher/brewingUtils"
3335
import "./features/splasher/brewingStandUtils"
3436
import "./features/splasher/splasherDisplay"
@@ -37,11 +39,14 @@ import "./features/splasher/hubSelector"
3739

3840
import "./features/world/rats"
3941
import "./features/world/puzzlerSolver"
42+
import "./features/world/timerOverBones"
4043
import "./features/world/windCompass"
4144

4245

4346

4447
/* TODO
48+
* - fix feature file structure !!!
49+
4550
* - reminder to do bingo stuff like cakes, experiments, fetchur, puzzler, bednom
4651
* - hotm tree unlock reminders
4752
* - king talisman helper!
@@ -61,6 +66,9 @@ import "./features/world/windCompass"
6166

6267

6368
/*
69+
1.5.9 changelog
70+
= maybe fixed brewing stand-related features
71+
6472
1.5.8 changelog
6573
= make 'Show potion abbreviation' show the correct colour
6674
Bingo Party message formatter stuff:

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.8",
6+
"version": "1.5.9",
77
"entry": "index.js",
88
"requires": ["Amaterasu", "PogData", "requestV2", "RenderLibV2", "BeaconBeam"]
99
}

0 commit comments

Comments
 (0)