dailytasksplugin: Add Rantz ogre arrow collection notification

Closes runelite/runelite#8581
Closes runelite/runelite#8583
This commit is contained in:
Unknown
2019-05-01 11:24:23 -07:00
committed by Jordan Atwood
parent 46811b52eb
commit 99e37c2f7b
3 changed files with 27 additions and 0 deletions

View File

@@ -375,6 +375,7 @@ public enum Varbits
DAILY_RUNES_COLLECTED(4540),
DAILY_SAND_COLLECTED(4549),
DAILY_FLAX_STATE(4559),
DAILY_ARROWS_STATE(4563),
/**
* This varbit tracks how much bonemeal has been redeemed from Robin
* The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39

View File

@@ -120,4 +120,15 @@ public interface DailyTasksConfig extends Config
{
return false;
}
@ConfigItem(
position = 9,
keyName = "showArrows",
name = "Show Claimable Ogre Arrows",
description = "Show a message when you can collect ogre arrows from Rantz."
)
default boolean showArrows()
{
return false;
}
}

View File

@@ -63,6 +63,7 @@ public class DailyTasksPlugin extends Plugin
private static final String SAND_MESSAGE = "You have sand waiting to be collected from Bert.";
private static final int SAND_QUEST_COMPLETE = 160;
private static final String FLAX_MESSAGE = "You have bowstrings waiting to be converted from flax from the Flax keeper.";
private static final String ARROWS_MESSAGE = "You have ogre arrows waiting to be collected from Rantz.";
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.";
@@ -159,6 +160,10 @@ public class DailyTasksPlugin extends Plugin
checkDynamite(dailyReset);
}
if (config.showArrows())
{
checkArrows(dailyReset);
}
}
}
@@ -223,6 +228,16 @@ public class DailyTasksPlugin extends Plugin
}
}
private void checkArrows(boolean dailyReset)
{
if (client.getVar(Varbits.DIARY_WESTERN_EASY) == 1
&& (client.getVar(Varbits.DAILY_ARROWS_STATE) == 0
|| dailyReset))
{
sendChatMessage(ARROWS_MESSAGE);
}
}
private void checkBonemeal(boolean dailyReset)
{
if (client.getVar(Varbits.DIARY_MORYTANIA_MEDIUM) == 1)