// Player returned with goblet and had killed the vampire lord, and has iron, so offer to forge the sword.
npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestInStateCondition(QUEST_SLOT,"start"),
new PlayerHasItemWithHimCondition("goblet"),
new KilledCondition("vampire lord"),
new PlayerHasItemWithHimCondition("iron", REQUIRED_IRON)),
ConversationStates.IDLE,
"You've brought everything I need to make the vampire sword. Come back in "
+ REQUIRED_MINUTES
+ " minutes and it will be ready",
new MultipleActions(startforging));
// Player returned with goblet and had killed the vampire lord, so offer to forge the sword if iron is brought
npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestInStateCondition(QUEST_SLOT,"start"),
new PlayerHasItemWithHimCondition("goblet"),
new KilledCondition("vampire lord"),
new NotCondition(new PlayerHasItemWithHimCondition("iron", REQUIRED_IRON))),
ConversationStates.QUEST_ITEM_BROUGHT,
"You have battled hard to bring that goblet. I will use it to #forge the vampire sword",
null);
// Player has only an empty goblet currently, remind to go to Catacombs
npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestInStateCondition(QUEST_SLOT,"start"),
new PlayerHasItemWithHimCondition("empty goblet"),
new NotCondition(new PlayerHasItemWithHimCondition("goblet"))),
ConversationStates.IDLE,
"Did you lose your way? The Catacombs are in North Semos. Don't come back without a " +
"full goblet! Bye!",
null);
// Player has a goblet (somehow) but did not kill a vampire lord
npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestInStateCondition(QUEST_SLOT,"start"),
new PlayerHasItemWithHimCondition("goblet"),
new NotCondition(new KilledCondition("vampire lord"))),
ConversationStates.IDLE,
"Hm, that goblet is not filled with vampire blood; it can't be, you have not killed the vampire lord. You must slay him.",
null);
// Player lost the empty goblet?