Examples of GreetingMatchesNameCondition


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

  }

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

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

 
  private void playerReturnsAfterCompletingQuest(final SpeakerNPC npc) {
    // after finishing the quest, just tell them to go away, and mean it.
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestCompletedCondition(QUEST_SLOT)),
        ConversationStates.IDLE,
        "Go away!",null);
  }
View Full Code Here

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

  }


  private void addGreetingDependingOnQuestState() {
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            noFriends),
        ConversationStates.ATTENDING,
        "Guess what, we are having another #Semos #Mine #Town #Revival #Weeks.", null);

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            anyFriends),
        ConversationStates.ATTENDING,
        null, new SayTextWithPlayerNameAction("Hello [name], nice to meet you again. "
            + "Guess what, we are having another #Semos #Mine #Town #Revival #Weeks."));
    // TODO: Tell old friends about renewal
View Full Code Here

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

      @Override
      protected void createDialog() {
        add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new GreetingMatchesNameCondition(getName()), true,
            ConversationStates.IDLE,
            "Hi, welcome to our small game of Tic Tac Toe. Your task is to fill a row "
            + "(vertical, horizontal, diagonal) with the same type of tokens. "
            + "You need an opponent to #play against.",
            null);
View Full Code Here

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

  private void prepareBringingStep() {
    final SpeakerNPC npc = npcs.get("Carmen");
 
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestActiveCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Hi again. I can #heal you, or if you brought me #ingredients I'll happily take those!",
        null);
View Full Code Here

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

    final SpeakerNPC npc = npcs.get("Mr. Yeti");

    // says hi without having started quest before
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestNotStartedCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Greetings stranger! Have you seen my snow sculptures? I need a #favor from someone friendly like you.",
        null);
   
    // says hi - got the snow yeti asked for
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new PlayerHasItemWithHimCondition("snowball", REQUIRED_SNOWBALLS)),
        ConversationStates.QUEST_ITEM_BROUGHT,
        "Greetings stranger! I see you have the snow I asked for. Are these snowballs for me?",
        null);

    // says hi - didn't get the snow yeti asked for
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new PlayerHasItemWithHimCondition("snowball", REQUIRED_SNOWBALLS))),
        ConversationStates.ATTENDING,
        "You're back already? Don't forget that you promised to collect a bunch of snowballs for me!",
        null);
   
    // says hi - quest was done before and is now repeatable
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES)),
        ConversationStates.ATTENDING,
        "Greetings again! Have you seen my latest snow sculptures? I need a #favor again ...",
        null);
   
    // says hi - quest was done before and is not yet repeatable
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new TimePassedCondition(QUEST_SLOT, REQUIRED_MINUTES))),
        ConversationStates.ATTENDING,
        null,
View Full Code Here

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

  private void createBringingStep() {
    final SpeakerNPC monogenes = npcs.get("Monogenes");

    monogenes.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(monogenes.getName()),
          new QuestInStateCondition(QUEST_SLOT, "start"),
          new PlayerHasItemWithHimCondition("leather helmet")),
      ConversationStates.QUEST_ITEM_BROUGHT,
      "Hey! Is that leather hat for me?", null);

    monogenes.add(ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(monogenes.getName()),
          new QuestInStateCondition(QUEST_SLOT, "start"),
          new NotCondition(new PlayerHasItemWithHimCondition("leather helmet"))),
      ConversationStates.ATTENDING,
      "Hey, my good friend, remember that leather hat I asked you about before? It's still pretty chilly here...",
      null);
View Full Code Here

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


    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestCompletedCondition(WEAPONSCOLLECTOR2_QUEST_SLOT),
          new QuestNotStartedCondition(QUEST_SLOT)),
      ConversationStates.ATTENDING,
      "Greetings old friend. I have another collecting #challenge for you.",
      null);
View Full Code Here

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

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

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

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

    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotCompletedCondition(QUEST_SLOT),
          new NotCondition(new PlayerHasItemWithHimCondition("teddy"))),
      ConversationStates.QUEST_OFFERED,
      "*cries* There were wolves in the #park! *sniff* I ran away, but I dropped my #teddy! Please will you get it for me? *sniff* Please?",
      null);
 
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.