daily task plugin: add Thirus's dynamite
This commit is contained in:
@@ -109,4 +109,15 @@ public interface DailyTasksConfig extends Config
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 8,
|
||||
keyName = "showDynamite",
|
||||
name = "Show Claimable Dynamite",
|
||||
description = "Show a message when you can collect Dynamite from Thirus."
|
||||
)
|
||||
default boolean showDynamite()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ public class DailyTasksPlugin extends Plugin
|
||||
private static final String FLAX_MESSAGE = "You have bowstrings waiting to be converted from flax from the Flax keeper.";
|
||||
private static final String BONEMEAL_MESSAGE = "You have bonemeal and slime waiting to be collected from Robin.";
|
||||
private static final int BONEMEAL_PER_DIARY = 13;
|
||||
private static final String DYNAMITE_MESSAGE = "You have dynamite waiting to be collected from Thirus.";
|
||||
private static final String RELOG_MESSAGE = " (May require a relog)";
|
||||
|
||||
@Inject
|
||||
@@ -153,6 +154,12 @@ public class DailyTasksPlugin extends Plugin
|
||||
{
|
||||
checkBonemeal(dailyReset);
|
||||
}
|
||||
|
||||
if (config.showDynamite())
|
||||
{
|
||||
checkDynamite(dailyReset);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,6 +279,21 @@ public class DailyTasksPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private void checkDynamite(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_KOUREND_MEDIUM) == 1)
|
||||
{
|
||||
if (client.getVar(Varbits.DAILY_DYNAMITE_COLLECTED) == 0)
|
||||
{
|
||||
sendChatMessage(DYNAMITE_MESSAGE);
|
||||
}
|
||||
else if (dailyReset)
|
||||
{
|
||||
sendChatMessage(DYNAMITE_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendChatMessage(String chatMessage)
|
||||
{
|
||||
final String message = new ChatMessageBuilder()
|
||||
|
||||
Reference in New Issue
Block a user