new QuestNotActiveCondition(QUEST_SLOT)),
ConversationStates.ATTENDING,
"Semos, Nalwor and Fado bank chests are to my right. The chests owned by Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.",
new MultipleActions(
new DropItemAction("money", COST),
new TeleportAction(ZONE_NAME, 10, 10, Direction.DOWN),
new SetQuestAction(QUEST_SLOT, "start"),
new ChatAction() {
public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
SingletonRepository.getTurnNotifier().notifyInTurns(0, new Timer(player));
}}));
add(ConversationStates.ATTENDING,
ConversationPhrases.YES_MESSAGES,
new AndCondition(
new NotCondition(new PlayerHasItemWithHimCondition("money", COST)),
new QuestNotActiveCondition(QUEST_SLOT)),
ConversationStates.ATTENDING,
"You do not have enough money!",
null);
add(ConversationStates.ATTENDING,
ConversationPhrases.YES_MESSAGES,
new QuestActiveCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"Hm, I do not understand you. If you wish to #leave, just say",
null);
add(ConversationStates.ATTENDING,
ConversationPhrases.NO_MESSAGES,
new QuestNotActiveCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"Very well.",
null);
add(ConversationStates.ATTENDING,
ConversationPhrases.NO_MESSAGES,
new QuestActiveCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"Hm, I do not understand you. If you wish to #leave, just say",
null);
add(ConversationStates.ATTENDING,
"leave",
new QuestNotActiveCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"Leave where?",
null);
add(ConversationStates.ATTENDING,
"leave",
new QuestActiveCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"Thank you for using the Wizard's Bank",
// we used to use teleportAway() here
new MultipleActions(
new TeleportAction(ZONE_NAME, 15, 16, Direction.DOWN),
new SetQuestAction(QUEST_SLOT, "done"),
new ChatAction() {
public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
SingletonRepository.getTurnNotifier().dontNotify(new Timer(player));
}}));