Examples of DropItemAction


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

     */
    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
and ask for horse hair.
View Full Code Here

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

        ConversationStates.ATTENDING,
        "I know that the #'suntan cream' is hard to get, but I hope that you didn't forget my painful problem...",
        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));
   
View Full Code Here

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

      ConversationStates.ATTENDING, triggers,
      new AndCondition(new QuestInStateCondition(QUEST_SLOT, "start"), new PlayerHasItemWithHimCondition("pina colada")),
      ConversationStates.ATTENDING,
      null,
      new MultipleActions(
            new DropItemAction("pina colada"),
            new ChatAction() {
              public void fire(final Player player,
                  final Sentence sentence,
                  final EventRaiser npc) {
                int pieAmount = Rand.roll1D6() + 1;
View Full Code Here

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

            new QuestInStateCondition(QUEST_SLOT, "start"),
            new KilledCondition("dark elf archer", "dark elf captain", "thing"),
            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")));
   
View Full Code Here

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

  private void prepareBringingStep() {
    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) {
View Full Code Here

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

                 new PlayerHasItemWithHimCondition("twilight elixir")
                 ),
        ConversationStates.IDLE,   
        "Thank you!",       
        new MultipleActions(
                new DropItemAction("twilight elixir"),
                new SetQuestAction(mithrilcloak.getQuestSlot(), "taking_striped_cloak"),
                new TeleportAction("int_ados_sewing_room", 12, 20, Direction.DOWN)
                )
        );
View Full Code Here

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

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

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

            new PlayerHasItemWithHimCondition(FISH)),
        ConversationStates.IDLE,
        "You found the gem for the blade and the fish bone to make the handle! I'll start work right away. Come back in "
        + REQUIRED_MINUTES + " minutes.",
        new MultipleActions(
        new DropItemAction("obsidian"),
        new DropItemAction(FISH),
        new SetQuestAction(QUEST_SLOT, "forging;"),
        new SetQuestToTimeStampAction(QUEST_SLOT, 1)));

    // player says hi to NPC when equipped with the fish and the gem and
    // he's not killed a black dragon
View Full Code Here

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

  private void prepareForgingStep() {

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

    final List<ChatAction> startforging = new LinkedList<ChatAction>();
    startforging.add(new DropItemAction("goblet"));
    startforging.add(new DropItemAction("iron", 10));
    startforging.add(new IncreaseKarmaAction(5.0));
    startforging.add(new SetQuestAction(QUEST_SLOT, "forging;"));
    startforging.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
   
    // Player returned with goblet and had killed the vampire lord, and has iron, so offer to forge the sword.
View Full Code Here

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

        "Ok, I'll ask my mummy instead.",
        new SetQuestAndModifyKarmaAction(QUEST_SLOT, "rejected", -5.0));
   
    // 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));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.