Examples of QuestNotInStateCondition


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

    final SpeakerNPC henry = npcs.get("Henry");

    henry.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT),
               new QuestNotInStateCondition(QUEST_SLOT,"map")),
      ConversationStates.QUEST_OFFERED,
      "Find my #group, Peter, Tom, and Charles, prove it and I will reward you. Will you do it?",
      null);
   
    henry.add(ConversationStates.ATTENDING,
View Full Code Here

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

   
    // first conversation with Elisabeth.
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.ATTENDING,
        "I can't remember when I smelt the good taste of #chocolate the last time...",
        null);
   
    npc.addReply("chocolate", "My mom told me, that chocolate can be found in an assassin school, which is quite #dangerous. She said also that someone sells it in Ados...");
   
    npc.addReply("dangerous", "Some bandits wait on the road to the school and assassins guard the way there, so mom and I have to stay in Kirdneh because it's safe here...");
   
    // 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("chocolate bar")),
        ConversationStates.IDLE,
        "My mum wants to know who I was asking for chocolate from now :(",
        null);
   
    // player didn't get chocolate, meanie
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"), new NotCondition(new PlayerHasItemWithHimCondition("chocolate bar"))),
        ConversationStates.ATTENDING,
        "I hope that someone will bring me some chocolate soon...:(",
        null);
   
    // player got chocolate and spoke to mummy
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"), new PlayerHasItemWithHimCondition("chocolate bar")),
        ConversationStates.QUESTION_1,
        "Awesome! Is that chocolate for me?",
        null);
   
    // player spoke to mummy and hasn't got chocolate
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "mummy"), new NotCondition(new PlayerHasItemWithHimCondition("chocolate bar"))),
        ConversationStates.ATTENDING,
        "I hope that someone will bring me some chocolate soon...:(",
        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
View Full Code Here

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

        });

    // explanations
    npc.add(ConversationStates.ATTENDING,
        "enemy",
        new QuestNotInStateCondition(QUEST_SLOT, 0, "start"),
        ConversationStates.ATTENDING,
        "Yes, my enemies are everywhere, they want to kill me! I guess you are one of them. Stay away from me!",
        null);

    // checking for kills
View Full Code Here

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

        "Did you forget that you promised me to ask the #lifeguards for #'suntan cream'?",
        null);
   
    zara.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "rejected")),
        ConversationStates.QUEST_OFFERED,
        "I fell asleep in the sun and now my skin is burnt. Can you bring me the magic #'suntan cream' that the #lifeguards produce?",
        null);
   
    zara.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

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

      "You don't have any drink I like yet. Go, and you better get an exotic one!",
      null);

    npc.add(
      ConversationStates.ATTENDING, triggers,
      new QuestNotInStateCondition(QUEST_SLOT, "start"),
      ConversationStates.ATTENDING,
      "Sometime you could do me a #favour ...", null);

  }
View Full Code Here

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

    return player.hasQuest(QUEST_SLOT) && !"start".equals(player.getQuest(QUEST_SLOT)) && !"rejected".equals(player.getQuest(QUEST_SLOT));
  }

  @Override
  public boolean isRepeatable(final Player player) {
    return new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES)).fire(player, null, null);
  }
View Full Code Here

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

    // 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
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES)),
        ConversationStates.QUEST_OFFERED,
        "My campfire needs wood again! Could you please get some from the forest for me? I need ten pieces.",
        null);

    // player returns - enough time has passed
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "start"), new QuestStartedCondition(QUEST_SLOT), new NotCondition(new TimePassedCondition(QUEST_SLOT,REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
        new SayTimeRemainingAction(QUEST_SLOT,REQUIRED_MINUTES,"Thanks, but I think the wood you brought me already will last me another"));
   
    // player is willing to help
View Full Code Here

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

        null);
   
    // any other state than above
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT), new QuestNotInStateCondition(QUEST_SLOT, "food_brought")),
        ConversationStates.ATTENDING,
        "I'm sure I asked you to do something for me, already.",
        null);
           
View Full Code Here

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

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

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

                            new QuestCompletedCondition("plinks_toy"),
                            // Anna, in Ados
                            new QuestCompletedCondition("toys_collector"),
                            // Sally, Orril River
                            // 'completed' doesn't work for Sally - return player.hasQuest(QUEST_SLOT) && !"start".equals(player.getQuest(QUEST_SLOT)) && !"rejected".equals(player.getQuest(QUEST_SLOT));
                            new AndCondition(new QuestActiveCondition("campfire"), new QuestNotInStateCondition("campfire", "start")),
                            // Annie, Kalavan city gardens
                            new QuestStateStartsWithCondition("icecream_for_annie","eating;"),
                            // Elisabeth, Kirdneh
                            new QuestStateStartsWithCondition("chocolate_for_elisabeth","eating;"),
                            // Jef, Kirdneh
                            new QuestCompletedCondition("find_jefs_mom"),
                            // Hughie, Ados farmhouse
                            new AndCondition(new QuestActiveCondition("fishsoup_for_hughie"), new QuestNotInStateCondition("fishsoup_for_hughie", "start")))));

    // quests about finding people
    achievements.add(createAchievement("friend.quests.find", "Private Detective", "Find all lost and hidden people",
                        Achievement.HARD_BASE_SCORE, true,
                        new AndCondition(
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.