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

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


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

    /** Complete the quest */
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("gold bar", GOLD_AMOUNT));
    reward.add(new EquipItemAction("nalwor bank key", 1, true));
    reward.add(new IncreaseXPAction(200));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
View Full Code Here


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


    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(new EquipItemAction("greater potion", 10));
    actions.add(new IncreaseXPAction(5000));
    actions.add(new SetQuestAction(QUEST_SLOT, "killed;1"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncreaseKarmaAction(10.0));
View Full Code Here

   
    // Player has got water and it has been checked
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    // make sure we drop the checked water not any other water
    reward.add(new DropInfostringItemAction("water", CLEAN_WATER_INFOSTRING));
    reward.add(new EquipItemAction("potion", 3));
    reward.add(new IncreaseXPAction(100));
    reward.add(new IncrementQuestAction(QUEST_SLOT, 2, 1) );
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT,1));
    reward.add(new SetQuestAction(QUEST_SLOT, 0, "done"));
    reward.add(new IncreaseKarmaAction(5.0));
View Full Code Here

        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "done")),
        ConversationStates.ATTENDING,
        "Oh! I didn't reward you for helping me again! Here, take these boots. I think they're gorgeous but they don't fit me :(",
        new MultipleActions(new EquipItemAction("killer boots", 1, true), new SetQuestAction(QUEST_SLOT, "done;rewarded")));
 
    //     player returns after finishing the quest and was rewarded
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
View Full Code Here

    ChatAction reward = new MultipleActions(
      new IncreaseKarmaAction(15),
      new IncreaseXPAction(400),
      new SetQuestAction(QUEST_SLOT, 0, "done"),
      new EquipItemAction("empty scroll", 5),
      new SetHallOfFameToAgeDiffAction(QUEST_SLOT, 1, "P"),
      loadSignFromHallOfFame);
 
    npc.add(ConversationStates.ATTENDING, Arrays.asList("paper", "chase"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "Fidorea"), new SystemPropertyCondition("stendhal.minetown")),
View Full Code Here

      null);

    final String answer = "Guessed who supplies Xin Blanca with the weapons he sells? Well, it's me! I have to avoid raising suspicion, though, so I can only smuggle him small weapons. If you want something more powerful, you'll have to venture into the dungeons and kill some of the creatures there for items.\n";

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new EquipItemAction("money", 5));
    reward.add(new IncreaseXPAction(10));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
   
    npc.add(ConversationStates.INFORMATION_3,
        Arrays.asList("buy", "sell", "offer", "sell studded shield"),
View Full Code Here

    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",
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "armor"),
View Full Code Here

    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();
    items.addFromQuestStateString(NEEDED_ITEMS);
    for (final Map.Entry<String, Integer> item : items.entrySet()) {
View Full Code Here

      "Saman has revenged! dis Good!",
      null);


    final List<ChatAction> start = new LinkedList<ChatAction>();
    start.add(new EquipItemAction("kotoch prison key", 1, true));
    start.add(new IncreaseKarmaAction(6.0));
    start.add(new SetQuestAction(QUEST_SLOT, 0, "start"));
    start.add(new StartRecordingKillsAction(QUEST_SLOT, 1, "mountain orc chief", 0, 1));

View Full Code Here

  private void step_3() {

    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.
View Full Code Here

TOP

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

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.