Examples of QuestNotStartedCondition


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

   
    final SpeakerNPC npc = npcs.get("Wishman");
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "Would you like to visit our dragon lair?",
        null);
       
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

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

    final SpeakerNPC npc = npcs.get("Haunchy Meatoch");
   
    // player says quest when he has not ever done the quest before (rejected or just new)
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I cannot use wood for this huge BBQ. To keep the heat I need some really old stone coal but there isn't much left. The problem is, that I can't fetch it myself because my steaks would burn then so I have to stay here. Can you bring me 25 pieces of #coal for my BBQ please?",
        null);

    npc.add(
View Full Code Here

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

    actions.add(new StartRecordingRandomItemCollectionAction(QUEST_SLOT,0,items,"I want Kirdneh's museum to be the greatest in the land! Please fetch [item]"
        + " and say #complete, once you've brought it."))
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
   
    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,
        startQuestAction());
View Full Code Here

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

  private void completeQuest() {
    final SpeakerNPC npc = npcs.get("Hazel");
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I don't remember giving you any #task yet.",
        null);
   
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

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

    // So then the NPC doesn't have to choose which reason to reject the player for (appears as a WARN from engine if he has to choose)

    // player has not done required quest, hasn't got a house at all
add(ConversationStates.ATTENDING,
    Arrays.asList("cost", "house", "buy", "purchase"),
    new AndCondition(new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT), new QuestNotCompletedCondition(KalavanHouseseller.PRINCESS_QUEST_SLOT)),
    ConversationStates.ATTENDING,
      "The cost of a new house is "
    + getCost()
    + " money. But I am afraid I cannot sell you a house until your citizenship has been approved by the King, who you will find "
    + " north of here in Kalavan Castle. Try speaking to his daughter first, she is ... friendlier.",
      null);

// player is not old enough but they have doen princess quest
// (don't need to check if they have a house, they can't as they're not old enough)
add(ConversationStates.ATTENDING,
    Arrays.asList("cost", "house", "buy", "purchase"),
    new AndCondition(
               new QuestCompletedCondition(KalavanHouseseller.PRINCESS_QUEST_SLOT),
               new NotCondition(new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE))),
    ConversationStates.ATTENDING,
    "The cost of a new house is "
    + getCost()
    + " money. But I am afraid I cannot trust you with house ownership just yet, come back when you have spent at least "
    + Integer.toString((HouseSellerNPCBase.REQUIRED_AGE / 60)) + " hours on Faiumoni.",
    null);

// player is eligible to buy a house
    add(ConversationStates.ATTENDING,
    Arrays.asList("cost", "house", "buy", "purchase"),
    new AndCondition(new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT),
             new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
               new QuestCompletedCondition(KalavanHouseseller.PRINCESS_QUEST_SLOT)),
    ConversationStates.QUEST_OFFERED,
    "The cost of a new house is "
    + getCost()
View Full Code Here

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

   
    // player doesn't have a house and is old enough but has not done required quests
    add(ConversationStates.ATTENDING,
         Arrays.asList("cost", "house", "buy", "purchase"),
         new AndCondition(new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
                  new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT),
                  new NotCondition(
                            new AndCondition(
                                     new QuestCompletedCondition(AdosHouseSeller.DAILY_ITEM_QUEST_SLOT),
                                     new QuestCompletedCondition(AdosHouseSeller.ANNA_QUEST_SLOT),
                                     new QuestCompletedCondition(AdosHouseSeller.KEYRING_QUEST_SLOT),
                                     new QuestCompletedCondition(AdosHouseSeller.FISHROD_QUEST_SLOT),
                                     new QuestCompletedCondition(AdosHouseSeller.GHOSTS_QUEST_SLOT),
                                     new QuestCompletedCondition(AdosHouseSeller.ZARA_QUEST_SLOT)))),
         ConversationStates.ATTENDING,
         "The cost of a new house in Ados is "
         + getCost()
         + " money. But I am afraid I cannot sell you a house yet as you must first prove yourself a worthy #citizen.",
         null);
   
    // player is eligible to buy a house
    add(ConversationStates.ATTENDING,
          Arrays.asList("cost", "house", "buy", "purchase"),
         new AndCondition(new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT),
                  new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
                  new QuestCompletedCondition(AdosHouseSeller.DAILY_ITEM_QUEST_SLOT),
                  new QuestCompletedCondition(AdosHouseSeller.ANNA_QUEST_SLOT),
                  new QuestCompletedCondition(AdosHouseSeller.KEYRING_QUEST_SLOT),
                  new QuestCompletedCondition(AdosHouseSeller.FISHROD_QUEST_SLOT),
View Full Code Here

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

  private void askingStep() {
    final SpeakerNPC npc = npcs.get("Carena");

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new OrCondition(new QuestNotStartedCondition(QUEST_SLOT), new QuestInStateCondition(QUEST_SLOT, "rejected")),
      ConversationStates.QUEST_OFFERED,
      "I feel so lonely. I only ever see creatures and alive people. If I knew about #spirits like me, I would feel better.",
      null);

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

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

  private void offerQuestStep() {
    final SpeakerNPC npc = npcs.get("Jef");

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new OrCondition(new QuestNotStartedCondition(QUEST_SLOT), new QuestInStateCondition(QUEST_SLOT, 0, "rejected")),
      ConversationStates.QUEST_OFFERED,
      "I miss my mother! She wanted to go to the market but didn't return so far. Can you watch out for her please?",
      null);

    // player asks about quest which he has done already and he is allowed to repeat it
View Full Code Here

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

            null);

        // Player asks for a quest
        npc.add(ConversationStates.ATTENDING,
            ConversationPhrases.QUEST_MESSAGES,
            new QuestNotStartedCondition(QUEST_SLOT),
            ConversationStates.QUEST_OFFERED,
            "Wrof! My stock of supplies for preparing koboldish #torcibud is running thin. Would you help me getting some #stuff?",
            null
        );

        // Player has done the quest already but not enough time has passed since completing it
        npc.add(ConversationStates.ATTENDING,
            ConversationPhrases.QUEST_MESSAGES,
            new AndCondition(
                new QuestCompletedCondition(QUEST_SLOT),
                new TimeReachedCondition(QUEST_SLOT, 1)),
            ConversationStates.QUEST_OFFERED,
            "Wroff! Indeed I'd need some #stuff for making some more koboldish #torcibud. Will you help?",
            null);

        // Player has done the quest already but it's too early to get another
        npc.add(ConversationStates.ATTENDING,
            ConversationPhrases.QUEST_MESSAGES,
            new AndCondition(
                new QuestCompletedCondition(QUEST_SLOT),
                new NotCondition(new TimeReachedCondition(QUEST_SLOT, 1))),
            ConversationStates.ATTENDING, null,
            new SayTimeRemainingUntilTimeReachedAction(QUEST_SLOT, 1,
                "Wrof! Thank you but my stock of supplies for making good #torcibud will be fine for"));

        // Player is curious about torcibud when offered the quest
        npc.add(ConversationStates.QUEST_OFFERED,
            "torcibud",
            new QuestNotStartedCondition(QUEST_SLOT),
            ConversationStates.QUEST_OFFERED,
            "Wruff. I will make more when I have enough #stuff! Are you going to help?",
            null);

        // Player is curious about stuff, ingredients or supplies when offered the quest
        // NOTE:
        // the answer given by the NPC does not contain any trigger words on pourpose
        // as it should only hint what's kind of things are needed.
        // some details about the required items are given only once the quest has been accepted.
        npc.add(ConversationStates.QUEST_OFFERED,
            Arrays.asList("stuff","ingredients","supplies"),
            new OrCondition(
                new QuestNotStartedCondition(QUEST_SLOT),
                new QuestInStateCondition(QUEST_SLOT, "rejected")),
            ConversationStates.QUEST_OFFERED,
            "Wrof! Some bottles, artichokes, a few herbs and fierywater... Things like that. So, will you help?",
            null);
View Full Code Here

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 QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Greetings. Be quick with your matters, I have a lot of work to do."
          + " And next time clean your boots, you are lucky that I'm not the king...yet!",
        null);

    npc.addQuest("Hmm you could be useful for my #plan...");
    npc.addReply("plan",
          "Soon I will dethrone the king of Kalavan and become the new king! Right now I need myself a new #crown.");

    /* player says crown */
    npc.add(ConversationStates.ATTENDING,
        "crown",
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "Yes, I need jewels and gold for my new crown. Will you help me?",
        null);

    /* player says yes */
 
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.