// wine
// black pearl
final SpeakerNPC npc = npcs.get("Salva Mattori");
npc.add(ConversationStates.ATTENDING, "potion",
new QuestInStateCondition(QUEST_SLOT, "start"),
ConversationStates.ATTENDING, "I will help you make this potion, Mrs Yeti is an old friend of mine. But the blade on "
+ "my magic knife has snapped yet again. I need another. I get mine from Hackim Easso of Semos City, will you go to him and "
+ "ask him to make another knife? Just say my name: #salva",
new SetQuestAction(QUEST_SLOT, "hackim"));
npc.add(
ConversationStates.ATTENDING, Arrays.asList("salva","knife"),
new NotCondition(new QuestInStateCondition(QUEST_SLOT, "knife")),
ConversationStates.ATTENDING,
"You need to go to Hackim Easso and ask him about a magic knife for #salva before I can help you.",
null);
npc.add(ConversationStates.ATTENDING, Arrays.asList("salva","knife","potion"),
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "knife"),
new PlayerHasItemWithHimCondition("knife")),
ConversationStates.ATTENDING, "Very good! Now I need the items to make the love #potion. I need 3 lilia flowers, 1 sprig of kokuda, 1 glass of wine and 1 black pearl. Please bring them all together at once and then ask me to make the #potion.",
new MultipleActions(new SetQuestAction(QUEST_SLOT, "potion"), new DropItemAction("knife")));
npc.add(ConversationStates.ATTENDING, Arrays.asList("salva","knife","potion"),
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "knife"),
new NotCondition(new PlayerHasItemWithHimCondition("knife"))),
ConversationStates.ATTENDING, "I see you have been to Hackim, but where is the magic knife?",
null);
final List<ChatAction> potionactions = new LinkedList<ChatAction>();
potionactions.add(new DropItemAction("lilia",3));
potionactions.add(new DropItemAction("kokuda"));
potionactions.add(new DropItemAction("wine"));
potionactions.add(new DropItemAction("black pearl"));
potionactions.add(new EquipItemAction("love potion"));
potionactions.add(new IncreaseXPAction(100));
potionactions.add(new SetQuestAction(QUEST_SLOT, "gotpotion"));
// don't make player wait for potion - could add this in later if wanted
npc.add(ConversationStates.ATTENDING, Arrays.asList("salva","potion"),
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "potion"),
new PlayerHasItemWithHimCondition("lilia",3),
new PlayerHasItemWithHimCondition("kokuda"),
new PlayerHasItemWithHimCondition("wine"),
new PlayerHasItemWithHimCondition("black pearl")),
ConversationStates.ATTENDING, "I see you have all the items for the potion. *mutters magic words* And now, ta da! You have the love potion. Wish Mrs Yeti good luck from me!",
new MultipleActions(potionactions));
npc.add(ConversationStates.ATTENDING, Arrays.asList("salva","potion"),
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "potion"),
new NotCondition(
new AndCondition(new PlayerHasItemWithHimCondition("lilia",3),
new PlayerHasItemWithHimCondition("kokuda"),
new PlayerHasItemWithHimCondition("wine"),
new PlayerHasItemWithHimCondition("black pearl")))),