Examples of QuestNotInStateCondition


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

        new AndCondition(new QuestNotStartedCondition(QUEST_SLOT), new SystemPropertyCondition("stendhal.minetown")),
      ConversationStates.ATTENDING, "Oh, that is a nice #quest.", null);
    npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
      new AndCondition(
          new QuestStartedCondition(QUEST_SLOT),
          new QuestNotInStateCondition(QUEST_SLOT, 0, "Fidorea"),
          new QuestNotInStateCondition(QUEST_SLOT, 0, "done"),
          new SystemPropertyCondition("stendhal.minetown")),
      ConversationStates.ATTENDING, "I guess you still have to talk to some people.", null);

    ChatAction reward = new MultipleActions(
      new IncreaseKarmaAction(15),
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,
      "Hello 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 fish soup for Hughie! Please hurry!",
      null);

    // first time player asks/ player had rejected
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.QUEST_MESSAGES,
        new QuestNotStartedCondition(QUEST_SLOT),
        ConversationStates.QUEST_OFFERED,
        "My poor boy is sick and the potions I give him aren't working! Please could you fetch him some fish soup?",
        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 Hughie is getting sick again! Please could you bring another bowl of fish soup? It helped last time.",
        null);

    // player returns - not 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,
        "Hughie is sleeping off his fever now and I'm hopeful he recovers. Thank you so much.",
        null);
   
    // player is willing to help
View Full Code Here

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

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new NotCondition(new NakedCondition()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "seen_naked")),
        ConversationStates.ATTENDING,
        null,
        new SayTextWithPlayerNameAction("Hi again, [name]."));

    npc.add(ConversationStates.ATTENDING, ConversationPhrases.NO_MESSAGES, new NakedCondition(),
View Full Code Here

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

        };
        npc.add(
                ConversationStates.ATTENDING,
                ConversationPhrases.QUEST_MESSAGES,
                new AndCondition(playerHasNoSheep,
                        new QuestNotInStateCondition(QUEST_SLOT, "start"),
                        new QuestNotInStateCondition(QUEST_SLOT, "handed_over"),
                        new QuestNotInStateCondition(QUEST_SLOT, "done")),
                ConversationStates.QUEST_OFFERED,
                "Lately I am very busy with all my sheep. " +
                "Would you be willing to take care of one of my sheep and hand it over to #Sato? " +
                "You only have to let it eat some red berries until it reaches a weight of " + Sheep.MAX_WEIGHT + ". " +
                "Would you do that?",
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.