playerReturnsAfterCompletingQuest(scientistNpc);
}
private void playerReturnsToFetchReward(SpeakerNPC npc) {
// time has passed
final ChatCondition condition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
new TimePassedCondition(QUEST_SLOT, 1, 5)
);
final ChatAction action = new MultipleActions(
new SetQuestAction(QUEST_SLOT,"done"),
new IncreaseKarmaAction(20),
new IncreaseXPAction(10000),
// here, true = bind them to player
new EquipItemAction("black legs", 1, true)
);
npc.add(ConversationStates.IDLE,
ConversationPhrases.GREETING_MESSAGES,
condition,
ConversationStates.IDLE,
"Here are the black legs. Now I beg you to wear them. The symbol of my pain is done. Fare thee well.",
action);
// time has not yet passed
final ChatCondition notCondition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
new NotCondition( new TimePassedCondition(QUEST_SLOT, 1, 5))
);
ChatAction reply = new SayTimeRemainingAction(QUEST_SLOT, 1, 5, "I did not finish decorating the legs. " +
"Please check back in");