Examples of say()


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

                        final int required = (sentence.getNumeral().getAmount());
            if (player.drop("disease poison", required * REQUIRED_POISONS)) {
              npc.say("Ok, here's your " + Integer.toString(required) + " eggshells. Enjoy!");
              new EquipItemAction("magical eggshells", required, true).fire(player, sentence, npc);
            } else {
              npc.say("Ok, ask me again when you have " + Integer.toString(required * REQUIRED_POISONS) + " disease poisons with you.");
            }           
          }
        });

    // didn't want eggshells yet
View Full Code Here

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

                  if (questslot.length > 2) {
                    // if the split worked, we had stored a needle number before and we need to store it again
                    int needles = Integer.parseInt(questslot[1]);
                    int saidjoke = Integer.parseInt(questslot[2]);
                    if (i == saidjoke) {
                      npc.say("You told me that joke last time, come back with a new one! Bye.");
                      npc.setCurrentState(ConversationStates.IDLE);
//                      // stop looking through the joke list
                      return;
                    } else {
                      player.setQuest(mithrilcloak.getQuestSlot(), "told_joke;" + Integer.toString(needles) + ";" + Integer.toString(i));
View Full Code Here

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

                  } else {
                    player.setQuest(mithrilcloak.getQuestSlot(), "told_joke;" + Integer.toString(i));
                  }
                  // this might have been his favourite joke, which is determined randomly
                  if (Rand.randUniform(1, 8) == i) {
                    npc.say("That's the funniest joke I ever heard! I think it's my favourite of the moment. Here, have your needle for free... and then get out of here, You've been here far too long already.");
                    new EquipItemAction("magical needle", 1, true).fire(player, sentence, npc);
                    npc.setCurrentState(ConversationStates.IDLE);
//                    // stop looking through the joke list
                    return;
                  } else {
View Full Code Here

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

                    new EquipItemAction("magical needle", 1, true).fire(player, sentence, npc);
                    npc.setCurrentState(ConversationStates.IDLE);
//                    // stop looking through the joke list
                    return;
                  } else {
                    npc.say("*guffaws* Alright, lets get on with business. A magical needle costs "
                      + Integer.toString(NEEDLE_COST) + " pieces of money. Do you want to buy one now?");
                    // stop looking through the joke list
                    npc.setCurrentState(ConversationStates.QUEST_ITEM_QUESTION);
                    return;
                   }
View Full Code Here

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

                    return;
                   }
                }
              }
              if (ConversationPhrases.GOODBYE_MESSAGES.contains(sentence.getTriggerExpression().getNormalized())) {
                  npc.say("Ok, bye then.");
                  npc.setCurrentState(ConversationStates.IDLE);
              } else if (sentence.getTriggerExpression().getNormalized().equals("none")) {
                npc.say("Ok, bye.");
                npc.setCurrentState(ConversationStates.IDLE);
              } else {
View Full Code Here

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

              }
              if (ConversationPhrases.GOODBYE_MESSAGES.contains(sentence.getTriggerExpression().getNormalized())) {
                  npc.say("Ok, bye then.");
                  npc.setCurrentState(ConversationStates.IDLE);
              } else if (sentence.getTriggerExpression().getNormalized().equals("none")) {
                npc.say("Ok, bye.");
                npc.setCurrentState(ConversationStates.IDLE);
              } else {
                npc.say("Sorry, that joke just isn't funny. go back to Nalwor library and get another.");
                npc.setCurrentState(ConversationStates.IDLE);
              }
View Full Code Here

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

                  npc.setCurrentState(ConversationStates.IDLE);
              } else if (sentence.getTriggerExpression().getNormalized().equals("none")) {
                npc.say("Ok, bye.");
                npc.setCurrentState(ConversationStates.IDLE);
              } else {
                npc.say("Sorry, that joke just isn't funny. go back to Nalwor library and get another.");
                npc.setCurrentState(ConversationStates.IDLE);
              }
      }
    });
   
View Full Code Here

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

              int saidjoke = 1;
              if (questslot.length > 2) {
                // if the split works, we had stored a needle number before
                needles = Integer.parseInt(questslot[1]);
                saidjoke = Integer.parseInt(questslot[2]);
                npc.say("I'm really sorry about the previous needle breaking. I'll start work again on your cloak,"
                    + " please return in another " + REQUIRED_HOURS_SEWING + " hours.");
               } else if (questslot.length > 1) {
                // it wasn't split with a needle number, only joke
                // so this is the first time we brought a needle
                saidjoke = Integer.parseInt(questslot[1]);
View Full Code Here

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

                    + " please return in another " + REQUIRED_HOURS_SEWING + " hours.");
               } else if (questslot.length > 1) {
                // it wasn't split with a needle number, only joke
                // so this is the first time we brought a needle
                saidjoke = Integer.parseInt(questslot[1]);
                npc.say("Looks like you found Ritatty then, good. I'll start on the cloak now!"
                    + " A seamstress needs to take her time, so return in " + REQUIRED_HOURS_SEWING + " hours.");
                // ida breaks needles - she will need 1 - 3
                needles = Rand.randUniform(1, 3);
              }
              player.setQuest(mithrilcloak.getQuestSlot(), "sewing;" + System.currentTimeMillis() + ";" + needles + ";" + saidjoke);
View Full Code Here

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

              // hours -> milliseconds
              final long delay = REQUIRED_HOURS_SEWING * MathHelper.MILLISECONDS_IN_ONE_HOUR;
              final long timeRemaining = (Long.parseLong(tokens[1]) + delay)
                - System.currentTimeMillis();
              if (timeRemaining > 0L) {
                npc.say("I'm still sewing your cloak, come back in "
                    + TimeUtil.approxTimeUntil((int) (timeRemaining / 1000L)) + " - and don't rush me, or I'm more likely to break the needle.");
                return;
              }
              // ida breaks needles, but if it is the last one,
              // she pricks her finger on that needle
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.