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

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


    final SpeakerNPC reaper = npcs.get("Grim Reaper");
   
    // player has no unsolved riddle active
    reaper.add(ConversationStates.ATTENDING,
        "leave",
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUESTION_1,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            // randomly choose from available riddles
View Full Code Here


        });

    // response to wedding ring enquiry if you are not engaged
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("wedding ring", "wedding"),
        new QuestNotStartedCondition(marriage.getQuestSlot()),
        ConversationStates.ATTENDING,
        "I'd forge a wedding ring for you to give your partner, if you were engaged to someone. If you want to get engaged, speak to the nun outside the church.",
        null);

    // response to wedding ring enquiry when you're already married
View Full Code Here

    // first chat of player with Anastasia
    npc.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING, "Hi, I really could do with a #favor, please.",
      null);

    // player who is rejected or 'done' but waiting to start again, returns
    npc.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotInStateCondition(QUEST_SLOT, "start"),
          new QuestStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Hello again.",
      null);
   
    // if they ask for quest while on it, remind them
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestInStateCondition(QUEST_SLOT, "start"),
      ConversationStates.ATTENDING,
      "You already promised me to bring me some fish soup for Hughie! Please hurry!",
      null);

    // first time player asks/ player had rejected
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "My poor boy is sick and the potions I give him aren't working! Please could you fetch him some fish soup?",
        null);
   
    // player returns - enough time has passed
View Full Code Here

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new NotCondition(new NakedCondition()),
            new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        null,
        new MultipleActions(
            new SayTextWithPlayerNameAction("Hi [name], nice to meet you. You know, we have something in common - good #manners. Did you know that if someone says something in #blue it is polite to repeat it back to them? So, repeat after me: #manners."),
            new SetQuestAction(QUEST_SLOT, "seen")));
View Full Code Here

  protected void welcomeNewPlayer() {
    concreteQuest.getNPC().add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(concreteQuest.getNPC().getName()),
          new QuestNotStartedCondition(concreteQuest.getSlotName())),
      ConversationStates.ATTENDING,
      concreteQuest.welcomeBeforeStartingQuest(),
      null);
  }
View Full Code Here

    if (additionalTrigger != null) {
      questTrigger.addAll(additionalTrigger);
    }
    concreteQuest.getNPC().add(ConversationStates.ATTENDING,
      questTrigger,
      new QuestNotStartedCondition(concreteQuest.getSlotName()),
      ConversationStates.QUEST_OFFERED,
      concreteQuest.respondToQuest()null);
  }
View Full Code Here

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

    // player asks about quest when he has not started it
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "First you need six magic candles. Bring me six pieces of #beeswax and two pieces of #iron, " +
        "then I will summon the candles for you. After this you can start the practical test.",
        new SetQuestAction(QUEST_SLOT,"start"));
   
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 and welcome on Ados market! I have something really tasty and 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 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")
      );

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

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.