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

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


            new NotCondition(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, 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"),
View Full Code Here


        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)
        );

    /* add triggers for the item names */
 
View Full Code Here

   
    final SpeakerNPC npc = npcs.get("Mr. Yeti");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("snowball", REQUIRED_SNOWBALLS));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(15));
    // player gets either cod or perch, which we don't have a standard action for
    // and the npc says the name of the reward, too
    reward.add(new ChatAction() {
View Full Code Here

  private void step_3() {
    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
View Full Code Here

        ConversationStates.ATTENDING,
        "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"),
View Full Code Here

        ConversationStates.ATTENDING,
        "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"),
View Full Code Here

                ConversationStates.ATTENDING,
                "*cough* I hope #ilisa hurries with my medicine...",
                null);

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new IncreaseXPAction(200));
    processStep.add(new SetQuestAction(QUEST_SLOT, "done"));
   
    // 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

      "Hey, my good friend, remember that leather hat I asked you about before? It's still pretty chilly here...",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("leather helmet"));
    reward.add(new IncreaseXPAction(50));
    reward.add(new IncreaseKarmaAction(10));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // make sure the player isn't cheating by putting the
    // helmet away and then saying "yes"
View Full Code Here

                new PlayerHasRecordedItemWithHimCondition(QUEST_SLOT)),
        ConversationStates.ATTENDING,
        "Wow, it's incredible to see this close up! Many thanks. Now, perhaps we can #deal together.",
        new MultipleActions(new DropRecordedItemAction(QUEST_SLOT),
                  new SetQuestAction(QUEST_SLOT, "done"),
                  new IncreaseXPAction(100000)));
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.ATTENDING,
View Full Code Here

  private void step_3() {
    final SpeakerNPC npc = npcs.get("Plink");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("teddy"));
    reward.add(new IncreaseXPAction(20));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
View Full Code Here

TOP

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

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.