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

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



    // player returns when the quest is in progress and says offer
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.OFFER_MESSAGES,
        new QuestNotCompletedCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "I'll buy black items from you when you have completed each #challenge I set you.", null);
  }
View Full Code Here


    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotCompletedCondition(QUEST_SLOT),
          new NotCondition(new PlayerHasItemWithHimCondition("teddy"))),
      ConversationStates.QUEST_OFFERED,
      "*cries* There were wolves in the #park! *sniff* I ran away, but I dropped my #teddy! Please will you get it for me? *sniff* Please?",
      null);

 
View Full Code Here

   
    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));

    npc.add(
      ConversationStates.ATTENDING,
      "teddy",
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("teddy"))),
      ConversationStates.ATTENDING,
      "I lost my teddy in the #park over east, where all those #wolves are hanging about.",
      null);

    npc.add(ConversationStates.ATTENDING, "teddy",
View Full Code Here

  private void prepareRequestingStep() {
    final SpeakerNPC npc = npcs.get("Hayunn Naratha");

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestNotCompletedCondition(QUEST_SLOT),
      ConversationStates.QUEST_OFFERED,
      "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,
View Full Code Here

    final SpeakerNPC npc = npcs.get("tomi");

    // says quest or ice and doesn't have an ice sword and hasn't brought one before
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new NotCondition(new PlayerHasItemWithHimCondition("ice sword"))),
      ConversationStates.ATTENDING,
      "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)
View Full Code Here

    // So then the NPC doesn't have to choose which reason to reject the player for (appears as a WARN from engine if he has to choose)

    // player has not done required quest, hasn't got a house at all
add(ConversationStates.ATTENDING,
    Arrays.asList("cost", "house", "buy", "purchase"),
    new AndCondition(new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT), new QuestNotCompletedCondition(KalavanHouseseller.PRINCESS_QUEST_SLOT)),
    ConversationStates.ATTENDING,
      "The cost of a new house is "
    + getCost()
    + " money. But I am afraid I cannot sell you a house until your citizenship has been approved by the King, who you will find "
    + " north of here in Kalavan Castle. Try speaking to his daughter first, she is ... friendlier.",
View Full Code Here

        "Hi. As you see, I am still too nervous to leave ...",
        null);

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotCompletedCondition(QUEST_SLOT),
            new NotCondition(new PlayerHasItemWithHimCondition("kanmararn prison key"))),
        ConversationStates.IDLE,
        "Help! The duergars have raided the prison and locked me up! I'm supposed to be the Guard! It's a shambles.",
        new SetQuestAction(QUEST_SLOT, "start"));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotCompletedCondition(QUEST_SLOT),
            new PlayerHasItemWithHimCondition("kanmararn prison key")),
        ConversationStates.ATTENDING,
        "You got the key to unlock me! *mumble*  Errrr ... it doesn't look too safe out there for me ... I think I'll just stay here ... perhaps someone could #offer me some good equipment ... ",
        new MultipleActions(new SetQuestAction(QUEST_SLOT, "done"),
                    new IncreaseXPAction(2000)));
View Full Code Here

    reward2.add(new EquipItemAction("studded shield"));
    reward2.add(new IncreaseXPAction(20));
    reward2.add(new SetQuestAction(QUEST_SLOT, "done"));

    npc.add(ConversationStates.INFORMATION_4,
        ConversationPhrases.YES_MESSAGES, new QuestNotCompletedCondition(QUEST_SLOT),
        ConversationStates.IDLE,
        epilog + "Well, good luck in the dungeons! This shield should help you. Here's hoping you find fame and glory, and keep watch for monsters!",
        new MultipleActions(reward2));

    npc.add(new ConversationStates[] { ConversationStates.ATTENDING,
View Full Code Here

            null);
   
        // Player answers no when asked if he has brought any items
        npc.add(ConversationStates.QUESTION_1,
            ConversationPhrases.NO_MESSAGES,
            new QuestNotCompletedCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Wruf! Take your time... No hurry!",
            null);

        // create the ChatAction to reward the player
View Full Code Here

    final SpeakerNPC npc = npcs.get("Grafindle");

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestNotCompletedCondition(QUEST_SLOT),
      ConversationStates.ATTENDING, "I need someone who can be trusted with #gold.",
      null);
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
View Full Code Here

TOP

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

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.