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

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


    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


   
    // 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),
            new QuestCompletedCondition(VAMPIRE_SWORD_QUEST_SLOT),
            new QuestCompletedCondition(MITHRIL_CLOAK_QUEST_SLOT),
            new QuestCompletedCondition(MITHRIL_SHIELD_QUEST_SLOT),
            new QuestCompletedCondition(CLUB_THORNS_QUEST_SLOT),
            new QuestCompletedCondition(IMMORTAL_SWORD_QUEST_SLOT)),
        ConversationStates.ATTENDING,
        null,
        new StartRecordingRandomItemCollectionAction(QUEST_SLOT, items, "Well, you've certainly proved to the residents of Faiumoni " +
            "that you could be the ultimate collector, but I have one more task for you. Please bring me [item]."));
  }
View Full Code Here

    // player returns after finishing the quest and says offer
    npc.add(
        ConversationStates.ATTENDING,
        ConversationPhrases.OFFER_MESSAGES,
        new QuestCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I buy black items, but I can only afford to pay you modest prices.",
        null);

View Full Code Here

      ConversationStates.ATTENDING,
      "I lost my teddy in the #park over east, where all those #wolves are hanging about.",
      null);

    npc.add(ConversationStates.ATTENDING, "teddy",
      new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new PlayerHasItemWithHimCondition("teddy")),
      ConversationStates.ATTENDING,
      "That's not my teddy, I've got him right here! Remember, you found him for me!",
      null);
  }
View Full Code Here

        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to fetch [item]"
            + ". Say #complete if you brought it! Perhaps there are no supplies of that left at all! You could fetch #another item if you like, or 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, "I can only give you a new quest once a day. Please check back in"));
   
   

   
    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

        "I'm afraid I didn't send you on a #quest 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

    return 0;
  }
 
  @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

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

      "My mouth is dry, but I can't be seen to abandon this teaching room! Could you bring me some #beer from the #tavern?",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "Thanks all the same, but I don't want to get too heavily into drinking; I'm still on duty, you know! I'll need my wits about me if a student shows up...",
      null);

    npc.add(
View Full Code Here

      "my ice? ice plz", null);

    // says quest or ice and doesn't have an ice sword and has brought one in the past
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("ice sword"))),
      ConversationStates.ATTENDING,
      "where is my ice?", null);

    // says quest or ice and has ice sword with him (first time)
    // player gets a karma bonus and some xp
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new PlayerHasItemWithHimCondition("ice sword")),
      ConversationStates.ATTENDING,
      "my ice :)",
      new MultipleActions(new DropItemAction("ice sword"), new IncreaseXPAction(1000), new IncreaseKarmaAction(30.0), new SetQuestAction(QUEST_SLOT, "done;1")));
   
    // says quest or ice and has ice sword with him (second+ time)
    // player gets a karma bonus and some xp
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestCompletedCondition(QUEST_SLOT), new PlayerHasItemWithHimCondition("ice sword")),
      ConversationStates.ATTENDING,
      null,
      new ChatAction() {
        // we are storing the number of times the player has done the quest in the quest slot like
        // done;N. We reward based on this number. If the quest slot isn't split like this and only 'done'
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.