npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestStateStartsWithCondition(QUEST_SLOT, "start;")),
ConversationStates.QUEST_ITEM_BROUGHT,
null,
new SayRequiredItemAction(QUEST_SLOT, 1, "Welcome back! Have you brought the [item]?"));
final List<ChatAction> actions = new LinkedList<ChatAction>();
actions.add(new DropRecordedItemAction(QUEST_SLOT,1));
actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done;1", 5.0));
actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
actions.add(new IncreaseXPAction(200));
npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
ConversationPhrases.YES_MESSAGES,
new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,1),
ConversationStates.ATTENDING, "Thank you! You have rescued our rare animals.",
new MultipleActions(actions));
npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
ConversationPhrases.YES_MESSAGES,
new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,1)),
ConversationStates.ATTENDING, null,
new SayRequiredItemAction(QUEST_SLOT, 1, "*sigh* I SPECIFICALLY said that we need [item]!")
);
npc.add(ConversationStates.QUEST_ITEM_BROUGHT, ConversationPhrases.NO_MESSAGES, null,
ConversationStates.ATTENDING, "Well, hurry up! These rare animals are starving!",
null);