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

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


      "Pssst! C'mere... do me a favour and tell #Xin #Blanca that the new supply of weapons is ready, will you?",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Thanks, but I don't have any messages to pass on to #Xin. I can't smuggle so often now... I think Xoderos is beginning to suspect something. Anyway, let me know if there's anything else I can do.",
      null);

    npc.add(
View Full Code Here


      ConversationStates.QUEST_OFFERED,
      "Some orbs have special properties. I can teach you how to #use an orb, like the one on this table.", null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I can remind you how to #use orbs.", null);

    // player interested in orb
    npc.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

        "I've been here a long time, and I can not leave this place. Could you bring me some food?",
        null);
             
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Thanks for getting me the food and clothes. I think I can stand here warning people for some months longer now.",
        null);
   
View Full Code Here

      protected void createDialog() {
        // Greet players who have a basket but go straight back to idle to give others a chance
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(super.getName()),
                new QuestCompletedCondition(QUEST_SLOT)),
            ConversationStates.IDLE,
            "Hi again! Don't eat too much this Easter!", null);

        final List<ChatAction> reward = new LinkedList<ChatAction>();
        reward.add(new EquipItemAction("basket"));
View Full Code Here

  protected void welcomePlayerAfterQuest() {
    if (concreteQuest.shouldWelcomeAfterQuestIsCompleted()) {
      concreteQuest.getNPC().add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(concreteQuest.getNPC().getName()),
            new QuestCompletedCondition(concreteQuest.getSlotName())),
        ConversationStates.ATTENDING,
        concreteQuest.welcomeAfterQuestIsCompleted(),
        null);
    }
  }
View Full Code Here

        new SetQuestAction(QUEST_SLOT,"start"));
   
    // player asks about quest when he has already completed it
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "You have already passed the practical test and you are free to explore this tower. I will #teleport you " +
      "to the spire, or I can #help you some other way.",
      null);
   
View Full Code Here

    final SpeakerNPC npc = npcs.get("Zekiel the guardian");

    // player returns having completed the quest
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestCompletedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Greetings adventurer, how can I #help you this time?",
      null);
   
    // player asks for help, having completed the quest
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.HELP_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I can #teleport you to the spire and I am also the #storekeeper of the #wizards tower.",
      null);

    // player asks about the store, having completed the quest
    npc.add(ConversationStates.ATTENDING,
      "storekeeper",
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "The store is at the floor under the spire. I will be there when you enter it.",
      null);

    // send a player who has completed the quest to the top spire
    npc.add(ConversationStates.ATTENDING,
      "teleport",
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.IDLE, null,
      new TeleportAction("int_semos_wizards_tower_8", 21, 22, Direction.UP));

    // player who has completed quest asks about the tower or test, offer the teleport or help
    npc.add(ConversationStates.ATTENDING,
      Arrays.asList("tower", "test"),
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "You have already passed the practical test and you are free to explore this tower. I will #teleport you to the spire, or can I #help you some other way?",
      null);
  }
View Full Code Here

    // 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 fish 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 , "Oh I am sorry, I have to wash my cooking pots first before making more soup for you. Please come back in")
      );
View Full Code Here

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

                null);

        // Player asks for quest after solving the quest
        npc.add(ConversationStates.ATTENDING,
                ConversationPhrases.QUEST_MESSAGES,
                new QuestCompletedCondition(QUEST_SLOT),
                ConversationStates.ATTENDING,
                "Sorry. I have nothing to do for you at the moment. But thank you again for your help.",
                null);
    }
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.