Package games.stendhal.server.entity.npc

Examples of games.stendhal.server.entity.npc.SpeakerNPC.say()


                npc.say("Thank you for rescuing this " + petName + ", I will take good care of it. Remember you can come back "
                + "and visit the pet sanctuary any time you like!");
                notifyWorldAboutChanges();
              } else {
                // there was no room for the pet
                npc.say("It looks like we don't have any space left in our pet sanctuary! I hope you can look after this " + petName + " a little longer.")
              }
            }
          });

        add(ConversationStates.SERVICE_OFFERED,
View Full Code Here


                      final Thread thread = new Thread(access);
                      thread.setPriority(Thread.MIN_PRIORITY);
                      thread.setDaemon(true);
                      thread.start();
                      SingletonRepository.getTurnNotifier().notifyInTurns(10, new WikipediaWaiter((SpeakerNPC) npc.getEntity(), access));
                      npc.say("Please wait, while I am looking it up in the book called #Wikipedia!");
                    } else {
                    npc.say("What do you want to be explained?");
                      return;
                    }
                  }
View Full Code Here

                      thread.setDaemon(true);
                      thread.start();
                      SingletonRepository.getTurnNotifier().notifyInTurns(10, new WikipediaWaiter((SpeakerNPC) npc.getEntity(), access));
                      npc.say("Please wait, while I am looking it up in the book called #Wikipedia!");
                    } else {
                    npc.say("What do you want to be explained?");
                      return;
                    }
                  }
                });
        addReply("wikipedia",
View Full Code Here

        null,
        ConversationStates.ATTENDING,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            npc.say(ferrystate.toString());
          }
        });

    add(ConversationStates.ATTENDING,
        "board",
View Full Code Here

        ConversationStates.ATTENDING,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            if (ferrystate == Status.ANCHORED_AT_MAINLAND) {
              npc.say("In order to board the ferry, you have to pay " + AthorFerry.PRICE
            + " gold. Do you want to pay?");
              npc.setCurrentState(ConversationStates.SERVICE_OFFERED);
            } else {
              npc.say(ferrystate.toString()
                + " You can only board the ferry when it's anchored at the mainland.");
View Full Code Here

            if (ferrystate == Status.ANCHORED_AT_MAINLAND) {
              npc.say("In order to board the ferry, you have to pay " + AthorFerry.PRICE
            + " gold. Do you want to pay?");
              npc.setCurrentState(ConversationStates.SERVICE_OFFERED);
            } else {
              npc.say(ferrystate.toString()
                + " You can only board the ferry when it's anchored at the mainland.");
            }
          }
        });
View Full Code Here

          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            if (player.drop("money", AthorFerry.PRICE)) {
              player.teleport(getShipZone(), 27, 33, Direction.LEFT, null);

            } else {
              npc.say("Hey! You don't have enough money!");
            }
          }
        });

    add(ConversationStates.SERVICE_OFFERED,
View Full Code Here

      new AthorFerry.FerryListener() {
        public void onNewFerryState(final Status status) {
          ferrystate = status;
          switch (status) {
          case ANCHORED_AT_MAINLAND:
            npc.say("Attention: The ferry has arrived at this coast! You can now #board the ship.");
            break;
          case DRIVING_TO_ISLAND:
            npc.say("Attention: The ferry has taken off. You can no longer board it.");
            break;
          default:
View Full Code Here

          switch (status) {
          case ANCHORED_AT_MAINLAND:
            npc.say("Attention: The ferry has arrived at this coast! You can now #board the ship.");
            break;
          case DRIVING_TO_ISLAND:
            npc.say("Attention: The ferry has taken off. You can no longer board it.");
            break;
          default:
            break;
          }
        }
View Full Code Here

              null,
              new ChatAction() {
              public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
                final Item item =  SingletonRepository.getEntityManager().getItem(itemName);
                if (item == null) {
                  npc.say("Sorry, something went wrong. Could you say correctly the item, please?");
                } else {
                  player.equipOrPutOnGround(item);
                  player.setQuest(QUEST_SLOT, itemName);
                  npc.say("Here you are! Don't forget to #return it or you have to pay!");
                }
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.