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

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


    final SpeakerNPC npc = npcs.get("Sally");
    // player has wood and tells sally, yes, it is for her
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("wood", REQUIRED_WOOD));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(10));
    reward.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        String rewardClass;
View Full Code Here


                  new KilledInSumForQuestCondition(QUEST_SLOT, 2, enemyForces.get(enemy).first())),
              ConversationStates.ATTENDING,
              null,
              new MultipleActions(
                  new RewardPlayerAction(),
                  new IncreaseXPAction(100000),
                  new IncrementQuestAction(QUEST_SLOT,3,1),
                  // empty the 2nd index as we use it later
                  new SetQuestAction(QUEST_SLOT,2,""),
                  new SetQuestToTimeStampAction(QUEST_SLOT,1),
                  new SetQuestAction(QUEST_SLOT,0,"done")));
View Full Code Here

          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            if (player.drop(itemName, REQUIRED_FOOD)) {
              npc.say("Great! You brought the " + itemName + "!");
            }
          } });
      reward.add(new IncreaseXPAction(1000));
      reward.add(new IncreaseKarmaAction(35.0));
      reward.add(new SetQuestAction(QUEST_SLOT, "food_brought"));

      npc.add(ConversationStates.ATTENDING,
        itemName,
View Full Code Here

            new PlayerHasItemWithHimCondition("blue book")),
        ConversationStates.IDLE,
        "Great! I think I'll read this for a while. Bye!",
        new MultipleActions(
            new DropItemAction("blue book"),
            new IncreaseXPAction(500),
            new SetQuestAction(QUEST_SLOT, "reading;"),
            new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

        ConversationStates.IDLE,
        null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "I haven't finished making the knife. Please check back in"));
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseXPAction(10000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new EquipItemAction("obsidian knife", 1, true));
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

        ConversationStates.IDLE, null,
        new SayTimeRemainingAction(QUEST_SLOT, 1, REQUIRED_MINUTES, "I haven't finished forging the sword. Please check back in" +
                ""));
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseXPAction(5000));
    reward.add(new IncreaseKarmaAction(15.0));
    // here true means: yes, bound to player, in which case we also have to speciy the amount: 1
    reward.add(new EquipItemAction("vampire sword", 1, true));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
View Full Code Here

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

        "That's how long,", "That's how long",
        "Thats how long,", "Thats how long"),
      ConversationStates.INFORMATION_4,
      "\"I will be your friend.\"", null);

    ChatAction reward = new MultipleActions(new IncreaseKarmaAction(10), new IncreaseXPAction(25), new SetQuestToYearAction("susi"));
    npc.add(ConversationStates.INFORMATION_4,
      "",
      new TriggerExactlyInListCondition("I will be your friend.", "I will be your friend"),
      ConversationStates.ATTENDING,
      "Yay! We are friends now.",
View Full Code Here

        new TriggerExactlyInListCondition("One is silver,", "One is silver"),
        ConversationStates.INFORMATION_8, "\"And the other gold.\"",
        null);

    // lowercase "and" is ignored, even in full match mode
    ChatAction reward = new MultipleActions(new IncreaseKarmaAction(15), new IncreaseXPAction(50), new SetQuestToYearAction("susi"));
    npc.add(ConversationStates.INFORMATION_8, "",
        new TriggerExactlyInListCondition("And the other gold.", "And the other gold", "the other gold.", "the other gold"),
        ConversationStates.ATTENDING,
        "Yay! We are even better friends now.",
        reward);
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.