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

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


    return "ZooFood";
  }
 
  @Override
  public boolean isRepeatable(final Player player) {
    return  new AndCondition(new QuestCompletedCondition(QUEST_SLOT),
             new TimePassedCondition(QUEST_SLOT,1,DELAY)).fire(player, null, null);
  }
View Full Code Here


        "I need some help to escape from this prison. These ugly Amazonesses! Can you help me please?",
        null);
             
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Thank you for your help! Now I can escape!",
        null);
   
View Full Code Here

        "Ok, well I have to be a bit more patient then. Just let me know if I can #help you somehow instead.", null);

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Thank you so much! I can sleep safely and calm again now! You rescued me!", null);
  }
View Full Code Here

    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,
        "Do you think you could find my children again?",
        null);

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestActiveCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Why must my children stay out so long? Please find them and tell me who is ok.",
        null);

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        "Thank you! I feel better now knowing my kids are safe.",
        null);

    npc.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

      "Make revenge! #Kill Mountain Orc Chief!",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Saman has revenged! dis Good!",
      null);

View Full Code Here

        "I am mournful, because Mr Yeti turns away from me. I need a special potion to make him happy and some present to please him. Will you help?",
        null);
             
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Thank you for your help! Now Mr Yeti and I are very happy again.",
        null);
   
View Full Code Here

      "I'm a telepath and a telekinetic; I can help you by sharing my mental skills with you. Do you want me to teach you the six basic elements of telepathy? I already know the answer but I'm being polite...",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.HELP_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Do you want to repeat the six basic elements of telepathy? I already know the answer but I'm being polite...",
      null);

    npc.add(
      ConversationStates.ATTENDING,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_1,
      "Type #/who to ascertain the names of those adventurers who are currently present in the world of Stendhal. Do you want to learn the second basic element of telepathy?",
      null);

    npc.add(
      ConversationStates.INFORMATION_1,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_2,
      "Type #/where #username to discern where in Stendhal that person is currently roaming; you can use #'/where sheep' to keep track of any sheep you might own. To understand the system used for defining positions in Stendhal, try asking #Zynn; he knows more about it than I do. Ready for the third lesson?",
      null);

    npc.add(
      ConversationStates.INFORMATION_2,
      "Zynn",
      null,
      ConversationStates.INFORMATION_2,
      "His full name is Zynn Iwuhos. He spends most of his time in the library, making maps and writing historical record books. Ready for the next lesson?",
      null);

    npc.add(
      ConversationStates.INFORMATION_2,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_3,
      "Type #'/tell username message' or #'/msg username message' to talk to anybody you wish, no matter where in Stendhal that person is.  You can type #'// response' to continue talking to the last person you send a message to. Ready to learn my fourth tip?",
      null);

    npc.add(
      ConversationStates.INFORMATION_3,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_4,
      "Press #Shift+Up at the same time to recall things you previously said, in case you need to repeat yourself. Okay, shall we move on to the fifth lesson?",
      null);

    npc.add(
      ConversationStates.INFORMATION_4,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_5,
      "Type #/support #<message> to report a problem. You can also try the IRC channel ##arianne on #'irc.freenode.net'. There is a web frontend at #http://stendhalgame.org/development/chat.html \nOkay, time for your last lesson in mental manipulation!",
      null);

    npc.add(
      ConversationStates.INFORMATION_5,
      ConversationPhrases.YES_MESSAGES,
      null,
      ConversationStates.INFORMATION_6,
      "You can travel to the astral plane at any time, thereby saving and closing your game. Just type #/quit, or press the #Esc key, or even simply close the window. Okay! Hmm, I think you want to learn how to float in the air like I do.",
      null);

    /** Give the reward to the patient newcomer user */
    final String answer = "*yawns* Maybe I'll show you later... I don't want to overload you with too much information at once. You can get a summary of all those lessons at any time, incidentally, just by typing #/help.\n";
    npc.add(ConversationStates.INFORMATION_6,
      ConversationPhrases.YES_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.IDLE,
      answer + "Hey! I know what you're thinking, and I don't like it!",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
View Full Code Here

        // has been here before
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(super.getName()),
                new QuestCompletedCondition(GRAFINDLE_QUEST_SLOT),
                new QuestCompletedCondition(ZARA_QUEST_SLOT),
                new QuestCompletedCondition(QUEST_SLOT)),
              ConversationStates.ATTENDING,
              null,
              new SayTextWithPlayerNameAction("Welcome to the Wizard's Bank, [name]. Do you wish to pay to access your chest again?"));

        // never started quest
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(super.getName()),
                new QuestCompletedCondition(GRAFINDLE_QUEST_SLOT),
                new QuestCompletedCondition(ZARA_QUEST_SLOT),
                new QuestNotStartedCondition(QUEST_SLOT)),
              ConversationStates.ATTENDING,
              null,
              new SayTextWithPlayerNameAction("Welcome to the Wizard's Bank, [name]."));
       
        // currently in bank
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(super.getName()),
                new QuestCompletedCondition(GRAFINDLE_QUEST_SLOT),
                new QuestCompletedCondition(ZARA_QUEST_SLOT),
                new QuestActiveCondition(QUEST_SLOT)),
              ConversationStates.ATTENDING,
              null,
              new SayTextWithPlayerNameAction("Welcome to the Wizard's Bank, [name]. You may #leave sooner, if required."));
       
View Full Code Here

        null);

    // response to wedding ring enquiry when you're already married
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("wedding ring", "wedding"),
        new AndCondition(new QuestCompletedCondition(marriage.getQuestSlot()), new PlayerHasItemWithHimCondition("wedding ring")),
        ConversationStates.ATTENDING,
        "I hope you're still happily married! If you are having trouble and want a divorce, speak to the clerk in Ados Town Hall.",
        null);

    // response to wedding ring enquiry when you're already married and not wearing ring
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("wedding ring", "wedding"),
        new AndCondition(new QuestCompletedCondition(marriage.getQuestSlot()), new NotCondition(new PlayerHasItemWithHimCondition("wedding ring"))),
        ConversationStates.QUEST_ITEM_QUESTION,
        "Uh oh! You haven't got your wedding ring on! I can forge you another for " + REQUIRED_GOLD
                  + " gold bars and a fee of "
                  + REQUIRED_MONEY
                  + " money, do you want another?",
View Full Code Here

      null);

    npc.add(
      ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Thank you very much for the armor, but I don't have any other task for you.",
      null);

    // player is willing to help
View Full Code Here

TOP

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

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.