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
|
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 ZombieTracker {
public static int zombieRevs;
public static int zombieRevFlesh;
public static int zombieRevViscera;
public static int zombieFoulFlesh;
public static int zombieFoulFleshDrops;
public static int zombiePestilences;
public static int zombieUndeadCatas;
public static int zombieBooks;
public static int zombieBooksT7;
public static int zombieBeheadeds;
public static int zombieRevCatas;
public static int zombieSnakes;
public static int zombieScythes;
public static int zombieShards;
public static int zombieWardenHearts;
public static double zombieTime;
public static int zombieBosses;
public static int zombieRevsSession = 0;
public static int zombieRevFleshSession = 0;
public static int zombieRevVisceraSession = 0;
public static int zombieFoulFleshSession = 0;
public static int zombieFoulFleshDropsSession = 0;
public static int zombiePestilencesSession = 0;
public static int zombieUndeadCatasSession = 0;
public static int zombieBooksSession = 0;
public static int zombieBooksT7Session = 0;
public static int zombieBeheadedsSession = 0;
public static int zombieRevCatasSession = 0;
public static int zombieSnakesSession = 0;
public static int zombieScythesSession = 0;
public static int zombieShardsSession = 0;
public static int zombieWardenHeartsSession = 0;
public static double zombieTimeSession = -1;
public static int zombieBossesSession = -1;
@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(" Zombie Slayer LVL ")) { // Zombie
zombieRevs++;
zombieRevsSession++;
if (zombieBosses != -1) {
zombieBosses++;
}
if (zombieBossesSession != 1) {
zombieBossesSession++;
}
ConfigHandler.writeIntConfig("zombie", "revs", zombieRevs);
ConfigHandler.writeIntConfig("zombie", "bossRNG", zombieBosses);
} else if (message.contains("RARE DROP! (") && message.contains("Revenant Viscera)")) {
int amount = LootTracker.getAmountfromMessage(message);
zombieRevViscera += amount;
zombieRevVisceraSession += amount;
ConfigHandler.writeIntConfig("zombie", "revViscera", zombieRevViscera);
} else if (message.contains("RARE DROP! (") && message.contains("Foul Flesh)")) {
int amount = LootTracker.getAmountfromMessage(message);
zombieFoulFlesh += amount;
zombieFoulFleshSession += amount;
zombieFoulFleshDrops++;
zombieFoulFleshDropsSession++;
ConfigHandler.writeIntConfig("zombie", "foulFlesh", zombieFoulFlesh);
ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", zombieFoulFleshDrops);
} else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) {
zombieRevCatas++;
zombieRevCatasSession++;
ConfigHandler.writeIntConfig("zombie", "revCatalyst", zombieRevCatas);
} else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) {
zombiePestilences++;
zombiePestilencesSession++;
ConfigHandler.writeIntConfig("zombie", "pestilence", zombiePestilences);
} else if (message.contains("VERY RARE DROP! (Smite VI)")) {
zombieBooks++;
zombieBooksSession++;
ConfigHandler.writeIntConfig("zombie", "book", zombieBooks);
} else if (message.contains("VERY RARE DROP! (Smite VII)")) {
zombieBooksT7++;
zombieBooksT7Session++;
ConfigHandler.writeIntConfig("zombie", "bookT7", zombieBooksT7);
} else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) {
zombieUndeadCatas++;
zombieUndeadCatasSession++;
ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", zombieUndeadCatas);
} else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) {
rng = true;
zombieBeheadeds++;
zombieBeheadedsSession++;
ConfigHandler.writeIntConfig("zombie", "beheaded", zombieBeheadeds);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3);
} else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) {
rng = true;
zombieSnakes++;
zombieSnakesSession++;
ConfigHandler.writeIntConfig("zombie", "snake", zombieSnakes);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3);
} else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) {
rng = true;
zombieScythes++;
zombieScythesSession++;
ConfigHandler.writeIntConfig("zombie", "scythe", zombieScythes);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5);
} else if (message.contains("CRAZY RARE DROP! (Shard of the Shredded)")) {
rng = true;
zombieShards++;
zombieShardsSession++;
ConfigHandler.writeIntConfig("zombie", "shard", zombieShards);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "SHARD OF THE SHREDDED!", 5);
} else if (message.contains("INSANE DROP! (Warden Heart)") || message.contains("CRAZY RARE DROP! (Warden Heart)")) {
rng = true;
zombieWardenHearts++;
zombieWardenHeartsSession++;
ConfigHandler.writeIntConfig("zombie", "heart", zombieWardenHearts);
if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "WARDEN HEART!", 5);
}
if (rng) {
zombieTime = System.currentTimeMillis() / 1000;
zombieBosses = 0;
zombieTimeSession = System.currentTimeMillis() / 1000;
zombieBossesSession = 0;
ConfigHandler.writeDoubleConfig("zombie", "timeRNG", zombieTime);
ConfigHandler.writeIntConfig("zombie", "bossRNG", 0);
}
}
}
|