// 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"),
new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "Fidorea"), new SystemPropertyCondition("stendhal.minetown")),
ConversationStates.ATTENDING,
"Very good. You did the complete quest, talking to all those people around the world. I will add you name to the sign for everyone to see. And here are some magic scrolls as reward. They will help you on further travels.",
reward);
}