Package games.stendhal.server.maps.orril.river

Source Code of games.stendhal.server.maps.orril.river.CampingGirlNPC

/* $Id: CampingGirlNPC.java,v 1.16 2010/09/19 02:30:48 nhnb 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.orril.river;

import games.stendhal.common.Direction;
import games.stendhal.server.core.config.ZoneConfigurator;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.entity.npc.SpeakerNPC;

import java.util.Map;

/**
* Configure Orril River South Campfire (Outside/Level 0).
*/
public class CampingGirlNPC implements ZoneConfigurator {
  /**
   * Configure a zone.
   *
   * @param  zone    The zone to be configured.
   * @param  attributes  Configuration attributes.
   */
  public void configureZone(final StendhalRPZone zone, final Map<String, String> attributes) {
    buildCampfireArea(zone);
  }

  private void buildCampfireArea(final StendhalRPZone zone) {
    final SpeakerNPC sally = new SpeakerNPC("Sally") {

      @Override
      protected void createPath() {
        // NPC does not move
        setPath(null);
      }

      @Override
      protected void createDialog() {
        //addGreeting();
        addJob("Work? I'm just a little girl! I'm a scout, you know.");
        addHelp("You can find lots of useful stuff in the forest; wood and mushrooms, for example. But beware, some mushrooms are poisonous!");
        addGoodbye();
        // remaining behaviour is defined in maps.quests.Campfire.       
      }
    };

    sally.setEntityClass("littlegirlnpc");
    sally.setPosition(40, 61);
    sally.setDirection(Direction.RIGHT);
    sally.initHP(100);
    sally.setDescription("You see Sally. She is the daughter of Leander, the Semos baker and currently camping near the river.");
    zone.add(sally);
  }
}
TOP

Related Classes of games.stendhal.server.maps.orril.river.CampingGirlNPC

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.