null);
// Player asks for a quest
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestNotStartedCondition(QUEST_SLOT),
ConversationStates.QUEST_OFFERED,
"Wrof! My stock of supplies for preparing koboldish #torcibud is running thin. Would you help me getting some #stuff?",
null
);
// Player has done the quest already but not enough time has passed since completing it
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(
new QuestCompletedCondition(QUEST_SLOT),
new TimeReachedCondition(QUEST_SLOT, 1)),
ConversationStates.QUEST_OFFERED,
"Wroff! Indeed I'd need some #stuff for making some more koboldish #torcibud. Will you help?",
null);
// Player has done the quest already but it's too early to get another
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(
new QuestCompletedCondition(QUEST_SLOT),
new NotCondition(new TimeReachedCondition(QUEST_SLOT, 1))),
ConversationStates.ATTENDING, null,
new SayTimeRemainingUntilTimeReachedAction(QUEST_SLOT, 1,
"Wrof! Thank you but my stock of supplies for making good #torcibud will be fine for"));
// Player is curious about torcibud when offered the quest
npc.add(ConversationStates.QUEST_OFFERED,
"torcibud",
new QuestNotStartedCondition(QUEST_SLOT),
ConversationStates.QUEST_OFFERED,
"Wruff. I will make more when I have enough #stuff! Are you going to help?",
null);
// Player is curious about stuff, ingredients or supplies when offered the quest
// NOTE:
// the answer given by the NPC does not contain any trigger words on pourpose
// as it should only hint what's kind of things are needed.
// some details about the required items are given only once the quest has been accepted.
npc.add(ConversationStates.QUEST_OFFERED,
Arrays.asList("stuff","ingredients","supplies"),
new OrCondition(
new QuestNotStartedCondition(QUEST_SLOT),
new QuestInStateCondition(QUEST_SLOT, "rejected")),
ConversationStates.QUEST_OFFERED,
"Wrof! Some bottles, artichokes, a few herbs and fierywater... Things like that. So, will you help?",
null);