Examples of QuestNotStartedCondition


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

        "Thanks for your help. I am relieved to have the amulet back.",
        null);
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I have a problem with some dark elves. I used to be in league with them... now they are too strong. There is access to their lair from a #secret #room in this hall.",
        null);

    final List<ChatAction> actions = new LinkedList<ChatAction>();
View Full Code Here

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

    // first chat of player with sally
    npc.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING, "Hi! I need a little #favor ... ",
      null);

    // player who is rejected or 'done' but waiting to start again, returns
    npc.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotInStateCondition(QUEST_SLOT, "start"),
          new QuestStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Hi again!",
      null);
   
    // if they ask for quest while on it, remind them
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestInStateCondition(QUEST_SLOT, "start"),
      ConversationStates.ATTENDING,
      "You already promised me to bring me some wood! Ten pieces, remember?",
      null);

    // first time player asks/ player had rejected
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I need more wood to keep my campfire running, But I can't leave it unattended to go get some! Could you please get some from the forest for me? I need ten pieces.",
        null);
   
    // player returns - enough time has passed
View Full Code Here

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

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

   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_ITEM_QUESTION,
        "You know, it's hard to get food round here. I don't have any #supplies for next year.",
        null);
   
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

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

    final SpeakerNPC npc = npcs.get("Hogart");
   
    // Player asks about quests, and had previously rejected or never asked: offer it
    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestNotStartedCondition(QUEST_SLOT),
      ConversationStates.QUEST_OFFERED,
      "I can forge a powerful life stealing sword for you. You will need to go to the Catacombs below Semos Graveyard and fight the Vampire Lord. Are you interested?",
      null);
   
    // Player asks about quests, but has finished this quest
View Full Code Here

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

   
    // first conversation with annie. be like [strike]every good child[/strike] kymara was when she was little and advertise name and age.
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.ATTENDING,
        "Hello, my name is Annie. I am five years old.",
        null);
   
    // player is supposed to speak to mummy now
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new PlayerHasItemWithHimCondition("icecream")),
        ConversationStates.IDLE,
        "Mummy says I mustn't talk to you any more. You're a stranger.",
        null);
   
    // player didn't get ice cream, meanie
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new PlayerHasItemWithHimCondition("icecream"))),
        ConversationStates.ATTENDING,
        "Hello. I'm hungry.",
        null);
   
    // player got ice cream and spoke to mummy
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"),
            new PlayerHasItemWithHimCondition("icecream")),
        ConversationStates.QUESTION_1,
        "Yummy! Is that ice cream for me?",
        null);
   
    // player spoke to mummy and hasn't got ice cream
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"),
            new NotCondition(new PlayerHasItemWithHimCondition("icecream"))),
        ConversationStates.ATTENDING,
        "Hello. I'm hungry.",
        null);
   
    // player is in another state like eating
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new QuestNotInStateCondition(QUEST_SLOT, "mummy")),
        ConversationStates.ATTENDING,
        "Hello.",
        null);
   
    // player rejected quest
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.ATTENDING,
        "Hello.",
        null);
   
    // player asks about quest for first time (or rejected)
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "I'm hungry! I'd like an ice cream, please. Vanilla, with a chocolate flake. Will you get me one?",
        null);
   
    // shouldn't happen
View Full Code Here

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

    // player speaks to mummy before annie
    mummyNPC.add(ConversationStates.IDLE,
          ConversationPhrases.GREETING_MESSAGES,
          new AndCondition(new GreetingMatchesNameCondition(mummyNPC.getName()),
              new QuestNotStartedCondition(QUEST_SLOT)),
          ConversationStates.ATTENDING, "Hello, nice to meet you.",
          null);

    // player is supposed to begetting ice cream
    mummyNPC.add(ConversationStates.IDLE,
View Full Code Here

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

  private void step_1() {
    final SpeakerNPC npc = npcs.get("Andy");

    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "My lovely wife was killed when she went to Wo'fol to order some freshmade pizza by Kroip. Some monks stepped into her way and she had no chance. Now I want revenge! May you help me?",
        null);

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

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

    // player is old enough and hasn't got a house but has not done required quest
    add(ConversationStates.ATTENDING,
         Arrays.asList("cost", "house", "buy", "purchase"),
         new AndCondition(new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
                  new QuestNotCompletedCondition(KirdnehHouseSeller.KIRDNEH_QUEST_SLOT),
                   new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT)),
         ConversationStates.ATTENDING,
         "The cost of a new house in Kirdneh is "
         + getCost()
         + " money. But my principle is never to sell a house without establishing first the good #reputation of the prospective buyer.",
         null);
   
    // 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()
View Full Code Here

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

  private void startOfQuest(final SpeakerNPC npc) {
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Go away!",null);

    //offer the quest
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "So...looks like you want to help me?",null);
   
    //accept the quest
    npc.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

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

    // player is old enough and hasn't got a house but has not done required quest
    add(ConversationStates.ATTENDING,
         Arrays.asList("cost", "house", "buy", "purchase", "apartment"),
         new AndCondition(new AgeGreaterThanCondition(HouseSellerNPCBase.REQUIRED_AGE),
                  new QuestNotCompletedCondition(AthorHouseSeller.FISHLICENSE2_QUEST_SLOT),
                  new QuestNotStartedCondition(HouseSellerNPCBase.QUEST_SLOT)),
         ConversationStates.ATTENDING,
         "What do you want with an apartment on Athor when you're not even a good #fisherman? We are trying to attract owners who will spend time on the island. Come back when you have proved yourself a better fisherman.",
         null);
   
    // 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()
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.