final SpeakerNPC npc = npcs.get("Zekiel the guardian");
// player returns having completed the quest
npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestCompletedCondition(QUEST_SLOT)),
ConversationStates.ATTENDING,
"Greetings adventurer, how can I #help you this time?",
null);
// player asks for help, having completed the quest
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.HELP_MESSAGES,
new QuestCompletedCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"I can #teleport you to the spire and I am also the #storekeeper of the #wizards tower.",
null);
// player asks about the store, having completed the quest
npc.add(ConversationStates.ATTENDING,
"storekeeper",
new QuestCompletedCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"The store is at the floor under the spire. I will be there when you enter it.",
null);
// send a player who has completed the quest to the top spire
npc.add(ConversationStates.ATTENDING,
"teleport",
new QuestCompletedCondition(QUEST_SLOT),
ConversationStates.IDLE, null,
new TeleportAction("int_semos_wizards_tower_8", 21, 22, Direction.UP));
// player who has completed quest asks about the tower or test, offer the teleport or help
npc.add(ConversationStates.ATTENDING,
Arrays.asList("tower", "test"),
new QuestCompletedCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"You have already passed the practical test and you are free to explore this tower. I will #teleport you to the spire, or can I #help you some other way?",
null);
}