reward.add(new IncreaseXPAction(1000));
reward.add(new SetQuestAction(QUEST_SLOT, "jailed"));
reward.add(new IncreaseKarmaAction(10));
npc.add(ConversationStates.ATTENDING, "egg",
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "egg"),
new PlayerHasItemWithHimCondition("egg")),
ConversationStates.ATTENDING,
"Thank you again my friend. Now you have to tell Princess Ylflia, in Kalavan Castle, that I am #jailed here. Please hurry up!",
new MultipleActions(reward));
npc.add(
ConversationStates.ATTENDING, "egg",
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "egg"), new NotCondition(new PlayerHasItemWithHimCondition("egg"))),
ConversationStates.ATTENDING,
"I cannot see an egg!",
null);
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestInStateCondition(QUEST_SLOT, "egg"),
ConversationStates.ATTENDING,
"I asked you to fetch an #egg for me!",
null);
npc.add(ConversationStates.ATTENDING, "jailed",
new QuestInStateCondition(QUEST_SLOT, "jailed"),
ConversationStates.ATTENDING, "I know that *I'm* jailed! I need you to go tell Princess Ylflia that I am here!",
null);
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
new QuestInStateCondition(QUEST_SLOT, "jailed"),
ConversationStates.ATTENDING,
"I need you to go tell Princess Ylflia that I am #jailed here.",
null);
}