reward.add(new ChatAction() {
public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
// pick a random flower
String rewardClass = Rand.rand(Arrays.asList("daisies","zantedeschia","pansy"));
final StackableItem reward = (StackableItem) SingletonRepository.getEntityManager().getItem(rewardClass);
reward.setQuantity(1);
player.equipOrPutOnGround(reward);
player.notifyWorldAboutChanges();
}
});
reward.add(new IncreaseXPAction(500));
reward.add(new SetQuestAction(QUEST_SLOT, "eating;"));
reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
reward.add(new IncreaseKarmaAction(10.0));
npc.add(ConversationStates.QUESTION_1,
ConversationPhrases.YES_MESSAGES,
new PlayerHasItemWithHimCondition("chocolate bar"),
ConversationStates.ATTENDING,