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

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


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

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition("weapons_collector"), new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.QUEST_2_OFFERED,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
              if (player.isQuestCompleted(QUEST_SLOT)) {
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")
      );

    // player responds to word 'revive'
    npc.add(ConversationStates.INFORMATION_1,
        "revive",
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        null,
        new ChatAction() {
        public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
          if (player.hasQuest(QUEST_SLOT) && player.isQuestCompleted(QUEST_SLOT)) {
View Full Code Here

    final SpeakerNPC npc = npcs.get("Xoderos");
   
    /** If quest is not started yet, start it. */
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES, new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING, "I'm worried about my brother who lives in Ados. I need someone to take some #food to him.",
      null);
   
    /** In case quest is completed */
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "My brother has enough food now, many thanks.", null);

    /** In case quest is completed */
    npc.add(ConversationStates.ATTENDING, "food",
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "My brother has enough sandwiches now, thank you.", null);

    /** If quest is not started yet, start it. */
    npc.add(
      ConversationStates.ATTENDING,
      "food",
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.QUEST_OFFERED,
      "I think five sandwiches would be enough. My brother is called #Joshua. Can you help?",
      null);

    npc.add(
View Full Code Here

      protected void createDialog() {
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(
                new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition("introduce_players"),
                new ChatCondition() {
                  public boolean fire(final Player player, final Sentence sentence, final Entity entity) {
                    return !player.isGhost();
                  }
                }),
View Full Code Here

       
        // first meeting with player
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition("meet_io")),
            ConversationStates.ATTENDING,
                null,
                new MultipleActions(
                    new SayTextWithPlayerNameAction("I awaited you, [name]. How do I know your name? Easy, I'm Io Flotto, the telepath. Do you want me to show you the six basic elements of telepathy?"),
                    new SetQuestAction("meet_io", "start")));
View Full Code Here

            // 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 QuestNotStartedCondition("meet_hackim")),
                ConversationStates.ATTENDING,
                "Hi stranger, I'm Hackim Easso, the blacksmith's assistant. Have you come here to buy weapons?",
                new SetQuestAction("meet_hackim","start"));
       
        addGreeting(null, new SayTextWithPlayerNameAction("Hi again, [name]. How can I #help you this time?"));
View Full Code Here

        actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, "rat", 0, 1));

        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition(QUEST_SLOT)),
            ConversationStates.ATTENDING,
                "Hi. I bet you've been sent here to learn about adventuring from me. First, lets see what you're made of. Go and kill a rat outside, you should be able to find one easily. Do you want to learn how to attack it, before you go?",
            new MultipleActions(actions));

           add(ConversationStates.IDLE,
View Full Code Here

    final SpeakerNPC npc = npcs.get("Xhiphin Zohos");
   
    // player asks about quest for first time (or rejected)
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.combine(ConversationPhrases.QUEST_MESSAGES, EXTRA_TRIGGER),
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I'm really thirsty, could you possibly get me some fresh water please?",
        null);
   
    // player can repeat quest
View Full Code Here

      "I have nothing to do for you. But thanks for asking",
      null);
    npc.add(
      ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
      ConversationStates.QUEST_OFFERED,
      "Those who had to stay at home because of their duties, have prepared a #paper #chase.",
      null);
    npc.add(
      ConversationStates.QUEST_OFFERED,
      Arrays.asList("paper", "chase"),
      new SystemPropertyCondition("stendhal.minetown"),
      ConversationStates.ATTENDING,
      "You must ask every person on the trail about the #paper #chase. First you must find the beer-loving author of KNOW HOW TO KILL CREATURES.",
      startAction);


    // add normal way points (without first and last)
    for (int i = 0; i < points.size() - 1; i++) {
      addTaskToNPC(i);
    }

    // Fidorea does the post processing of this quest
    npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
        new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
      ConversationStates.ATTENDING, "Oh, that is a nice #quest.", null);
    npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
      new AndCondition(
          new QuestStartedCondition(QUEST_SLOT),
          new QuestNotInStateCondition(QUEST_SLOT, 0, "Fidorea"),
View Full Code Here

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

        // Player has never done the zoo quest
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Welcome to the Ados Wildlife Refuge! We rescue animals from being slaughtered by evil adventurers. But we need help... maybe you could do a #task for us?",
        null
    );
View Full Code Here

TOP

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

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.