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

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


  private void step5() {
    final SpeakerNPC npc = npcs.get("Lorenz")
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("egg"));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "jailed"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.ATTENDING, "egg",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "egg"),
View Full Code Here


  private void step8() {
    final SpeakerNPC npc = npcs.get("Lorenz")

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("barbarian armor"));
    reward.add(new IncreaseXPAction(50000));
    reward.add(new EquipItemAction("gold bar", 20));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(15));
   
    npc.add(ConversationStates.ATTENDING, "armor",
View Full Code Here

    final SpeakerNPC npc = npcs.get("Eonna");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new IncreaseKarmaAction(5.0));
    reward.add(new IncreaseXPAction(100));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // the player returns to Eonna after having started the quest.
    // Eonna checks if the player has killed one of each animal race.
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

        null);

    ChatAction completeAction = new  MultipleActions(
        new SetQuestAction(QUEST_SLOT, "done"),
        new SayTextAction("Thank you so much! Now I can start mixing the mixture which will hopefully keep me safe inside of my own house without the assassins and bandits comming up from downstairs. Here is an assassin dagger for you. I had to take it away from one of my students in the class once and now you can maybe fight and win against them."),
        new IncreaseXPAction(5000),
        new IncreaseKarmaAction(25),
        new EquipItemAction("assassin dagger", 1 ,true)
        );
    /* add triggers for the item names */
    final ItemCollection items = new ItemCollection();
View Full Code Here

    List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new ChangePlayerOutfitAction(balloonList[0], false, false));
    reward.add(new ChangePlayerOutfitAction(balloonList[1], false, false));
    reward.add(new ChangePlayerOutfitAction(balloonList[2], false, false));
    reward.add(new ChangePlayerOutfitAction(balloonList[3], false, false));
    reward.add(new IncreaseXPAction(200));
    reward.add(new IncreaseKarmaAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT,0,"done"));
    reward.add(new IncrementQuestAction(QUEST_SLOT,1,1));
   
    // The player has a balloon and gives it to Bobby
View Full Code Here

    final SpeakerNPC npc = npcs.get("Orc Saman");

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new EquipItemAction("club of thorns", 1, true));
    reward.add(new IncreaseKarmaAction(10.0));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // the player returns after having started the quest.
    // Saman checks if kill was made
    npc.add(ConversationStates.ATTENDING, "kill",
View Full Code Here

    potionactions.add(new DropItemAction("lilia",3));
    potionactions.add(new DropItemAction("kokuda"));
    potionactions.add(new DropItemAction("wine"));
    potionactions.add(new DropItemAction("black pearl"));
    potionactions.add(new EquipItemAction("love potion"));
    potionactions.add(new IncreaseXPAction(100));
    potionactions.add(new SetQuestAction(QUEST_SLOT, "gotpotion"));

    // don't make player wait for potion - could add this in later if wanted
    npc.add(ConversationStates.ATTENDING,  Arrays.asList("salva","potion"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "potion"),
View Full Code Here

    questTrigger.add(extraTrigger);

      final List<ChatAction> tookpotionactions = new LinkedList<ChatAction>();
    tookpotionactions.add(new DropItemAction("love potion"));
    tookpotionactions.add(new IncreaseKarmaAction(10.0));
    tookpotionactions.add(new IncreaseXPAction(1000));
    tookpotionactions.add(new SetQuestAction(QUEST_SLOT, "dragon"));

    npc.add(ConversationStates.ATTENDING, questTrigger,
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "gotpotion"),
        new PlayerHasItemWithHimCondition("love potion")),
View Full Code Here

      new AndCondition(new QuestStateStartsWithCondition(QUEST_SLOT, "reward"),
               // delay is in minutes, last parameter is argument of timestamp
               new TimePassedCondition(QUEST_SLOT,1,DELAY_IN_MINUTES)),
      ConversationStates.ATTENDING,
      "Thank you! To say thank you, I'd like to offer you the chance to always #buy #roach from me cheaply. I have so much of it and perhaps you have a use for it.",
      new MultipleActions(new SetQuestAction(QUEST_SLOT,"done"), new IncreaseXPAction(1000)));

  }
View Full Code Here

      answer + "Hey! I know what you're thinking, and I don't like it!",
      null);

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

    npc.add(ConversationStates.INFORMATION_6,
      ConversationPhrases.YES_MESSAGES,
      new QuestNotCompletedCondition(QUEST_SLOT),
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.