Examples of say()


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

                return;
              }
              // ida breaks needles, but if it is the last one,
              // she pricks her finger on that needle
              if (Integer.valueOf(tokens[2]) == 1) {
                npc.say("Ouch! I pricked my finger on that needle! I feel woozy ...");
                player.setQuest(mithrilcloak.getQuestSlot(), "twilight_zone");
              } else {
                npc.say("These magical needles are so fragile, I'm sorry but you're going to have to get me another, the last one broke. Hopefully Ritati still has plenty.");
                final int needles = Integer.parseInt(tokens[2]) - 1;
                int saidjoke = Integer.parseInt(tokens[3]);
View Full Code Here

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

              // she pricks her finger on that needle
              if (Integer.valueOf(tokens[2]) == 1) {
                npc.say("Ouch! I pricked my finger on that needle! I feel woozy ...");
                player.setQuest(mithrilcloak.getQuestSlot(), "twilight_zone");
              } else {
                npc.say("These magical needles are so fragile, I'm sorry but you're going to have to get me another, the last one broke. Hopefully Ritati still has plenty.");
                final int needles = Integer.parseInt(tokens[2]) - 1;
                int saidjoke = Integer.parseInt(tokens[3]);
                player.setQuest(mithrilcloak.getQuestSlot(), "need_needle;" + needles + ";" + saidjoke);
              }             
        }
View Full Code Here

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

              public void fire(final Player player,
                  final Sentence sentence,
                  final EventRaiser npc) {
                int pieAmount = Rand.roll1D6() + 1;
                new EquipItemAction("fish pie", pieAmount, true).fire(player, sentence, npc);
                npc.say("Thank you!! Take " +
                    Grammar.thisthese(pieAmount) + " " +
                    Grammar.quantityplnoun(pieAmount, "fish pie", "") +
                    " from my cook, and this kiss, from me.");
                new SetQuestAndModifyKarmaAction(getSlotName(), "drinking;"
                                 + System.currentTimeMillis(), 15.0).fire(player, sentence, npc);
View Full Code Here

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

        if (Rand.throwCoin() == 1) {
          rewardClass = "meat";
        } else {
          rewardClass = "ham";
        }
        npc.say("Thank you! Here, take some " + rewardClass + "!");
        final StackableItem reward = (StackableItem) SingletonRepository.getEntityManager().getItem(rewardClass);
        reward.setQuantity(REQUIRED_WOOD);
        player.equipOrPutOnGround(reward);
        player.notifyWorldAboutChanges();
      }
View Full Code Here

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

        new QuestInStateCondition(QUEST_SLOT, 0, "start"),
        ConversationStates.ATTENDING,
        null,
        new ChatAction() {
            public void fire(Player player, Sentence sentence, EventRaiser npc) {
              npc.say(enemyForces.get(player.getQuest(QUEST_SLOT, 1)).second());
            }
        });

    // explanations
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

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

        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {

                        final int required = (sentence.getNumeral().getAmount());
            if (player.drop("money" , required * MOSS_COST)) {
              npc.say("Ok, here's your " + Integer.toString(required) + " pieces of twilight moss. Don't take too much at once.");
              new EquipItemAction("twilight moss", required, true).fire(player, sentence, npc);
            } else {
              npc.say("Ok, ask me again when you have enough money.");
            }           
          }
View Full Code Here

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

                        final int required = (sentence.getNumeral().getAmount());
            if (player.drop("money" , required * MOSS_COST)) {
              npc.say("Ok, here's your " + Integer.toString(required) + " pieces of twilight moss. Don't take too much at once.");
              new EquipItemAction("twilight moss", required, true).fire(player, sentence, npc);
            } else {
              npc.say("Ok, ask me again when you have enough money.");
            }           
          }
        });

    // they don't want moss yet
View Full Code Here

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

      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING, null,
      new ChatAction() {
        public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
          final String food = player.getQuest(QUEST_SLOT);
          npc.say("Thank you! I hope it doesn't take too long to collect. Don't forget to say '"
            + food + "' when you have it.");
          // player.setQuest(QUEST_SLOT, food);
          player.addKarma(5.0);
          // set food to null?
        }
View Full Code Here

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

        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            final String food = Rand.rand(FOOD_LIST);
            player.setQuest(QUEST_SLOT, food);
            npc.say("If you could get me " + REQUIRED_FOOD
                + " pieces of " + food
                + ", I'd be in your debt. Will you help me?");
          }
        });
  }
View Full Code Here

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

    for(final String itemName : FOOD_LIST) {
      final List<ChatAction> reward = new LinkedList<ChatAction>();
      reward.add(new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            if (player.drop(itemName, REQUIRED_FOOD)) {
              npc.say("Great! You brought the " + itemName + "!");
            }
          } });
      reward.add(new IncreaseXPAction(1000));
      reward.add(new IncreaseKarmaAction(35.0));
      reward.add(new SetQuestAction(QUEST_SLOT, "food_brought"));
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.