triggers.addAll(ConversationPhrases.QUEST_MESSAGES);
// player asks about quest or says coal when they are supposed to bring some coal and they have it
npc.add(
ConversationStates.ATTENDING, triggers,
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"), new PlayerHasItemWithHimCondition("coal",25)),
ConversationStates.ATTENDING,
null,
new MultipleActions(
new DropItemAction("coal",25),
new ChatAction() {
public void fire(final Player player,
final Sentence sentence,
final EventRaiser npc) {
int grilledsteakAmount = Rand.rand(4) + 1;
new EquipItemAction("grilled steak", grilledsteakAmount, true).fire(player, sentence, npc);
npc.say("Thank you!! Take " + Grammar.thisthese(grilledsteakAmount) + " " +
Grammar.quantityNumberStrNoun(grilledsteakAmount, "grilled steak") + " from my grill!");
new SetQuestAndModifyKarmaAction(getSlotName(), "waiting;"
+ System.currentTimeMillis(), 10.0).fire(player, sentence, npc);
}
}));
// player asks about quest or says coal when they are supposed to bring some coal and they don't have it
npc.add(
ConversationStates.ATTENDING, triggers,
new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"), new NotCondition(new PlayerHasItemWithHimCondition("coal",25))),
ConversationStates.ATTENDING,
"You don't have the coal amount which I need yet. Go and pick some more pieces up, please.",
null);
npc.add(