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

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


    // Player has got ice cream and spoken to mummy
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("icecream"));
    reward.add(new EquipItemAction("present"));
    reward.add(new IncreaseXPAction(500));
    reward.add(new SetQuestAction(QUEST_SLOT, "eating;"));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
    reward.add(new IncreaseKarmaAction(10.0));
   
    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
View Full Code Here


          ConversationPhrases.GREETING_MESSAGES,
          new AndCondition(new GreetingMatchesNameCondition(mummyNPC.getName()),
              new QuestInStateCondition(QUEST_SLOT, "start")),
          ConversationStates.ATTENDING,
          "Hello, I see you've met my daughter Annie. I hope she wasn't too demanding. You seem like a nice person.",
          new SetQuestAction(QUEST_SLOT, "mummy"));

    // any other state
    mummyNPC.add(ConversationStates.IDLE,
          ConversationPhrases.GREETING_MESSAGES,
          new GreetingMatchesNameCondition(mummyNPC.getName()), true,
View Full Code Here

        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, WEEK_IN_MINUTES*2, "These monks learned their lesson for now but I could need your help again in"));
 

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

   
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "Thank you! Please kill 25 monks and 25 darkmonks in the name of my beloved wife.",
        new MultipleActions(actions));

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "That is a pity... Maybe you'll change your mind soon and help a sad man then.",
        new SetQuestAction(QUEST_SLOT, 0, "rejected"));
  }
View Full Code Here

    };

    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(addRandomNumberOfItemsAction);
    actions.add(new IncreaseXPAction(15000));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "killed"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncrementQuestAction(QUEST_SLOT,2,1));
   
    LinkedList<String> triggers = new LinkedList<String>();
    triggers.addAll(ConversationPhrases.FINISH_MESSAGES);
View Full Code Here

            new TimePassedCondition(QUEST_SLOT,1,REQUIRED_MINUTES)),
        ConversationStates.ATTENDING,
        "I'm pleased to say, your ring of life is fixed! It's good as new now.",
        new MultipleActions(
            new IncreaseXPAction(500),
            new SetQuestAction(QUEST_SLOT, "done"),
            new EquipItemAction("emerald ring", 1, true)));
   
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("emerald ring", "life", "emerald"),
        new AndCondition(new QuestStateStartsWithCondition(QUEST_SLOT, FORGING),
            new QuestStateStartsWithCondition(QUEST_SLOT, FORGING + "unbound"),
            new TimePassedCondition(QUEST_SLOT,1,REQUIRED_MINUTES)),
        ConversationStates.ATTENDING,
        "I'm pleased to say, your ring of life is fixed! It's good as new now.",
        new MultipleActions(
            new IncreaseXPAction(500),
            new SetQuestAction(QUEST_SLOT, "done"),
            new EquipItemAction("emerald ring", 1, false)));

    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("emerald ring", "life", "emerald"),
        new AndCondition(new QuestStateStartsWithCondition(QUEST_SLOT, FORGING),
View Full Code Here

        ConversationPhrases.YES_MESSAGES, null,
        ConversationStates.QUESTION_2, "Great, what did you bring?",
        null);

    ChatAction completeAction = new  MultipleActions(
        new SetQuestAction(QUEST_SLOT, "done"),
        new SayTextAction("Great! Now I can heal many people for free. Thanks a lot. Take this for your work."),
        new IncreaseXPAction(50),
        new IncreaseKarmaAction(5),
        new EquipItemAction("minor potion", 5)
        );
View Full Code Here

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES, null,
        ConversationStates.ATTENDING,
        "Great! Please go as quickly as you can. *sneeze*",
        new SetQuestAction(QUEST_SLOT, "start"));

    npc.add(ConversationStates.QUEST_OFFERED, ConversationPhrases.NO_MESSAGES, null,
        ConversationStates.ATTENDING,
        "Oh, please won't you change your mind? *sneeze*", null);

View Full Code Here

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

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new EquipItemAction("money", 10));
    processStep.add(new IncreaseXPAction(10));
    processStep.add(new SetQuestAction(QUEST_SLOT, "ilisa"));
   
    // starting the conversation the first time after getting a flask.
    // note Ilisa is spelled with a small i here because I
    // and l cannot be told apart in game
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

        "Medicine for #Tad? Didn't he tell you to bring a flask?", null);

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new DropItemAction("flask"));
    processStep.add(new IncreaseXPAction(10));
    processStep.add(new SetQuestAction(QUEST_SLOT, "corpse&herbs"));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "ilisa"),
            new PlayerHasItemWithHimCondition("flask")),
View Full Code Here

        "Can you fetch those #herbs for the #medicine?", null);

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new DropItemAction("arandula"));
    processStep.add(new IncreaseXPAction(50));
    processStep.add(new SetQuestAction(QUEST_SLOT, "potion"));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "corpse&herbs"),
            new PlayerHasItemWithHimCondition("arandula")),
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.