Examples of QuestCompletedCondition


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

        "Would you like to visit our dragon lair?",
        null);
       
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, MathHelper.MINUTES_IN_ONE_WEEK))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, MathHelper.MINUTES_IN_ONE_WEEK, "I think they've had enough excitement for a while.  Come back in"));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT, 1, MathHelper.MINUTES_IN_ONE_WEEK)),
        ConversationStates.QUEST_OFFERED,
        "Would you like to visit our dragons again?",
        null);
   
    // shouldn't happen
View Full Code Here

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

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

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

        null);

        // player has completed the quest (doesn't happen here)
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I can go on with grilling my tasty steaks now! Thank you!",
        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.QuestCompletedCondition

        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to bring the museum [item]"
            + ". Please say #complete if you have it with you. But, perhaps that is now too rare an item. I can give you #another task, or you can return with what I first asked you."));
 
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestCompletedCondition(QUEST_SLOT),
                 new NotCondition(new TimePassedCondition(QUEST_SLOT,1,delay))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT,1, delay, "The museum can only afford to send you to fetch an item once a week. Please check back in"));
   
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    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.QuestCompletedCondition

        "I don't remember giving you any #task yet.",
        null);
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "You already completed the last quest I had given to you.",
        null);
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
View Full Code Here

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

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

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

// 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()
    + " money. Also, you must pay a house tax of " + HouseTax.BASE_TAX
    + " money, every month. You can ask me which houses are #available. Or, if you have a specific house in mind, please tell me the number now.",
View Full Code Here

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

         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),
                  new QuestCompletedCondition(AdosHouseSeller.GHOSTS_QUEST_SLOT),
                  new QuestCompletedCondition(AdosHouseSeller.ZARA_QUEST_SLOT)),
         ConversationStates.QUEST_OFFERED,
         "The cost of a new house in Ados is "
         + getCost()
         + " money. Also, you must pay a house tax of " + HouseTax.BASE_TAX
         + " money, every month. If you have a house in mind, please tell me the number now. I will check availability. "
View Full Code Here

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

      "I want help to find other spirits like me. Please find them, then come back and tell me their names.",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Thank you! I feel better now that I know the names of other spirits on Faiumoni.",
      null);

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

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

  private void step_1() {
    final SpeakerNPC npc = npcs.get("Hunel");

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Hi. As you see, I am still too nervous to leave ...",
        null);

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_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.