Examples of say()


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

            npc.say("I will fuse 40 mithril thread for you. Please come back in "
                + TimeUtil.approxTimeUntil((int) (REQUIRED_HOURS_MITHRIL_THREAD * MathHelper.MILLISECONDS_IN_ONE_HOUR / 1000L))
                + ".");
            player.notifyWorldAboutChanges();
          } else {
            npc.say("For 40 spools of mithril thread to make your cloak, I need 40 spools of #silk #thread, 7 #mithril #nuggets and a #balloon.");
          }
        }
      });

    // player returns while fabric is still being woven, or is ready
View Full Code Here

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

            final String[] order = orderString.split(";");
            final long delay = REQUIRED_HOURS_MITHRIL_THREAD * MathHelper.MILLISECONDS_IN_ONE_HOUR;
            final long timeRemaining = (Long.parseLong(order[1]) + delay)
              - System.currentTimeMillis();
            if (timeRemaining > 0L) {
              npc.say("Welcome. I'm still working on your request to fuse mithril thread"
                  + " for you. Come back in "
                  + TimeUtil.approxTimeUntil((int) (timeRemaining / 1000L)) + ".");
            } else {
              final StackableItem products = (StackableItem) SingletonRepository.
                    getEntityManager().getItem("mithril thread");
View Full Code Here

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

 
              products.setQuantity(40);
           
              products.setBoundTo(player.getName());
              player.equipOrPutOnGround(products);
              npc.say("Hello again. The magic is completed. Here you have your 40 spools of mithril thread. Now, you must go to #Whiggins to get the #fabric made.");
              player.setQuest(mithrilcloak.getQuestSlot(), "got_mithril_thread");
              // give some XP as a little bonus for industrious workers
              player.addXP(100);
              player.notifyWorldAboutChanges()
          }
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) {
          if (player.isEquipped("mithril thread", 40)) {
           
              player.drop("mithril thread", 40);
              npc.say("Lovely. In "
                     + REQUIRED_HOURS_FABRIC + " hours your fabric will be ready.");
              player.setQuest(mithrilcloak.getQuestSlot(), "weavingfabric;" + System.currentTimeMillis());
              player.notifyWorldAboutChanges();
            } else {
              npc.say("You don't appear to have 40 spools of mithril thread with you. Sorry, I can't do anything without it.");
View Full Code Here

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

              npc.say("Lovely. In "
                     + REQUIRED_HOURS_FABRIC + " hours your fabric will be ready.");
              player.setQuest(mithrilcloak.getQuestSlot(), "weavingfabric;" + System.currentTimeMillis());
              player.notifyWorldAboutChanges();
            } else {
              npc.say("You don't appear to have 40 spools of mithril thread with you. Sorry, I can't do anything without it.");
            }
        }
      });

    // player says they didn't bring the stuff yet
View Full Code Here

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

          final String[] tokens = player.getQuest(mithrilcloak.getQuestSlot()).split(";");
          final long delay = REQUIRED_HOURS_FABRIC * MathHelper.MILLISECONDS_IN_ONE_HOUR;
          final long timeRemaining = (Long.parseLong(tokens[1]) + delay)
              - System.currentTimeMillis();
          if (timeRemaining > 0L) {
            npc.say("I'm sorry, you're too early. Come back in "
              + TimeUtil.approxTimeUntil((int) (timeRemaining / 1000L)) + ".");
            return;
          }
          npc.say("Here your fabric is ready! Isn't it gorgeous?");
          player.addXP(100);
View Full Code Here

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

          if (timeRemaining > 0L) {
            npc.say("I'm sorry, you're too early. Come back in "
              + TimeUtil.approxTimeUntil((int) (timeRemaining / 1000L)) + ".");
            return;
          }
          npc.say("Here your fabric is ready! Isn't it gorgeous?");
          player.addXP(100);
          player.addKarma(15);
          final Item fabric = SingletonRepository.getEntityManager().getItem(
                  mithrilcloak.getFabricName());
          fabric.setBoundTo(player.getName());
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) {
          if (player.isEquipped("mithril bar")) {
            player.drop("mithril bar");
              npc.say("What a lovely piece of mithril that is, even if I do say so myself ... Good, please come back in "
                     + REQUIRED_MINUTES_CLASP + " minutes and hopefully your clasp will be ready!");
              player.setQuest(mithrilcloak.getQuestSlot(), "forgingclasp;" + System.currentTimeMillis());
              player.notifyWorldAboutChanges();
            } else {
              npc.say("You can't fool an old wizard, and I'd know mithril when I see it. Come back when you have at least one bar.");
View Full Code Here

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

              npc.say("What a lovely piece of mithril that is, even if I do say so myself ... Good, please come back in "
                     + REQUIRED_MINUTES_CLASP + " minutes and hopefully your clasp will be ready!");
              player.setQuest(mithrilcloak.getQuestSlot(), "forgingclasp;" + System.currentTimeMillis());
              player.notifyWorldAboutChanges();
            } else {
              npc.say("You can't fool an old wizard, and I'd know mithril when I see it. Come back when you have at least one bar.");
            }
        }
      });

    // player says they don't have any mithril yet
View Full Code Here

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

          // minutes -> milliseconds
          final long delay = REQUIRED_MINUTES_CLASP * MathHelper.MILLISECONDS_IN_ONE_MINUTE;
          final long timeRemaining = (Long.parseLong(tokens[1]) + delay)
              - System.currentTimeMillis();
          if (timeRemaining > 0L) {
            npc.say("I haven't finished yet, please return in "
              + TimeUtil.approxTimeUntil((int) (timeRemaining / 1000L)) + ".");
            return;
          }
          npc.say("Here, your clasp is ready!");
          player.addXP(100);
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.