+ "it will dissipate. You should not try to leave and return more than once. To enter, just pay the #fee.");
addGoodbye("Bye.");
add(ConversationStates.ANY,
"fee",
new AndCondition(new LevelGreaterThanCondition(MIN_LEVEL - 1),
new TimePassedCondition(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS)),
ConversationStates.QUEST_OFFERED,
null,
new ChatAction() {
public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
npc.say("The fee is your current level, multiplied by " + COST_FACTOR + " and payable in cash. At your level of "
+ player.getLevel() + " the fee is " + COST_FACTOR * player.getLevel() + " money. Do you want to fight?");
}
});
// player meets conditions, first remind them of the dangers and wait for a 'yes'
add(ConversationStates.ANY,
Arrays.asList("challenge", "fight", "battle"),
new AndCondition(new LevelGreaterThanCondition(MIN_LEVEL - 1),
new TimePassedCondition(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS)),
ConversationStates.QUEST_OFFERED,
"I accept your challenge. If you can pay the #fee, I will summon an island with " + NUMBER_OF_CREATURES
+ " dangerous creatures for you to face. So, are you sure you want to enter the adventure island?",
null);
// player returns within DAYS_BEFORE_REPEAT days, and his island has expired
add(ConversationStates.ANY,
Arrays.asList("challenge", "fight", "battle", "fee"),
new AndCondition(
new NotCondition(new TimePassedCondition(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS)),
new NotCondition(new AdventureZoneExistsCondition())
),
ConversationStates.ATTENDING,
null,
new SayTimeRemainingAction(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS, "Your life force will not support the island so soon after you last visited. You will be ready again in"));
// player returns within DAYS_BEFORE_REPEAT days, if the zone still exists that he was in before, send him straight up.
add(ConversationStates.ANY,
Arrays.asList("challenge", "fight", "battle", "fee"),
new AndCondition(
new NotCondition(new TimePassedCondition(QUEST_SLOT, DAYS_BEFORE_REPEAT * MINUTES_IN_DAYS)),
new AdventureZoneExistsCondition()
),
ConversationStates.QUESTION_1,
"The island which I recently summoned for you, remains for you to visit at no extra cost. Do you wish to return to it?",
null);