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

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


            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotCompletedCondition("Zynn")),
            ConversationStates.INFORMATION_1,
            "Hi, potential reader! Here you can find records of the history of Semos, and lots of interesting facts about this island of Faiumoni. If you like, I can give you a quick introduction to its #geography and #history! I also keep up with the #news, so feel free to ask me about that.",
            new SetQuestAction("Zynn", "done"));
       
        addHelp("I can best help you by sharing my knowledge of Faiumoni's #geography and #history, as well as the latest #news.");
        addJob("I'm a historian and geographer, committed to writing down every objective fact about Faiumoni. Did you know I wrote most of the books in this library? Well, apart from \"Know How To Kill Creatures\", of course... Hayunn Naratha wrote that.");

        addQuest("I don't think there's really anything you could do for me right now. But thanks for asking!");
View Full Code Here


            null);
        
        // player wants to pay for previous item
        final List<ChatAction> payment = new LinkedList<ChatAction>();
        payment.add(new DropItemAction("money", COST));
        payment.add(new SetQuestAction(QUEST_SLOT, "done"));
        payment.add(new DecreaseKarmaAction(10));
        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.",
View Full Code Here

    // player is willing to collect
    npc.add(ConversationStates.QUEST_OFFERED,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.QUESTION_1,
      "You made a wise choice. Do you have anything I need already?",
      new SetQuestAction(QUEST_SLOT, ""));

    // player is not willing to help
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES, null,
        ConversationStates.ATTENDING,
View Full Code Here

      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("sandwich", FOOD_AMOUNT));
    reward.add(new IncreaseXPAction(150));
    reward.add(new SetQuestAction(QUEST_SLOT, "joshua"));
    reward.add(new IncreaseKarmaAction(15));

    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      new PlayerHasItemWithHimCondition("sandwich", FOOD_AMOUNT),
View Full Code Here

    // ideally, make it so that this slot being done means
    // you get a keyring object instead what we currently
    // have - a button in the settings panel
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new EnableFeatureAction("keyring"));   
    /** Complete the quest */
    npc.add(
      ConversationStates.ATTENDING, "Joshua",
      new QuestInStateCondition(QUEST_SLOT, "joshua"),
View Full Code Here

                    ConversationPhrases.GREETING_MESSAGES,
                    new AndCondition(new GreetingMatchesNameCondition(getName()),
                        new QuestNotCompletedCondition("Nomyr")),
                    ConversationStates.INFORMATION_1,
                    "Heh heh... Oh, hello stranger! You look a bit disoriented... d'you want to hear the latest gossip?",
                    new SetQuestAction("Nomyr", "done"));

                add(ConversationStates.ATTENDING,
                    ConversationPhrases.YES_MESSAGES,
                    null,
                    ConversationStates.INFORMATION_1,
View Full Code Here

      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
    npc.add(
      ConversationStates.ATTENDING,
View Full Code Here

                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() {

                  public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
View Full Code Here

            ConversationPhrases.GREETING_MESSAGES,
            new AndCondition(new GreetingMatchesNameCondition(getName()),
                new QuestNotStartedCondition("meet_hackim")),
                ConversationStates.ATTENDING,
                "Hi stranger, I'm Hackim Easso, the blacksmith's assistant. Have you come here to buy weapons?",
                new SetQuestAction("meet_hackim","start"));
       
        addGreeting(null, new SayTextWithPlayerNameAction("Hi again, [name]. How can I #help you this time?"));
       
        addHelp("I'm the blacksmith's assistant. Tell me... Have you come here to buy weapons?");
        addJob("I help Xoderos the blacksmith to make weapons for Deniran's army. I mostly only bring the coal for the fire and put the weapons up on the shelves. Sometimes, when Xoderos isn't looking, I like to use one of the swords to pretend I'm a famous adventurer!");
View Full Code Here

          // player before and react accordingly
        // NPC_name quest doesn't exist anywhere else neither is
        // used for any other purpose

        final List<ChatAction> actions = new LinkedList<ChatAction>();
        actions.add(new SetQuestAction(QUEST_SLOT, 0, "start"));
        actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, "rat", 0, 1));

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

TOP

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

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.