Package games.stendhal.server.entity.npc

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


                  } 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

                    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

                    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

              }
              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

                  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

              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

                    + " 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

              // 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

                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

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.