Package games.stendhal.server.entity.npc.action

Examples of games.stendhal.server.entity.npc.action.MultipleActions


        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT, 0, "start"),
            new KilledForQuestCondition(QUEST_SLOT, 1)),
        ConversationStates.ATTENDING,
        "Brilliant! You killed some of these ugly creatures as I see! Hopefully they'll not return that fast or we will still not have the chance to explore some places."  + " Please take these greater potions as a reward for your help.",
        new MultipleActions(actions));

    npc.add(ConversationStates.ATTENDING,
        triggers,
        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT, 0, "start"),
View Full Code Here


        add(ConversationStates.QUESTION_1,
            ConversationPhrases.YES_MESSAGES,
            new PlayerHasItemWithHimCondition("money", COST)
            ConversationStates.ATTENDING,
            "Thanks. Just let me know if you want to #borrow any tools again.",
            new MultipleActions(payment));
        
        // player already has borrowed something and wants to return it
        final List<ChatAction> returnitem = new LinkedList<ChatAction>();
        returnitem.add(new DropRecordedItemAction(QUEST_SLOT));
        returnitem.add(new SetQuestAction(QUEST_SLOT, "done"));
        add(ConversationStates.QUESTION_2,
            ConversationPhrases.YES_MESSAGES,
            new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT)
            ConversationStates.ATTENDING,
            "Thank you! Just let me know if you want to #borrow any tools again.",
            new MultipleActions(returnitem));
        
        // don't want to pay for it now
        add(ConversationStates.QUESTION_1,
            ConversationPhrases.NO_MESSAGES,
            null, 
View Full Code Here

    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasItemWithHimCondition("sandwich", FOOD_AMOUNT),
      ConversationStates.ATTENDING,
      "Thank you! Please let Xoderos know that I am fine. Say my name, Joshua, so he knows that you saw me. He will probably give you something in return.",
      new MultipleActions(reward));

    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new NotCondition(new PlayerHasItemWithHimCondition("sandwich", FOOD_AMOUNT)),
      ConversationStates.ATTENDING, "Hey! Where did you put the sandwiches?", null);
View Full Code Here

    npc.add(
      ConversationStates.ATTENDING, "Joshua",
      new QuestInStateCondition(QUEST_SLOT, "joshua"),
      ConversationStates.ATTENDING,
      "I'm glad Joshua is well. Now, what can I do for you? I know, I'll fix that broken key ring that you're carrying ... there, it should work now!",
      new MultipleActions(reward));
  }
View Full Code Here

    // player gets a little karma bonus
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Wonderful! You must have good #karma.",
      new MultipleActions(
          new IncreaseKarmaAction(5.0),
          new SetQuestAction(QUEST_SLOT, "done"),
          new EnableFeatureAction("karma_indicator")));

    // player is not willing to help other people
    // player gets a little karma removed
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.NO_MESSAGES, null,
      ConversationStates.ATTENDING,
      "I knew it ... you probably have bad #karma.",
      new MultipleActions(
          new DecreaseKarmaAction(10.0),
          new SetQuestAction(QUEST_SLOT, "done"),
          new EnableFeatureAction("karma_indicator")));

    // player wants to know what karma is
View Full Code Here

            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition("meet_io")),
            ConversationStates.ATTENDING,
                null,
                new MultipleActions(
                    new SayTextWithPlayerNameAction("I awaited you, [name]. How do I know your name? Easy, I'm Io Flotto, the telepath. Do you want me to show you the six basic elements of telepathy?"),
                    new SetQuestAction("meet_io", "start")));

        add(ConversationStates.QUESTION_1, ConversationPhrases.YES_MESSAGES, null, ConversationStates.ATTENDING,
                null, new ChatAction() {
View Full Code Here

        addReply("trading", "To start a trade with another player, right-click on them and select 'Trade'. If they also want to trade with you, you'll see a window pop up where you can drag items to offer, and see what is being offered to you. Both click Offer, and then you both need to Accept the offer to complete the trade.");
        addJob("I'm the Customer Advisor here at Semos Bank.");
        addOffer("If you wish to access your personal chest in solitude, I can give you access to a private #vault. A guidebook inside will explain how it works.");   
        addGoodbye("It was a pleasure to serve you.");
        add(ConversationStates.ANY, "vault", new QuestCompletedCondition("armor_dagobert"), ConversationStates.IDLE, null,
            new MultipleActions(new PlaySoundAction("keys-1", true), new VaultChatAction()));
       
        add(ConversationStates.ANY, "vault", new QuestNotCompletedCondition("armor_dagobert"), ConversationStates.ATTENDING, "Perhaps you could do a #favour for me, and then I will tell you more about the private banking vaults.", null);
       
        // remaining behaviour defined in games.stendhal.server.maps.quests.ArmorForDagobert 
      }
View Full Code Here

            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition(QUEST_SLOT)),
            ConversationStates.ATTENDING,
                "Hi. I bet you've been sent here to learn about adventuring from me. First, lets see what you're made of. Go and kill a rat outside, you should be able to find one easily. Do you want to learn how to attack it, before you go?",
            new MultipleActions(actions));

           add(ConversationStates.IDLE,
            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestCompletedCondition(QUEST_SLOT),
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.IDLE,
        "Well, that's not very charitable.",
        new MultipleActions(
            new SetQuestAction(QUEST_SLOT, 0, "rejected"),
            new DecreaseKarmaAction(5.0)));
  }
View Full Code Here

          Arrays.asList("water", "clean", "check"),
          new PlayerHasItemWithHimCondition("water"),
          ConversationStates.ATTENDING,
          "That water looks clean to me! It must be from a pure source.",
          // take the item and give them a new one with an infostring or mark all?
          new MultipleActions(actions));
   
    // player asks about water but doesn't have it with them
    waterNPC.add(ConversationStates.ATTENDING,
          Arrays.asList("water", "clean", "check"),
          new NotCondition(new PlayerHasItemWithHimCondition("water")),
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.action.MultipleActions

Copyright © 2018 www.massapicom. 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.