"Are you a hero? Make the #challenge if you are sure you want to join the deathmatch.", null);
npc2.add(ConversationStates.ATTENDING, "challenge",
new AndCondition(new LevelGreaterThanCondition(19),
new DeathMatchEmptyCondition(),
new NotCondition(new PlayerHasPetOrSheepCondition())),
ConversationStates.IDLE, null,
new TeleportAction("0_ados_wall_n", 100, 86, Direction.DOWN));
npc2.add(ConversationStates.ATTENDING, "challenge",
new AndCondition(new LevelGreaterThanCondition(19),
new NotCondition(new DeathMatchEmptyCondition()),
new NotCondition(new PlayerHasPetOrSheepCondition())),
ConversationStates.QUESTION_1, null,
new ChatAction() {
public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
final List<Player> dmplayers = arena.getPlayers();
final List<String> dmplayernames = new LinkedList<String>();
for (Player dmplayer : dmplayers) {
dmplayernames.add(dmplayer.getName());
}
// List the players inside deathmatch
npc.say("There are heroes battling right now in the deathmatch, so it may be dangerous there. Do you want to join "
+ Grammar.enumerateCollection(dmplayernames) + "?");
}
});
npc2.add(ConversationStates.ATTENDING, "challenge",
new AndCondition(new LevelGreaterThanCondition(19),
new PlayerHasPetOrSheepCondition()),
ConversationStates.ATTENDING, "Sorry, but it would be too scary for your pet in there.",
null);
npc2.add(ConversationStates.QUESTION_1, ConversationPhrases.YES_MESSAGES, null,