daily task plugin: add Thirus's dynamite
This commit is contained in:
@@ -126,6 +126,11 @@ public enum Varbits
|
||||
DIARY_KARAMJA_HARD(3611),
|
||||
DIARY_KARAMJA_ELITE(4566),
|
||||
|
||||
DIARY_KOUREND_EASY(7925),
|
||||
DIARY_KOUREND_MEDIUM(7926),
|
||||
DIARY_KOUREND_HARD(7927),
|
||||
DIARY_KOUREND_ELITE(7928),
|
||||
|
||||
DIARY_LUMBRIDGE_EASY(4495),
|
||||
DIARY_LUMBRIDGE_MEDIUM(4496),
|
||||
DIARY_LUMBRIDGE_HARD(4497),
|
||||
@@ -375,6 +380,8 @@ public enum Varbits
|
||||
*/
|
||||
DAILY_BONEMEAL_STATE(4543),
|
||||
|
||||
DAILY_DYNAMITE_COLLECTED(7939),
|
||||
|
||||
/**
|
||||
* Fairy Ring
|
||||
*/
|
||||
|
||||
@@ -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