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

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


        "Wow, Pedinghaus really outdid himself this time. It looks wonderful on your new cloak! Wear it with pride.",
        new MultipleActions(
                   new DropItemAction("mithril clasp"),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "done", 10.0),
                   new EquipItemAction("mithril cloak", 1, true),
                   new IncreaseXPAction(1000)
                   )
        );

    // remind about getting clasp
    npc.add(ConversationStates.ATTENDING,
View Full Code Here


    /** Complete the quest */
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("black book"));
    reward.add(new EquipItemAction("money", 50));
    reward.add(new IncreaseXPAction(100));
    reward.add(new IncreaseKarmaAction(10.0));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

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

        reward.setQuantity(1);
        player.equipOrPutOnGround(reward);
        player.notifyWorldAboutChanges();
      }
    });
    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

          new PlayerHasRecordedItemWithHimCondition(mithrilcloak.getQuestSlot(),1),
          ConversationStates.QUEST_2_OFFERED,
          "Thank you so much! Listen, I must repay the favour, and I have a wonderful idea. Do you want to hear more?",
          new MultipleActions(new DropRecordedItemAction(mithrilcloak.getQuestSlot(),1),
              new SetQuestAction(mithrilcloak.getQuestSlot(), "fixed_machine"),
              new IncreaseXPAction(100)));
     
      // we stored the needed part name as part of the quest slot
      npc.add(ConversationStates.QUEST_ITEM_QUESTION,
          ConversationPhrases.YES_MESSAGES,
          new NotCondition(new PlayerHasRecordedItemWithHimCondition(mithrilcloak.getQuestSlot(),1)),
View Full Code Here

        ConversationStates.ATTENDING,
        "You brought those magical scissors! Excellent! Now that I can cut the fabric I need a magical needle. You can buy one from a trader in the abandoned keep of Ados mountains, #Ritati Dragon something or other. Just go to him and ask for his 'specials'.",
        new MultipleActions(
                   new DropItemAction("magical scissors"),
                   new SetQuestAndModifyKarmaAction(mithrilcloak.getQuestSlot(), "need_needle;", 10.0),
                   new IncreaseXPAction(100)
                   )
        );

    // remind about scissors
    npc.add(ConversationStates.ATTENDING,
View Full Code Here

     * These actions are part of the reward
     */
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new EquipItemAction("scale armor", 1, true));
    reward.add(new EquipItemAction("chain legs", 1, true));
    reward.add(new IncreaseXPAction(100));
    reward.add(new DropItemAction("horse hair"));
    reward.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 10.0));
   
    /*
     * Player asks about horse hair, and has collected some - take it
View Full Code Here

        null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("suntan cream"));
    reward.add(new EquipItemAction("small key", 1, true));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(15));
   
    zara.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
View Full Code Here

        ConversationStates.ATTENDING,
        "OK. I understand. I'm scared of the #dwarves myself.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(2500));
    actions.add(new DropInfostringItemAction("leather legs","tom"));
    actions.add(new DropInfostringItemAction("scale armor","peter"));
    actions.add(new IncreaseKarmaAction(15.0))
    actions.add(new GiveMapAction(false));
   
View Full Code Here

      "He was a good soldier and fought bravely.");
    james.addReply(Arrays.asList("kingdom", "kanmararn"),
      "Kanmararn, the legendary kingdom of the #dwarves.");

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(5000));
    actions.add(new DropInfostringItemAction("map","Henry"));
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "done", 15.0))
    actions.add(new EquipItemAction("steel boots", 1, true));
   
    james.add(ConversationStates.ATTENDING,
View Full Code Here

            new PlayerHasItemWithHimCondition("amulet"))
        , ConversationStates.ATTENDING
        , "Many, many thanks. I am relieved to have that back. Here, take this ring. It can revive the powers of the dead.",
        new MultipleActions(new DropItemAction("amulet"),
            new EquipItemAction("emerald ring", 1, true),
            new IncreaseXPAction(10000),
            new IncreaseKarmaAction(5.0),
            new SetQuestAction(QUEST_SLOT, "done")));
   
   
    // support for new-style quest
   
    // building string for completed quest state
    StringBuilder sb = new StringBuilder("started");
    for(int i=0;i<creatures.size();i++) {
      sb.append(";");
      sb.append(creatures.get(i));
    }
    final String completedQuestState = sb.toString();
   
    // the player returns to Maerion after having started the quest.
    // Maerion checks if the player has killed one of enough dark elf types
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT,0,"started"),
            new NotCondition(
                new QuestInStateCondition(QUEST_SLOT, completedQuestState))),
        ConversationStates.QUEST_STARTED,
        "Don't you remember promising to sort out my dark elf problem?"+
        " Kill every dark elf in the #secret room below - especially"+
        " the ones who command, do magic or are archers." +
        "  Don't forget the evil matronmother too."+
        " And bring me the amulet from the mutant thing.",
        new ExamineChatAction("dark-elves-wanted.png", "Wanted!", ""));
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, completedQuestState),
            new NotCondition(
                new PlayerHasItemWithHimCondition("amulet")))
        , ConversationStates.QUEST_STARTED
        , "What happened to the amulet? Remember I need it back!"
        , null);
 
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, completedQuestState),                  
            new PlayerHasItemWithHimCondition("amulet"))
        , ConversationStates.ATTENDING
        , "Many, many thanks. I am relieved to have that back. Here, take this ring. It can revive the powers of the dead.",
        new MultipleActions(new DropItemAction("amulet"),
            new EquipItemAction("emerald ring", 1, true),
            new IncreaseXPAction(10000),
            new IncreaseKarmaAction(5.0),
            new SetQuestAction(QUEST_SLOT, "done")));
   
    npc.add(
      ConversationStates.QUEST_STARTED,
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.