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

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


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


    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(new EquipItemAction("potion", 3));
    actions.add(new IncreaseXPAction(100));
    actions.add(new SetQuestAction(QUEST_SLOT, "killed;1"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
   
    LinkedList<String> triggers = new LinkedList<String>();
    triggers.addAll(ConversationPhrases.FINISH_MESSAGES);
View Full Code Here


      "Luckily I haven't been robbed while you were away. I would be glad to receive a leather cuirass. Anyway, how can I #help you?",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new EquipItemAction("money", 80));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));

    final List<ChatAction> reward1 = new LinkedList<ChatAction>(reward);
    reward1.add(new DropItemAction("leather cuirass"));
View Full Code Here

    final SpeakerNPC npc = npcs.get("Anastasia");
    // player has fish soup and tells Anastasia, yes, it is for her
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("fish soup"));
    reward.add(new IncreaseXPAction(200));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(5));
    reward.add(new EquipItemAction("potion",10));
    reward.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
View Full Code Here

    // player got message from orb
    npc.add(ConversationStates.QUESTION_1,
      ConversationPhrases.YES_MESSAGES, null,
      ConversationStates.ATTENDING,
      "You're a natural! Now that you have learned to use that orb, it will teleport you to a place of magical significance. So don't use it unless you will be able to find your way back!",
      new MultipleActions(new IncreaseXPAction(50), new SetQuestAction(QUEST_SLOT, "done")));

    // player didn't get message, try again
    npc.add(ConversationStates.QUESTION_1, ConversationPhrases.NO_MESSAGES,
      null, ConversationStates.QUESTION_1,
      "Well, you would need to stand next to it. Move closer, do you get a message now?", null);
View Full Code Here

        ConversationStates.QUEST_ITEM_QUESTION,
        "Do you have 3 sandwiches, 3 bottles of beer and 3 glasses of wine?",
        null);
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(600));
    actions.add(new DropItemAction("sandwich",3));
    actions.add(new DropItemAction("beer",3));
    actions.add(new DropItemAction("wine",3));
    // the extra parts in the quest state are for wrvil and mrotho not to give them cloaks and armor twice
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "clothes;none;none", 2.0));   
View Full Code Here

        ConversationStates.ATTENDING,
        "So I can not give you the cloak! First the payment!",
        null);
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(200));
    actions.add(new DropItemAction("steel arrow",20));
    actions.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        final Item cloak = SingletonRepository.getEntityManager().getItem("dwarf cloak");
        cloak.setInfoString("Phalk");
View Full Code Here

        ConversationStates.ATTENDING,
        "Bah! I will not give you the armor without payment!",
        null);
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(200));
    actions.add(new DropItemAction("gold bar",20));
    actions.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        final Item armor = SingletonRepository.getEntityManager().getItem("golden armor");
        armor.setInfoString("Phalk");
View Full Code Here

 
  private void receiveClothes() {
  final SpeakerNPC npc = npcs.get("Phalk")
 
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(4000));
    actions.add(new DropInfostringItemAction("golden armor","Phalk"));
    actions.add(new DropInfostringItemAction("dwarf cloak","Phalk"));
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 5.0))
    actions.add(new EquipItemAction("dwarvish armor", 1, true));
   
View Full Code Here

      "can #start with the practical test.",
      new MultipleActions(
          new SetQuestAction(QUEST_SLOT,"candles_done"),
          new DropItemAction("beeswax", 6),
          new DropItemAction("iron", 2),
          new IncreaseXPAction(4000),
          new IncreaseKarmaAction(10)));

    // player returned after climbing the tower partially. reset status to candles done and start again
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
View Full Code Here

      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT,"last_step")),
      ConversationStates.ATTENDING,
      "Very well, adventurer! You have passed the practical test. You can now enter the spire whenever you want.",
      new MultipleActions(
        new IncreaseXPAction(5000),
        new IncreaseKarmaAction(10),
        new SetQuestAction(QUEST_SLOT, "done")));
  }
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.