Examples of QuestStateStartsWithCondition


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

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

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

  }

  private void playerReturnsToFetchReward(SpeakerNPC npc) {
    // time has passed
    final ChatCondition condition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
            new TimePassedCondition(QUEST_SLOT, 1, 5)
          );
    final ChatAction action = new MultipleActions(
                      new SetQuestAction(QUEST_SLOT,"done"),
                      new IncreaseKarmaAction(20),
                      new IncreaseXPAction(10000),
                      // here, true = bind them to player
                      new EquipItemAction("black legs", 1, true)
                    );
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        condition,
        ConversationStates.IDLE,
        "Here are the black legs. Now I beg you to wear them. The symbol of my pain is done. Fare thee well.",
        action);
   
    // time has not yet passed
    final ChatCondition notCondition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
        new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
        new NotCondition( new TimePassedCondition(QUEST_SLOT, 1, 5))
      );
    ChatAction reply = new SayTimeRemainingAction(QUEST_SLOT, 1, 5, "I did not finish decorating the legs. " +
            "Please check back in");
    npc.add(ConversationStates.IDLE,
View Full Code Here

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

        reply);
  }
 
  private void playerReturnsAfterKillingTheImperialScientist(SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new QuestStateStartsWithCondition(QUEST_SLOT, "kill_scientist"),
        new KilledForQuestCondition(QUEST_SLOT, 1),
        new PlayerHasItemWithHimCondition("goblet")
      );
    ChatAction action = new MultipleActions(
                    new SetQuestAction(QUEST_SLOT, "decorating;"),
View Full Code Here

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

  private void playerReturnsWithoutKillingTheImperialScientistOrWithoutGoblet(
      SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new GreetingMatchesNameCondition(npc.getName()),
        new QuestStateStartsWithCondition(QUEST_SLOT, "kill_scientist"),
        new NotCondition(
            new AndCondition(
                    new KilledForQuestCondition(QUEST_SLOT, 1),
                    new PlayerHasItemWithHimCondition("goblet")))
      );
View Full Code Here

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

        null);
  }
 
  private void playerReturnsWithLetter(final SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new QuestStateStartsWithCondition(QUEST_SLOT, "find_vera"),
        new PlayerHasItemWithHimCondition("note")
      );
   
    final ChatAction action = new MultipleActions(
          new SetQuestAction(QUEST_SLOT, 0, "kill_scientist"),
View Full Code Here

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

        null);
  }
 
  private void playerReturnsWithoutLetter(final SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
        new QuestStateStartsWithCondition(QUEST_SLOT, "find_vera"),
        new NotCondition(new PlayerHasItemWithHimCondition("note"))
      );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        condition,
        ConversationStates.IDLE,
View Full Code Here

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

        item.setBoundTo(player.getName());
        player.equipOrPutOnGround(item);
      }
    };
    npc.add(ConversationStates.ATTENDING, "Vera",
        new QuestStateStartsWithCondition(QUEST_SLOT, "find_vera"),
        ConversationStates.ATTENDING,
        "What? How do you know her? Well it is a sad story." +
        " She was picking arandula for Ilisa (they were friends)" +
        " and she saw the catacombs entrance. 3 months later a" +
        " young hero saw her, and she was a vampirette. What a" +
View Full Code Here

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

        action);
  }

  private void playerReturnsAfterGivingWhenFinished(final SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new QuestStateStartsWithCondition(QUEST_SLOT, "making;"),
        new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES)
      );
    final ChatAction action = new SetQuestAction(QUEST_SLOT,"find_vera");
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
View Full Code Here

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

        null);
  }

  private void playerReturnsAfterGivingTooEarly(final SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
        new QuestStateStartsWithCondition(QUEST_SLOT, "making;"),
        new NotCondition(new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES))
      );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        condition,
        ConversationStates.IDLE,
View Full Code Here

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

   */
  private AndCondition getConditionForBeingInCollectionPhase() {
    return new AndCondition(
                          new QuestActiveCondition(QUEST_SLOT),
                          new NotCondition(
                              new QuestStateStartsWithCondition(QUEST_SLOT,"making;")
                                  ),
                          new NotCondition(
                              new QuestStateStartsWithCondition(QUEST_SLOT,"decorating;")
                                  ),
                          new NotCondition(
                              new QuestStateStartsWithCondition(QUEST_SLOT,"find_vera")
                                  ),
                          new NotCondition(
                              new QuestStateStartsWithCondition(QUEST_SLOT,"kill_scientist")
                                  ),
                          new NotCondition(
                              new QuestStateStartsWithCondition(QUEST_SLOT,"legs")
                                          )
                              );
  }
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.