Examples of QuestNotStartedCondition


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

  private ChatCondition anyFriends;
  private ChatCondition oldFriends;
  private ChatCondition currentFriends;

  private void buildConditions() {
    noFriends = new QuestNotStartedCondition("susi");
    anyFriends = new QuestStartedCondition("susi");
    oldFriends = new OrCondition(
        new QuestInStateCondition("susi", "friends"),
        new QuestSmallerThanCondition("susi", Calendar.getInstance().get(Calendar.YEAR)));
    currentFriends = new QuestInStateCondition("susi", Integer.toString(Calendar.getInstance().get(Calendar.YEAR)));
View Full Code Here

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

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
      new AndCondition(
          new LevelGreaterThanCondition(2),
          new QuestNotStartedCondition(QUEST_SLOT),
          new NotCondition(new QuestInStateCondition(QUEST_SLOT,"rejected"))),
      ConversationStates.QUESTION_1,
      "Hm, Do you know what I do for a living?", null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestInStateCondition(QUEST_SLOT,"rejected"),
      ConversationStates.QUEST_OFFERED,
      "Hey, are you going to help me yet?", null);

    npc.add(
      ConversationStates.QUESTION_1,
      ConversationPhrases.YES_MESSAGES,
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Great, so you know my job. My supply of healing #ingredients is running low.",
      null);

    npc.add(
      ConversationStates.QUESTION_1,
      ConversationPhrases.NO_MESSAGES,
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I am Carmen. I can heal you for free, until your powers become too strong. Many warriors ask for my help. Now my #ingredients are running out and I need to fill up my supplies.",
      null);

    npc.add(
      ConversationStates.ATTENDING,
      "ingredients",
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.QUEST_OFFERED,
      "So many people are asking me to heal them. That uses many ingredients and now my inventories are near empty. Can you help me to fill them up?",
      null);

    npc.add(
View Full Code Here

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

    // says hi without having started quest before
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Greetings stranger! Have you seen my snow sculptures? I need a #favor from someone friendly like you.",
        null);
   
    // says hi - got the snow yeti asked for
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new PlayerHasItemWithHimCondition("snowball", REQUIRED_SNOWBALLS)),
        ConversationStates.QUEST_ITEM_BROUGHT,
        "Greetings stranger! I see you have the snow I asked for. Are these snowballs for me?",
        null);

    // says hi - didn't get the snow yeti asked for
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new PlayerHasItemWithHimCondition("snowball", REQUIRED_SNOWBALLS))),
        ConversationStates.ATTENDING,
        "You're back already? Don't forget that you promised to collect a bunch of snowballs for me!",
        null);
   
    // says hi - quest was done before and is now repeatable
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES)),
        ConversationStates.ATTENDING,
        "Greetings again! Have you seen my latest snow sculptures? I need a #favor again ...",
        null);
   
    // says hi - quest was done before and is not yet repeatable
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, REQUIRED_MINUTES, "I have enough snow for my new sculpture. Thank you for helping! "
            + "I might start a new one in" ));

    // asks about quest - has never started it
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I like to make snow sculptures, but the snow in this cavern is not good enough. Would you help me and get some snowballs? I need twenty five of them.",
        null);
   
    // asks about quest but already on it
View Full Code Here

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

    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
          new QuestNotStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Greetings old friend. I have another collecting #challenge for you.",
      null);

    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new OrCondition(new QuestNotCompletedCondition(CLUB_THORNS_QUEST_SLOT),
               new QuestNotCompletedCondition(IMMORTAL_SWORD_QUEST_SLOT))),
      ConversationStates.ATTENDING,
      "There is still a quest in the Kotoch area which you have not completed. Explore thoroughly and you will be on your way to becoming the ultimate collector!",
      null);


    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new OrCondition(new QuestNotCompletedCondition(MITHRIL_CLOAK_QUEST_SLOT),
               new QuestNotCompletedCondition(MITHRIL_SHIELD_QUEST_SLOT))),
      ConversationStates.ATTENDING,
      "You are missing a special mithril item which you can win if you help the right person, you cannot be an ultimate collector without it.",
      null);

    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new OrCondition(new QuestNotCompletedCondition(OBSIDIAN_KNIFE_QUEST_SLOT),
               new QuestNotCompletedCondition(VAMPIRE_SWORD_QUEST_SLOT))),
      ConversationStates.ATTENDING,
      "There is a dwarf blacksmith living alone deep underground who would forge a special weapon for you, you cannot be an ultimate collector without this.",
      null);

    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new OrCondition(new QuestNotCompletedCondition(CLOAKSCOLLECTOR2_QUEST_SLOT),
               new QuestNotCompletedCondition(CLOAKS_FOR_BARIO_QUEST_SLOT))),
      ConversationStates.ATTENDING,
      "A special item will be yours if you collect many cloaks, whether to fulfil another's vanity or keep them warm, it's a task you must complete.",
      null);

    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new QuestNotCompletedCondition(ELVISH_ARMOR_QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Another collector of items still needs your help. You'd find him in Fado Forest, and until you have completed that favour for him, you cannot be the ultimate collector.",
      null);

    npc.add(ConversationStates.ATTENDING,
      "challenge",
      new AndCondition(new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
           new QuestNotStartedCondition(QUEST_SLOT),
           new QuestNotCompletedCondition(KANMARARN_QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "You've collected so many special items, but you have never helped those down in Kanmararn city. You should complete a task there.",
      null);
   
View Full Code Here

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

    // If all quests are completed, ask for an item
    npc.add(ConversationStates.ATTENDING,
        "challenge",
        new AndCondition(
            new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
            new QuestNotStartedCondition(QUEST_SLOT),
            new QuestCompletedCondition(KANMARARN_QUEST_SLOT),
            new QuestCompletedCondition(ELVISH_ARMOR_QUEST_SLOT),
            new QuestCompletedCondition(CLOAKSCOLLECTOR2_QUEST_SLOT),
            new QuestCompletedCondition(CLOAKS_FOR_BARIO_QUEST_SLOT),
            new QuestCompletedCondition(OBSIDIAN_KNIFE_QUEST_SLOT),
View Full Code Here

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

    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
              new OrCondition(
                  new QuestNotStartedCondition(QUEST_SLOT),
                  new QuestNotCompletedCondition(QUEST_SLOT)),
              new PlayerHasItemWithHimCondition("teddy")),
      ConversationStates.ATTENDING,
      "You found him! *hugs teddy* Thank you, thank you! *smile*",
      new MultipleActions(reward));
View Full Code Here

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

   
   

   
    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("Mayor Chalmers");
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I'm afraid I didn't send you on a #quest yet.",
        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("Tywysoga");

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new OrCondition(new QuestNotStartedCondition(QUEST_SLOT), new QuestInStateCondition(QUEST_SLOT, 0, "rejected")),
      ConversationStates.QUEST_OFFERED,
      "Will you find the wandering flower seller, Rose Leigh, and get from her my favourite flower, the Rhosyd?",
      null);

        // shouldn't happen: is a repeatable quest
View Full Code Here

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

        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. */
    npc.add(ConversationStates.QUEST_OFFERED, "flask",
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "You could probably get a flask from #Margaret.", null);

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES, null,
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.