Package games.stendhal.server.entity.npc.condition

Examples of games.stendhal.server.entity.npc.condition.GreetingMatchesNameCondition


  private void hayunn() {
    final SpeakerNPC npc = npcs.get("Hayunn Naratha");
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new GreetingMatchesNameCondition(npc.getName()),
      ConversationStates.ATTENDING,
      "Greetings. I'm ashamed to address you while I look #unwell. It's not fitting for my post.",
      null);

    npc.addReply(
View Full Code Here


    final SpeakerNPC npc = npcs.get("Monogenes");

    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new GreetingMatchesNameCondition(npc.getName()),
      ConversationStates.ATTENDING,
      "Hi. *cough* *splutter* The smoke is getting into my lungs. The #fire is spreading.",
      null);

    npc.addReply(
View Full Code Here

    final SpeakerNPC npc = npcs.get("Nomyr Ahba");

    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new GreetingMatchesNameCondition(npc.getName()),
      ConversationStates.ATTENDING,
      "Hi. I'm guessing you knew to come to an old gossip, for #information.",
      null);

    npc.addReply(
View Full Code Here

   */
  private void sato() {
    final SpeakerNPC npc = npcs.get("Sato");

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new GreetingMatchesNameCondition(npc.getName()),
      ConversationStates.ATTENDING,
      "Hi. We've fallen on hard #times.", null);

    npc.addReply("times",
      "All I know is, my sheep are getting sick. Maybe #Carmen can sense what is happening here.");
View Full Code Here

            // player before and react accordingly
            // NPC_name quest doesn't exist anywhere else neither is
            // used for any other purpose
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotCompletedCondition("Zynn")),
            ConversationStates.INFORMATION_1,
            "Hi, potential reader! Here you can find records of the history of Semos, and lots of interesting facts about this island of Faiumoni. If you like, I can give you a quick introduction to its #geography and #history! I also keep up with the #news, so feel free to ask me about that.",
            new SetQuestAction("Zynn", "done"));
       
View Full Code Here

    final SpeakerNPC npc = getNPC();

    // player says hi before starting the quest
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition("weapons_collector"),
            new QuestNotStartedCondition(QUEST_SLOT)),
          ConversationStates.ATTENDING,
          "Greetings, old friend. If you are willing, I have another #quest for you.",
          null);
View Full Code Here

  }

  private void playerReturnsWhileQuestIsActive(final SpeakerNPC npc) {
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestActiveCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Welcome back. I hope you have come to help me with my latest #list of weapons.",
        null);
  }
View Full Code Here

    // player says hi before starting the quest
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotStartedCondition(QUEST_SLOT)),
      ConversationStates.INFORMATION_1,
      "Hello, stranger. You look weary from your travels. I know what would #revive you.",
      null);

    // player returns after finishing the quest (it is repeatable) after the
    // time as finished
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestCompletedCondition(QUEST_SLOT),
          new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES)),
      ConversationStates.QUEST_OFFERED,
      "Hello again. Have you returned for more of my special soup?",
      null);

    // player returns after finishing the quest (it is repeatable) before
    // the time as finished
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition(QUEST_SLOT),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES , "I hope you don't want more soup, because I haven't finished washing the dishes. Please check back in")
View Full Code Here

    // player returns while quest is still active
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestStartedCondition(QUEST_SLOT),
          new NotCondition(new QuestStateStartsWithCondition(QUEST_SLOT, "done"))),
      ConversationStates.QUESTION_1,
      "Welcome back! I hope you collected some #ingredients for the soup, or #everything.",
      null);
View Full Code Here

      @Override
        protected void createDialog() {
          add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new GreetingMatchesNameCondition(getName()), true,
            ConversationStates.IDLE,
            null,
            new ChatAction() {
              public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
                if (!player.hasQuest("find_ghosts")) {
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.condition.GreetingMatchesNameCondition

Copyright © 2018 www.massapicom. 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.