1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
package me.Danker.features.loot;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StringUtils;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class BlazeTracker {
public static int demonlords;
public static int derelictAshes;
public static int lavatearRunes;
public static int splashPotions;
public static int magmaArrows;
public static int manaDisintegrators;
public static int scorchedBooks;
public static int kelvinInverters;
public static int blazeRodDistillates;
public static int glowstoneDistillates;
public static int magmaCreamDistillates;
public static int netherWartDistillates;
public static int gabagoolDistillates;
public static int scorchedPowerCrystals;
public static int fireAspectBooks;
public static int fieryBurstRunes;
public static int opalGems;
public static int archfiendDice;
public static int duplexBooks;
public static int highClassArchfiendDice;
public static int engineeringPlans;
public static int subzeroInverters;
public static double time;
public static int bosses;
public static int demonlordsSession = 0;
public static int derelictAshesSession = 0;
public static int lavatearRunesSession = 0;
public static int splashPotionsSession = 0;
public static int magmaArrowsSession = 0;
public static int manaDisintegratorsSession = 0;
public static int scorchedBooksSession = 0;
public static int kelvinInvertersSession = 0;
public static int blazeRodDistillatesSession = 0;
public static int glowstoneDistillatesSession = 0;
public static int magmaCreamDistillatesSession = 0;
public static int netherWartDistillatesSession = 0;
public static int gabagoolDistillatesSession = 0;
public static int scorchedPowerCrystalsSession = 0;
public static int fireAspectBooksSession = 0;
public static int fieryBurstRunesSession = 0;
public static int opalGemsSession = 0;
public static int archfiendDiceSession = 0;
public static int duplexBooksSession = 0;
public static int highClassArchfiendDiceSession = 0;
public static int engineeringPlansSession = 0;
public static int subzeroInvertersSession = 0;
public static double timeSession = 0;
public static int bossesSession = 0;
@SubscribeEvent
public void onChat(ClientChatReceivedEvent event) {
String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
if (!Utils.inSkyblock) return;
if (event.type == 2) return;
if (message.contains(":")) return;
boolean rng = false;
if (message.contains(" Blaze Slayer LVL ")) {
demonlords++;
demonlordsSession++;
if (bosses != -1) {
bosses++;
}
if (bossesSession != -1) {
bossesSession++;
}
ConfigHandler.writeIntConfig("blaze", "demonlords", demonlords);
ConfigHandler.writeIntConfig("blaze", "bossRNG", bosses);
} else if (message.contains("VERY RARE DROP! (") && message.contains(" Lavatears Rune I)")) {
lavatearRunes++;
lavatearRunesSession++;
ConfigHandler.writeIntConfig("blaze", "lavatearRunes", lavatearRunes);
} else if (message.contains("VERY RARE DROP! (Wisp's Ice-Flavored Water I Splash Potion)")) {
splashPotions++;
splashPotionsSession++;
ConfigHandler.writeIntConfig("blaze", "splashPotions", splashPotions);
} else if (message.contains("RARE DROP! (Bundle of Magma Arrows)")) {
magmaArrows++;
magmaArrowsSession++;
ConfigHandler.writeIntConfig("blaze", "magmaArrows", magmaArrows);
} else if (message.contains("VERY RARE DROP! (Mana Disintegrator)")) {
manaDisintegrators++;
manaDisintegratorsSession++;
ConfigHandler.writeIntConfig("blaze", "manaDisintegrators", manaDisintegrators);
} else if (message.contains("VERY RARE DROP! (Scorched Books)")) {
scorchedBooks++;
scorchedBooksSession++;
ConfigHandler.writeIntConfig("blaze", "scorchedBooks", scorchedBooks);
} else if (message.contains("VERY RARE DROP! (Kelvin Inverter)")) {
kelvinInverters++;
kelvinInvertersSession++;
ConfigHandler.writeIntConfig("blaze", "kelvinInverters", kelvinInverters);
} else if (message.contains("VERY RARE DROP! (") && message.contains("Blaze Rod Distillate)")) {
int amount = LootTracker.getAmountfromMessage(message);
blazeRodDistillates += amount;
blazeRodDistillatesSession += amount;
ConfigHandler.writeIntConfig("blaze", "blazeRodDistillates", blazeRodDistillates);
} else if (message.contains("VERY RARE DROP! (") && message.contains("Glowstone Distillate)")) {
int amount = LootTracker.getAmountfromMessage(message);
glowstoneDistillates += amount;
glowstoneDistillatesSession += amount;
ConfigHandler.writeIntConfig("blaze", "glowstoneDistillates", glowstoneDistillates);
} else if (message.contains("VERY RARE DROP! (") && message.contains("Magma Cream Distillate)")) {
int amount = LootTracker.getAmountfromMessage(message);
magmaCreamDistillates += amount;
magmaCreamDistillatesSession += amount;
ConfigHandler.writeIntConfig("blaze", "magmaCreamDistillates", magmaCreamDistillates);
} else if (message.contains("VERY RARE DROP! (") && message.contains("Nether Wart Distillate)")) {
int amount = LootTracker.getAmountfromMessage(message);
netherWartDistillates += amount;
netherWartDistillatesSession += amount;
ConfigHandler.writeIntConfig("blaze", "netherWartDistillates", netherWartDistillates);
} else if (message.contains("VERY RARE DROP! (") && message.contains("Gabagool Distillate)")) {
int amount = LootTracker.getAmountfromMessage(message);
gabagoolDistillates += amount;
gabagoolDistillatesSession += amount;
ConfigHandler.writeIntConfig("blaze", "gabagoolDistillates", gabagoolDistillates);
} else if (message.contains("VERY RARE DROP! (Scorched Power Crystal)")) {
scorchedPowerCrystals++;
scorchedPowerCrystalsSession++;
ConfigHandler.writeIntConfig("blaze", "scorchedPowerCrystals", scorchedPowerCrystals);
} else if (message.contains("VERY RARE DROP! (Fire Aspect III)")) {
fireAspectBooks++;
fireAspectBooksSession++;
ConfigHandler.writeIntConfig("blaze", "fireAspectBooks", fireAspectBooks);
} else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Fiery Burst Rune I)")) {
rng = true;
fieryBurstRunes++;
fieryBurstRunesSession++;
ConfigHandler.writeIntConfig("blaze", "fieryBurstRunes", fieryBurstRunes);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "FIERY BURST RUNE!", 5);
} else if (message.contains("VERY RARE DROP! (") && message.contains(" Flawed Opal Gemstone)")) {
int amount = LootTracker.getAmountfromMessage(message);
opalGems += amount;
opalGemsSession += amount;
ConfigHandler.writeIntConfig("blaze", "opalGems", opalGems);
} else if (message.contains("VERY RARE DROP! (Archfiend Dice)")) {
archfiendDice++;
archfiendDiceSession++;
ConfigHandler.writeIntConfig("blaze", "archfiendDice", archfiendDice);
} else if (message.contains("VERY RARE DROP! (Duplex I)")) {
duplexBooks++;
duplexBooksSession++;
ConfigHandler.writeIntConfig("blaze", "duplexBooks", duplexBooks);
} else if (message.contains("CRAZY RARE DROP! (High Class Archfiend Dice)")) {
rng = true;
highClassArchfiendDice++;
highClassArchfiendDiceSession++;
ConfigHandler.writeIntConfig("blaze", "highClassArchfiendDice", highClassArchfiendDice);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "HIGH CLASS ARCHFIEND DICE!", 5);
} else if (message.contains("CRAZY RARE DROP! (Wilson's Engineering Plans)")) {
rng = true;
engineeringPlans++;
engineeringPlansSession++;
ConfigHandler.writeIntConfig("blaze", "engineeringPlans", engineeringPlans);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "ENGINEERING PLANS!", 5);
} else if (message.contains("CRAZY RARE DROP! (Subzero Inverter)")) {
rng = true;
subzeroInverters++;
subzeroInvertersSession++;
ConfigHandler.writeIntConfig("blaze", "subzeroInverters", subzeroInverters);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SUBZERO INVERTER!", 5);
}
if (rng) {
time = System.currentTimeMillis() / 1000;
bosses = 0;
timeSession = System.currentTimeMillis() / 1000;
bossesSession = 0;
ConfigHandler.writeDoubleConfig("blaze", "timeRNG", time);
ConfigHandler.writeIntConfig("blaze", "bossRNG", 0);
}
}
}
|