/* $Id: DiverNPC.java,v 1.12 2011/02/16 00:06:02 bluelads99 Exp $ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.athor.holiday_area;
import games.stendhal.server.core.config.ZoneConfigurator;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.pathfinder.FixedPath;
import games.stendhal.server.core.pathfinder.Node;
import games.stendhal.server.entity.npc.ConversationPhrases;
import games.stendhal.server.entity.npc.ConversationStates;
import games.stendhal.server.entity.npc.SpeakerNPC;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public class DiverNPC implements ZoneConfigurator {
public void configureZone(StendhalRPZone zone,
Map<String, String> attributes) {
buildNPC(zone);
}
private void buildNPC(StendhalRPZone zone) {
final SpeakerNPC npc = new SpeakerNPC("Dorinel") {
@Override
protected void createPath() {
final List<Node> nodes = new LinkedList<Node>();
nodes.add(new Node(36,21));
nodes.add(new Node(36,28));
setPath(new FixedPath(nodes, true));
}
@Override
public void createDialog() {
addGreeting("Hallo, my friend!");
add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES, null,
ConversationStates.ATTENDING, "No, thank you, I do not need help!", null);
addJob("I am a diver, but I cannot see a single fish at the moment!");
addHelp("I like the swimsuits which you can get in the dressing rooms at the beach.");
addGoodbye("Bye!");
}
};
npc.setPosition(36, 28);
npc.setEntityClass("swimmer2npc");
npc.setDescription ("You see Dorinel who enjoys the sun.");
zone.add(npc);
}
}