Examples of NPCList


Examples of games.stendhal.server.entity.npc.NPCList

    playersRmText.clear();
  }

  protected void executeNPCsPreLogic() {
    // SpeakerNPC logic
    final NPCList npcList = SingletonRepository.getNPCList();
    final Set<String> npcs = npcList.getNPCs();
    for (final String npc : npcs) {
      npcList.get(npc).preLogic();
    }
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.NPCList

  public NPCNameValidator(final String parameterValue) {
    this.parameterValue = parameterValue;
  }

  public Result validate() {
    final NPCList npcs = SingletonRepository.getNPCList();
    for (final String name : npcs.getNPCs()) {
      if (name.equals(parameterValue)) {
        return Result.FAILED_RESERVED_NAME;
     
    }
    return null;
View Full Code Here

Examples of games.stendhal.server.entity.npc.NPCList

      protected void createDialog() {
        // boy says nothing at all
        // mother gets stressed
        addGreeting(null,new ChatAction(){
          public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
            final NPCList npcs = SingletonRepository.getNPCList();
            final SpeakerNPC npc = npcs.get("Anastasia");
            npc.say("Sh! Please don't wake him!");
            raiser.setCurrentState(ConversationStates.IDLE);
          }
        });
      }
View Full Code Here

Examples of games.stendhal.server.entity.npc.NPCList

  @Override
  public void execute(final Player admin, final List<String> args) {
    super.execute(admin, args);

    final StringBuilder res = new StringBuilder();
    final NPCList npcs = SingletonRepository.getNPCList();
    for (final String name : npcs.getNPCs()) {
      final SpeakerNPC npc = npcs.get(name);
      res.append("\r\n" + name + "\t is in ");
      res.append(npc.getZone().getName() + " at (");
      res.append(npc.getX() + ", " + npc.getY() + ")");
    }
    admin.sendPrivateText(res.toString());
View Full Code Here
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.