Examples of QuestActiveCondition


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

    final SpeakerNPC npc = npcs.get("Balduin");
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestActiveCondition(QUEST_SLOT)),
        ConversationStates.QUEST_ITEM_QUESTION,
        "Did you bring me that very rare item I asked you for?",
        null);
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT, "Hm, no, you don't have [item], don't try to fool me!"));
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Wow, it's incredible to see this close up! Many thanks. Now, perhaps we can #deal together.",
        new MultipleActions(new DropRecordedItemAction(QUEST_SLOT),
                  new SetQuestAction(QUEST_SLOT, "done"),
View Full Code Here

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

  }
 
  private void getQuest() {
    final SpeakerNPC npc = npcs.get("Mayor Chalmers");
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to fetch [item]"
            + ". Say #complete if you brought it!"));
   
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new TimePassedCondition(QUEST_SLOT,1,expireDelay)),
        ConversationStates.ATTENDING,
        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."));
View Full Code Here

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

    actions.add(new IncreaseXPDependentOnLevelAction(8, 90.0));
    actions.add(new IncreaseKarmaAction(10.0));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0)),
        ConversationStates.ATTENDING,
        "Good work! Let me thank you on behalf of the people of Ados!",
        new MultipleActions(actions));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You didn't fetch [item]"
            + " yet. Go and get it and say #complete only once you're done."));
View Full Code Here

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

  private void abortQuest() {
    final SpeakerNPC npc = npcs.get("Mayor Chalmers");
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.ABORT_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                  new TimePassedCondition(QUEST_SLOT,1,expireDelay)),
        ConversationStates.ATTENDING,
        null,
        // start quest again immediately
        startQuestAction());
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.ABORT_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                  new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        "It hasn't been long since you've started your quest, I won't let you give up so soon.",
        null);
   
View Full Code Here

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

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

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestActiveCondition(QUEST_SLOT),
          new PlayerHasItemWithHimCondition("beer")),
      ConversationStates.QUEST_ITEM_BROUGHT,
      "Hey! Is that beer for me?", null);

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestActiveCondition(QUEST_SLOT),
          new NotCondition(new PlayerHasItemWithHimCondition("beer"))),
      ConversationStates.ATTENDING,
      "Hey, I'm still waiting for that beer, remember? Anyway, what can I do for you?",
      null);
View Full Code Here

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

        null);
   
    // shouldn't happen
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestActiveCondition(QUEST_SLOT),
        ConversationStates.ATTENDING,
        "Thanks for stopping by. Come again.",
        null);
   
    npc.add(ConversationStates.QUEST_OFFERED,
View Full Code Here

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

  }
 
  private void getQuest() {
    final SpeakerNPC npc = npcs.get("Hazel");
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to bring the museum [item]"
            + ". Please say #complete if you have it with you."));
   
    npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new TimePassedCondition(QUEST_SLOT,1,expireDelay)),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You're already on a quest to bring the museum [item]"
            + ". Please say #complete if you have it with you. But, perhaps that is now too rare an item. I can give you #another task, or you can return with what I first asked you."));
View Full Code Here

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

      }
    });
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0)),
        ConversationStates.ATTENDING,
        null,
        new MultipleActions(actions));
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                 new NotCondition(new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT,0))),
        ConversationStates.ATTENDING,
        null,
        new SayRequiredItemAction(QUEST_SLOT,0,"You don't seem to have [item]"
            + " with you. Please get it and say #complete only then."));
View Full Code Here

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

  private void abortQuest() {
    final SpeakerNPC npc = npcs.get("Hazel");
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.ABORT_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                  new TimePassedCondition(QUEST_SLOT,1,expireDelay)),
        ConversationStates.ATTENDING,
        null,
        startQuestAction());
   
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.ABORT_MESSAGES,
        new AndCondition(new QuestActiveCondition(QUEST_SLOT),
                  new NotCondition(new TimePassedCondition(QUEST_SLOT,1,expireDelay))),
        ConversationStates.ATTENDING,
        "It hasn't been long since you've started your quest, you shouldn't give up so soon.",
        null);
   
View Full Code Here

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

      "I feel so lonely. I only ever see creatures and alive people. If I knew about #spirits like me, I would feel better.",
      null);

    npc.add(ConversationStates.ATTENDING,
      ConversationPhrases.QUEST_MESSAGES,
      new QuestActiveCondition(QUEST_SLOT),
      ConversationStates.ATTENDING,
      "I want help to find other spirits like me. Please find them, then come back and tell me their names.",
      null);

    npc.add(ConversationStates.ATTENDING,
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.