Examples of QuestNotStartedCondition


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

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

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I am looking for a very special #book.", null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I have nothing for you now.", null);

    /** Other conditions not met e.g. quest completed */
    npc.addReply("book","If you want to learn more, chat to my friend Wikipedian in Ados library.", null);

    /** If quest is not started yet, start it. */
    npc.add(
      ConversationStates.ATTENDING,
      "book", new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.QUEST_OFFERED,
      "Could you ask #Jynath to return her book? She's had it for months now, and people are looking for it.",
      null);

    npc.add(
View Full Code Here

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

    /** Finally if player didn't start the quest, just ignore him/her */
    npc.add(
      ConversationStates.ATTENDING,
      "book",
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Sssh! I'm concentrating on this potion recipe... it's a tricky one.",
      null);
  }
View Full Code Here

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

   
    // first conversation with Elisabeth.
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.ATTENDING,
        "I can't remember when I smelt the good taste of #chocolate the last time...",
        null);
   
    npc.addReply("chocolate", "My mom told me, that chocolate can be found in an assassin school, which is quite #dangerous. She said also that someone sells it in Ados...");
   
    npc.addReply("dangerous", "Some bandits wait on the road to the school and assassins guard the way there, so mom and I have to stay in Kirdneh because it's safe here...");
   
    // player is supposed to speak to mummy now
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"), new PlayerHasItemWithHimCondition("chocolate bar")),
        ConversationStates.IDLE,
        "My mum wants to know who I was asking for chocolate from now :(",
        null);
   
    // player didn't get chocolate, meanie
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"), new NotCondition(new PlayerHasItemWithHimCondition("chocolate bar"))),
        ConversationStates.ATTENDING,
        "I hope that someone will bring me some chocolate soon...:(",
        null);
   
    // player got chocolate and spoke to mummy
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"), new PlayerHasItemWithHimCondition("chocolate bar")),
        ConversationStates.QUESTION_1,
        "Awesome! Is that chocolate for me?",
        null);
   
    // player spoke to mummy and hasn't got chocolate
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"), new NotCondition(new PlayerHasItemWithHimCondition("chocolate bar"))),
        ConversationStates.ATTENDING,
        "I hope that someone will bring me some chocolate soon...:(",
        null);
   
    // player is in another state like eating
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestNotInStateCondition(QUEST_SLOT, "mummy")),
        ConversationStates.ATTENDING,
        "Hello.",
        null);
   
    // player rejected quest
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.ATTENDING,
        "Hello.",
        null);
   
    // player asks about quest for first time (or rejected)
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I would really love to have some chocolate. I'd like one bar, please. A dark brown one or a sweet white one or some with flakes. Will you get me one?",
        null);
   
    // shouldn't happen
View Full Code Here

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

    // player speaks to mummy before Elisabeth
    mummyNPC.add(ConversationStates.IDLE,
          ConversationPhrases.GREETING_MESSAGES,
          new AndCondition(new GreetingMatchesNameCondition(mummyNPC.getName()),
              new QuestNotStartedCondition(QUEST_SLOT)),
          ConversationStates.ATTENDING, "Hello, nice to meet you.",
          null);

    // player is supposed to begetting chocolate
    mummyNPC.add(ConversationStates.IDLE,
View Full Code Here

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

    // quest can be given
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new OrCondition(
          new QuestNotStartedCondition(QUEST_SLOT),
          new AndCondition(
            new QuestCompletedCondition(QUEST_SLOT),
            new TimePassedCondition(QUEST_SLOT, 1, delay))),
        ConversationStates.ATTENDING,
        null,
View Full Code Here

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

   

    // player asks about quest, they haven't started it yet
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new OrCondition(new QuestNotStartedCondition(mithrilcloak.getQuestSlot()), new QuestInStateCondition(mithrilcloak.getQuestSlot(), "rejected")),       
        ConversationStates.QUEST_OFFERED,
        "My sewing machine is broken, will you help me fix it?",
        null);
   
    final Map<String,Integer> items = new HashMap<String, Integer>();
View Full Code Here

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

        new SetQuestAction(mithrilcloak.getQuestSlot(), "need_mithril_shield"));
     
      // player asks for quest but they haven't completed mithril shield quest
      npc.add(ConversationStates.QUEST_2_OFFERED,
          ConversationPhrases.YES_MESSAGES,
          new QuestNotStartedCondition(mithrilcloak.getShieldQuestSlot()),
          ConversationStates.ATTENDING,
          "There are legends of a wizard called Baldemar, in the famous underground magic city, who will forge a mithril shield for those who bring him what it needs. You should meet him and do what he asks. Once you have completed that quest, come back here and speak with me again. I will have another quest for you.",
          new SetQuestAction(mithrilcloak.getQuestSlot(), "need_mithril_shield"));

      // player refused to hear more about another quest after fixing machine
View Full Code Here

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

    /*
     * Add a reply on the trigger phrase "quest" to Ouchit
     */
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUESTION_1,
        "Are you here to help me a bit?",
        null);

    /*
     * Player is interested in helping, so explain the quest.
     */
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "Good! I sell bows and arrows. It would be great if you could " +
        "bring me 10 pieces of #wood. Can you bring me the wood?",
        null);

    /*
     * Player refused to help - end the conversation.
     */
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.NO_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.IDLE,
        "Oh ok, bye.",
        null);

    /*
     * Player agreed to get wood, so tell them what they'll need to say
     */
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Nice :-) Come back when you have them and say #wood.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "wood", 2.0));

    /*
     * Player asks about wood.
     */
    npc.add(ConversationStates.QUEST_OFFERED,
        "wood",
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "Wood is a great item with many purposes. Of course you will " +
        "find some pieces in a forest. Will you bring me 10 pieces?",
        null);

    /*
     * Player refused to help - end the conversation.
     */
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.IDLE,
        "Ok, you can come back later if you want. Bye for now.",
        null);
  }
View Full Code Here

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

        "Did you forget that you promised me to ask the #lifeguards for #'suntan cream'?",
        null);
   
    zara.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.QUEST_OFFERED,
        "I fell asleep in the sun and now my skin is burnt. Can you bring me the magic #'suntan cream' that the #lifeguards produce?",
        null);
   
    zara.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

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

  private void offerQuestStep() {
    final SpeakerNPC npc = npcs.get("Princess Esclara");
npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I'm looking for a drink, should be an exotic one. Can you bring me one?",
        null);
npc.add(ConversationStates.ATTENDING,
    ConversationPhrases.QUEST_MESSAGES,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.