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

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


            new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new OrCondition(new QuestInStateCondition(QUEST_SLOT,"seeking_book"), new QuestInStateCondition(QUEST_SLOT, "got_book")),
            new NotCondition(new PlayerHasItemWithHimCondition("blue book"))),
        ConversationStates.ATTENDING,
        "Hello again. I hope you haven't forgotten about the gem book I wanted.",
        null);
  }
View Full Code Here


  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

    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);
View Full Code Here

    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    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*",
 
View Full Code Here

   
   

   
    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

  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
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition("QUEST_SLOT"),
      ConversationStates.ATTENDING,
      "I have plenty of blooms now thank you.", null);
   
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestInStateCondition(QUEST_SLOT, 0, "flower_brought"),
      ConversationStates.QUEST_OFFERED,
      "The last Rhosyd you brought me was so lovely. Will you find me another from Rose Leigh?",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new OrCondition(new QuestInStateCondition(QUEST_SLOT, 0, "start"), new QuestInStateCondition(QUEST_SLOT, 0, "got_flower")),
      ConversationStates.ATTENDING,
      "I do so love those pretty flowers from Rose Leigh ...",
      null);

    // Player agrees to collect flower
View Full Code Here

    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

  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

  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

        // 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

TOP

Related Classes of games.stendhal.server.entity.npc.condition.OrCondition

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.