public void addToStarterNPCs() {
SpeakerNPC npc = npcs.get("Fidorea");
ChatAction startAction = new MultipleActions(
new SetQuestAction(QUEST_SLOT, 0, points.get(0)),
new SetQuestToPlayerAgeAction(QUEST_SLOT, 1),
new SetQuestToYearAction(QUEST_SLOT, 2));
// Fidorea introduces the quests
npc.add(
ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(new QuestStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
ConversationStates.ATTENDING,
"I have nothing to do for you. But thanks for asking",
null);
npc.add(
ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
ConversationStates.QUEST_OFFERED,
"Those who had to stay at home because of their duties, have prepared a #paper #chase.",
null);
npc.add(
ConversationStates.QUEST_OFFERED,
Arrays.asList("paper", "chase"),
new SystemPropertyCondition("stendhal.minetown"),
ConversationStates.ATTENDING,
"You must ask every person on the trail about the #paper #chase. First you must find the beer-loving author of KNOW HOW TO KILL CREATURES.",
startAction);
// add normal way points (without first and last)
for (int i = 0; i < points.size() - 1; i++) {
addTaskToNPC(i);
}
// Fidorea does the post processing of this quest
npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
ConversationStates.ATTENDING, "Oh, that is a nice #quest.", null);
npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
new AndCondition(
new QuestStartedCondition(QUEST_SLOT),
new QuestNotInStateCondition(QUEST_SLOT, 0, "Fidorea"),
new QuestNotInStateCondition(QUEST_SLOT, 0, "done"),
new SystemPropertyCondition("stendhal.minetown")),
ConversationStates.ATTENDING, "I guess you still have to talk to some people.", null);
ChatAction reward = new MultipleActions(
new IncreaseKarmaAction(15),
new IncreaseXPAction(400),
new SetQuestAction(QUEST_SLOT, 0, "done"),
new EquipItemAction("empty scroll", 5),
new SetHallOfFameToAgeDiffAction(QUEST_SLOT, 1, "P"),
loadSignFromHallOfFame);
npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),