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

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


      null);
   
    // Player asks about quests, but has finished this quest
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "What are you bothering me for now? You've got your sword, go and use it!",
      null);
   
    // Player asks about quests, but has not finished this quest
View Full Code Here


        null);
   
    // shouldn't happen
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I'm full up now thank you!",
        null);
   
    // player can repeat quest
View Full Code Here

    // at time of writing, the other drinks are fierywater, tea, pina colada, and mega potion (which we may remove)
    achievements.add(createAchievement("production.class.drink", "Thirsty Worker", "Order all drink types available from Faiumoni's cooks",
        Achievement.MEDIUM_BASE_SCORE, true,
        new AndCondition(
            new PlayerProducedNumberOfItemsCondition(1, drinks),
            new QuestCompletedCondition("soup_maker"),
            new QuestCompletedCondition("fishsoup_maker"),
            new QuestCompletedCondition("koboldish_torcibud"))));


      final List<String> resourcelist = producerRegister.getProducedItemNames("resource");
    final String[] resources = resourcelist.toArray(new String[resourcelist.size()]);
    // at time of writing: gold bar, mithril bar, flour, iron
View Full Code Here

    //weekly item quest achievement
    achievements.add(createAchievement("quest.special.weekly_item.0005", "Archaeologist", "Finish weekly item quest 5 times",
                        Achievement.HARD_BASE_SCORE, true, new QuestStateGreaterThanCondition("weekly_item", 2, 4)));
    //ultimate collector quest achievement
    achievements.add(createAchievement("quest.special.collector", "Ultimate Collector", "Finish ultimate collector quest",
                        Achievement.HARD_BASE_SCORE, true, new QuestCompletedCondition("ultimate_collector")));
    return achievements;
  }
View Full Code Here

                        Achievement.MEDIUM_BASE_SCORE, true,
                        new AndCondition(
                            // Susi Quest is never set to done, therefore we check just if the quest has been started (condition "anyFriends" from FoundGirl.java)
                            new QuestStartedCondition("susi"),
                            // Help Tad, Semos Town Hall (Medicine for Tad)
                            new QuestCompletedCondition("introduce_players"),
                            // Plink, Semos Plains North
                            new QuestCompletedCondition("plinks_toy"),
                            // Anna, in Ados
                            new QuestCompletedCondition("toys_collector"),
                            // Sally, Orril River
                            // 'completed' doesn't work for Sally - return player.hasQuest(QUEST_SLOT) && !"start".equals(player.getQuest(QUEST_SLOT)) && !"rejected".equals(player.getQuest(QUEST_SLOT));
                            new AndCondition(new QuestActiveCondition("campfire"), new QuestNotInStateCondition("campfire", "start")),
                            // Annie, Kalavan city gardens
                            new QuestStateStartsWithCondition("icecream_for_annie","eating;"),
                            // Elisabeth, Kirdneh
                            new QuestStateStartsWithCondition("chocolate_for_elisabeth","eating;"),
                            // Jef, Kirdneh
                            new QuestCompletedCondition("find_jefs_mom"),
                            // Hughie, Ados farmhouse
                            new AndCondition(new QuestActiveCondition("fishsoup_for_hughie"), new QuestNotInStateCondition("fishsoup_for_hughie", "start")))));

    // quests about finding people
    achievements.add(createAchievement("friend.quests.find", "Private Detective", "Find all lost and hidden people",
                        Achievement.HARD_BASE_SCORE, true,
                        new AndCondition(
                            // Rat Children (Agnus)
                            new QuestCompletedCondition("find_rat_kids"),
                            // Find Ghosts (Carena)
                            new QuestCompletedCondition("find_ghosts"),
                            // Meet Angels (any of the cherubs)
                            new ChatCondition() {
                              public boolean fire(final Player player, final Sentence sentence, final Entity entity) {
                                if (!player.hasQuest("seven_cherubs")) {
                                  return false;
View Full Code Here

    // 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(KirdnehHouseSeller.KIRDNEH_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. If you have a house in mind, please tell me the number now. I will check availability. "
View Full Code Here

  private void playerReturnsAfterCompletingQuest(final SpeakerNPC npc) {
    // after finishing the quest, just tell them to go away, and mean it.
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition(QUEST_SLOT)),
        ConversationStates.IDLE,
        "Go away!",null);
  }
View Full Code Here

    // player is eligible to buy a apartment
    add(ConversationStates.ATTENDING,
         Arrays.asList("cost", "house", "buy", "purchase", "apartment"),
         new AndCondition(new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT),
                  new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
                  new QuestCompletedCondition(AthorHouseSeller.FISHLICENSE2_QUEST_SLOT)),
          ConversationStates.QUEST_OFFERED,
         "The cost of a new apartment is "
         + getCost()
         + " money.  Also, you must pay a monthly tax of " + HouseTax.BASE_TAX
         + " money. If you have an apartment in mind, please tell me the number now. I will check availability. "
View Full Code Here

  private void step_1() {
    final SpeakerNPC npc = npcs.get("Tad");
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING, "I'm alright now, thanks.", null);

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        null);

    /** In case Quest has already been completed */
    npc.add(ConversationStates.ATTENDING, "flask",
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "You've already helped me out! I'm feeling much better now.",
        null);

    /** If quest is not started yet, start it. */
 
View Full Code Here

      "Could you bring me a #hat to cover my bald head? Brrrrr! The days here in Semos are really getting colder...",
      null);

    monogenes.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Thanks for the offer, good friend, but this hat will last me five winters at least, and it's not like I need more than one.",
      null);

    monogenes.add(
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.