// player who is rejected or 'done' but waiting to start again, returns
npc.add(ConversationStates.IDLE,
ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestNotInStateCondition(QUEST_SLOT, "start"),
new QuestStartedCondition(QUEST_SLOT)),
ConversationStates.ATTENDING,
"Hello again.",
null);
// if they ask for quest while on it, remind them
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestInStateCondition(QUEST_SLOT, "start"),
ConversationStates.ATTENDING,
"You already promised me to bring me some fish soup for Hughie! Please hurry!",
null);
// first time player asks/ player had rejected
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestNotStartedCondition(QUEST_SLOT),
ConversationStates.QUEST_OFFERED,
"My poor boy is sick and the potions I give him aren't working! Please could you fetch him some fish soup?",
null);
// player returns - enough time has passed
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES)),
ConversationStates.QUEST_OFFERED,
"My Hughie is getting sick again! Please could you bring another bowl of fish soup? It helped last time.",
null);
// player returns - not enough time has passed
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES))),
ConversationStates.ATTENDING,
"Hughie is sleeping off his fever now and I'm hopeful he recovers. Thank you so much.",
null);
// player is willing to help