aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java47
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/SkillTrackerCommand.java107
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java11
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java11
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java2
7 files changed, 116 insertions, 65 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 8688bee..d239e3e 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -103,6 +103,9 @@ public class DankersSkyblockMod
static Entity livid = null;
public static double cakeTime;
+ public static List<String> partyList = new ArrayList<>();
+ public static List<String> repartyFailList = new ArrayList<>();
+
public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png");
static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in",
@@ -159,6 +162,7 @@ public class DankersSkyblockMod
static double alchemyXP = 0;
public static double alchemyXPGained = 0;
static double xpLeft = 0;
+ static double timeSinceGained = 0;
public static String MAIN_COLOUR;
public static String SECONDARY_COLOUR;
@@ -186,8 +190,6 @@ public class DankersSkyblockMod
public static int PET_80_TO_89;
public static int PET_90_TO_99;
public static int PET_100;
-
- public static List<String> partyList = new ArrayList<>();
@EventHandler
public void init(FMLInitializationEvent event) {
@@ -358,7 +360,7 @@ public class DankersSkyblockMod
String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
// Reparty command
- if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 1.5) {
+ if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 3) {
if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members"))) {
return;
}
@@ -367,7 +369,7 @@ public class DankersSkyblockMod
Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$");
Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$");
- Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●");
+ Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●");
Matcher party_start = party_start_pattern.matcher(message);
Matcher leader = leader_pattern.matcher(message);
@@ -396,16 +398,30 @@ public class DankersSkyblockMod
// Action Bar
if (event.type == 2) {
- String[] actionBarSections = event.message.getUnformattedText().split(" {3,}");
- for (String section : actionBarSections) {
+ EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
+ String[] actionBarSections = event.message.getUnformattedText().split(" {3,}");
+
+ for (String section : actionBarSections) {
if (section.contains("+") && section.contains("/") && section.contains("(")) {
if (!section.contains("Runecrafting") && !section.contains("Carpentry")) {
- int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50;
- double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
+ if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) {
+ if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) {
+ skillStopwatch.resume();
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
+ } else if (!skillStopwatch.isStarted()) {
+ skillStopwatch.start();
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
+ }
+ }
+ timeSinceGained = System.currentTimeMillis() / 1000;
+
+ int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50;
+ double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""));
xpLeft = xpToLevelUp - currentXP;
int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit);
- double totalXP = currentXP + previousXP;
+ double totalXP = currentXP + previousXP;
+
String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" "));
switch (skill) {
case "Farming":
@@ -2377,7 +2393,7 @@ public class DankersSkyblockMod
Utils.checkForSkyblock();
Utils.checkForDungeons();
}
-
+
if (DisplayCommand.auto && world != null && player != null) {
List<String> scoreboard = ScoreboardHandler.getSidebarLines();
boolean found = false;
@@ -2691,7 +2707,7 @@ public class DankersSkyblockMod
correctTicTacToeButton = new AxisAlignedBB(drawX, drawY, drawZ, drawX + 1, drawY + 1, drawZ + 1);
}
}
- }
+ }
tickAmount = 0;
}
@@ -3250,6 +3266,7 @@ public class DankersSkyblockMod
GuiChest chest = (GuiChest) event.gui;
IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory();
String inventoryName = inventory.getDisplayName().getUnformattedText();
+
if (ToggleCommand.swapToPickBlockToggled) {
if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) {
if (!pickBlockBindSwapped) {
@@ -3271,6 +3288,14 @@ public class DankersSkyblockMod
pickBlockBindSwapped = false;
}
}
+
+ if (ToggleCommand.autoSkillTrackerToggled) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) {
+ skillStopwatch.suspend();
+ mc.thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused."));
+ }
+ }
+
clickInOrderSlots = new Slot[36];
lastChronomatronRound = 0;
chronomatronPattern.clear();
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index f16f598..d6ce908 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -34,7 +34,7 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/flowerweapons/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/flowerweapons/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/notifyslayerslain/autoskilltracker/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs/mythological/> [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
index 380086a..d596d65 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -61,6 +61,7 @@ public class DankerGuiCommand extends CommandBase {
debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n");
debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n");
debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n");
+ debug.append("[autoskilltracker][").append(ToggleCommand.autoSkillTrackerToggled).append("]\n");
debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n");
debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n");
debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n");
diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
index 7642070..e341f43 100644
--- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java
+++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.time.StopWatch;
import java.util.List;
public class SkillTrackerCommand extends CommandBase {
+ public static boolean running = false;
@Override
public String getCommandName() {
@@ -39,55 +40,63 @@ public class SkillTrackerCommand extends CommandBase {
@Override
public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException {
- EntityPlayer player = (EntityPlayer) arg0;
-
- if (arg1.length < 1) {
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
- return;
- }
-
- switch (arg1[0].toLowerCase()) {
- case "start":
- case "resume":
- if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) {
- DankersSkyblockMod.skillStopwatch.resume();
- } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) {
- DankersSkyblockMod.skillStopwatch.start();
- }
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
- break;
- case "pause":
- case "stop":
- if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
- DankersSkyblockMod.skillStopwatch.suspend();
- } else {
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused."));
- }
- break;
- case "reset":
- DankersSkyblockMod.skillStopwatch = new StopWatch();
- DankersSkyblockMod.farmingXPGained = 0;
- DankersSkyblockMod.miningXPGained = 0;
- DankersSkyblockMod.combatXPGained = 0;
- DankersSkyblockMod.foragingXPGained = 0;
- DankersSkyblockMod.fishingXPGained = 0;
- DankersSkyblockMod.enchantingXPGained = 0;
- DankersSkyblockMod.alchemyXPGained = 0;
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset."));
- break;
- case "hide":
- DankersSkyblockMod.showSkillTracker = false;
- ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden."));
- break;
- case "show":
- DankersSkyblockMod.showSkillTracker = true;
- ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown."));
- break;
- default:
+ // MULTI THREAD DRIFTING
+ new Thread(() -> {
+ EntityPlayer player = (EntityPlayer) arg0;
+
+ if (arg1.length < 1) {
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
- }
- }
+ return;
+ }
+
+ try {
+ Thread.sleep(200);
+ switch (arg1[0].toLowerCase()) {
+ case "start":
+ case "resume":
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.resume();
+ } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) {
+ DankersSkyblockMod.skillStopwatch.start();
+ }
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started."));
+ break;
+ case "pause":
+ case "stop":
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.suspend();
+ } else {
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused."));
+ }
+ break;
+ case "reset":
+ DankersSkyblockMod.skillStopwatch = new StopWatch();
+ DankersSkyblockMod.farmingXPGained = 0;
+ DankersSkyblockMod.miningXPGained = 0;
+ DankersSkyblockMod.combatXPGained = 0;
+ DankersSkyblockMod.foragingXPGained = 0;
+ DankersSkyblockMod.fishingXPGained = 0;
+ DankersSkyblockMod.enchantingXPGained = 0;
+ DankersSkyblockMod.alchemyXPGained = 0;
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset."));
+ break;
+ case "hide":
+ DankersSkyblockMod.showSkillTracker = false;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden."));
+ break;
+ case "show":
+ DankersSkyblockMod.showSkillTracker = true;
+ ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown."));
+ break;
+ default:
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }).start();
+ }
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 15693ef..0054c10 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -41,6 +41,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean swapToPickBlockToggled;
public static boolean flowerWeaponsToggled;
public static boolean notifySlayerSlainToggled;
+ public static boolean autoSkillTrackerToggled;
// Puzzle Solvers
public static boolean threeManToggled;
public static boolean oruoToggled;
@@ -70,7 +71,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" +
"aotd/lividdagger/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" +
"outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" +
- "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" +
+ "lividsolver/stopsalvagestarred/notifyslayerslain/autoskilltracker/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" +
"watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" +
"itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>";
}
@@ -88,7 +89,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
"flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
"implosionmessages", "healmessages", "caketimer", "lowhealthnotify",
- "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle",
+ "lividsolver", "stopsalvagestarred", "notifyslayerslain", "autoskilltracker", "threemanpuzzle", "oruopuzzle", "blazepuzzle",
"creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal",
"selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer",
"chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list");
@@ -237,6 +238,11 @@ public class ToggleCommand extends CommandBase implements ICommand {
ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", notifySlayerSlainToggled);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Notify when slayer slain has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + notifySlayerSlainToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
+ case "autoskilltracker":
+ autoSkillTrackerToggled = !autoSkillTrackerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", autoSkillTrackerToggled);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto start/stop skill tracker has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + autoSkillTrackerToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
case "threemanpuzzle":
threeManToggled = !threeManToggled;
ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled);
@@ -346,6 +352,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
DankersSkyblockMod.TYPE_COLOUR + " Outline displayed text: " + DankersSkyblockMod.VALUE_COLOUR + outlineTextToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Cake timer: " + DankersSkyblockMod.VALUE_COLOUR + cakeTimerToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Low health notify: " + DankersSkyblockMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Auto start/stop skill tracker: " + DankersSkyblockMod.VALUE_COLOUR + autoSkillTrackerToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Livid solver: " + DankersSkyblockMod.VALUE_COLOUR + lividSolverToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Three man puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + threeManToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Oruo trivia solver: " + DankersSkyblockMod.VALUE_COLOUR + oruoToggled + "\n" +
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 69ccbe4..85780bd 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -59,6 +59,7 @@ public class DankerGui extends GuiScreen {
private GuiButton flowerWeapons;
private GuiButton pickBlock;
private GuiButton notifySlayerSlain;
+ private GuiButton autoSkillTracker;
public DankerGui(int page) {
this.page = page;
@@ -122,7 +123,8 @@ public class DankerGui extends GuiScreen {
watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled));
splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing));
notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled));
- flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled));
+ flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled));
+ autoSkillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled));
switch (page) {
case 1:
@@ -173,7 +175,8 @@ public class DankerGui extends GuiScreen {
this.buttonList.add(watcherReadyMessage);
this.buttonList.add(splitFishing);
this.buttonList.add(notifySlayerSlain);
- this.buttonList.add(flowerWeapons);
+ this.buttonList.add(flowerWeapons);
+ this.buttonList.add(autoSkillTracker);
this.buttonList.add(backPage);
break;
}
@@ -337,6 +340,10 @@ public class DankerGui extends GuiScreen {
ToggleCommand.flowerWeaponsToggled = !ToggleCommand.flowerWeaponsToggled;
ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", ToggleCommand.flowerWeaponsToggled);
flowerWeapons.displayString = "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled);
+ } else if (button == autoSkillTracker) {
+ ToggleCommand.autoSkillTrackerToggled = !ToggleCommand.autoSkillTrackerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", ToggleCommand.autoSkillTrackerToggled);
+ autoSkillTracker.displayString = "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled);
}
}
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 93425e5..1ee1414 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -196,6 +196,7 @@ public class ConfigHandler {
if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false);
if (!hasKey("toggles", "FlowerWeapons")) writeBooleanConfig("toggles", "FlowerWeapons", false);
if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false);
+ if (!hasKey("toggles", "AutoSkillTracker")) writeBooleanConfig("toggles", "AutoSkillTracker", false);
// Puzzle Solvers
if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false);
if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false);
@@ -464,6 +465,7 @@ public class ConfigHandler {
ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain");
ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock");
ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons");
+ ToggleCommand.autoSkillTrackerToggled = getBoolean("toggles", "AutoSkillTracker");
// Puzzle Solvers
ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle");
ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle");