Examples of DropItemAction


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

      );
   
    final ChatAction action = new MultipleActions(
          new SetQuestAction(QUEST_SLOT, 0, "kill_scientist"),
          new StartRecordingKillsAction(QUEST_SLOT, 1, "Sergej Elos", 0, 1),
          new DropItemAction("note")
        );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
        ConversationStates.INFORMATION_2,
        "Hello! Do you have anything for me?",
View Full Code Here

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

                new PlayerHasItemWithHimCondition("shadow legs")
                );
  final ChatAction action = new MultipleActions(
  new SetQuestAction(QUEST_SLOT,"making;"),
  new SetQuestToTimeStampAction(QUEST_SLOT, 1),
  new DropItemAction("shadow legs"));
  npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      legscondition,
      ConversationStates.IDLE,
      "The shadow legs! Wonderful! I will start my work. I can do this in very little time with the help of technology! "
      "Please come back in 20 minutes.",
View Full Code Here

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

    };
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("flower", "zantedeschia", "fine", "amber", "done"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "found_mom"), new PlayerHasItemWithHimCondition("zantedeschia")),
        ConversationStates.ATTENDING, null,
        new MultipleActions(new DropItemAction("zantedeschia"),
                                    new IncreaseXPAction(5000),
                                    new IncreaseKarmaAction(15),
                  addRandomNumberOfItemsAction,                      
                  new IncrementQuestAction(QUEST_SLOT, 2, 1),
                  new SetQuestToTimeStampAction(QUEST_SLOT,1),
View Full Code Here

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

    };
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("flower", "Rhosyd"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "got_flower"), new PlayerHasItemWithHimCondition("rhosyd")),
        ConversationStates.ATTENDING, null,
        new MultipleActions(new DropItemAction("rhosyd"),
                                    new IncreaseXPAction(5000),
                                    new IncreaseKarmaAction(15),
                  addRandomNumberOfItemsAction,
                  new SetQuestAction(QUEST_SLOT, 0, "flower_brought"),
                  new IncrementQuestAction(QUEST_SLOT, 2, 1)));
View Full Code Here

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

    npc.add(ConversationStates.QUESTION_1,
        ConversationPhrases.YES_MESSAGES,
        new AndCondition(new QuestNotInStateCondition(QUEST_SLOT, "1"), new PlayerHasItemWithHimCondition("blue elf cloak")),
        ConversationStates.QUESTION_1, null,
        new MultipleActions(
            new DropItemAction("blue elf cloak"),
            new ChatAction() {
              public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
                // find out how many cloaks the player still has to
                // bring. incase something has gone wrong and we can't parse the slot, assume it was just started
                final int toBring = MathHelper.parseIntDefault(player.getQuest(QUEST_SLOT),  REQUIRED_CLOAKS) -1;

                player.setQuest(QUEST_SLOT,
                    Integer.toString(toBring));
                raiser.say("Thank you very much! Do you have another one? I still need "
                    + Grammar.quantityplnoun(toBring,
                        "cloak", "one") + ".");

              }
            }));
   
    // player says he has a blue elf cloak with him and it's the last one
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("blue elf cloak"));
    reward.add(new EquipItemAction("golden shield", 1, true));
    reward.add(new IncreaseXPAction(15000));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(25));
    npc.add(ConversationStates.QUESTION_1,
View Full Code Here

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

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

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

            "You didn't return what I last lent you! Do you want to return it now?",
            null);
        
        // player wants to pay for previous item
        final List<ChatAction> payment = new LinkedList<ChatAction>();
        payment.add(new DropItemAction("money", COST));
        payment.add(new SetQuestAction(QUEST_SLOT, "done"));
        payment.add(new DecreaseKarmaAction(10));
        add(ConversationStates.QUESTION_1,
            ConversationPhrases.YES_MESSAGES,
            new PlayerHasItemWithHimCondition("money", COST)
View Full Code Here

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

      ConversationStates.QUEST_ITEM_BROUGHT,
      "Oh great! Did my brother Xoderos send you with those sandwiches?",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("sandwich", FOOD_AMOUNT));
    reward.add(new IncreaseXPAction(150));
    reward.add(new SetQuestAction(QUEST_SLOT, "joshua"));
    reward.add(new IncreaseKarmaAction(15));

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

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

    // player gets water checked
    // mark infostring of item to show it's good
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    // for now Stefan is just able to check one water at a time (even from a stack) and he always says it's fine and clean
    // if you go to him with one checked and one unchecked he might just check the checked one again - depends what sits first in bag
    actions.add(new DropItemAction("water",1));
    actions.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        final Item water = SingletonRepository.getEntityManager().getItem("water");
        water.setInfoString(CLEAN_WATER_INFOSTRING);
        water.setDescription("You see a bottle of fresh spring water. It's really tasty and fresh. Stefan checked it.");
View Full Code Here

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

 
  private void step2() {
  final SpeakerNPC npc = npcs.get("Lorenz")
 
      final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("scythe"));
    reward.add(new IncreaseXPAction(1000));
    reward.add(new SetQuestAction(QUEST_SLOT, "capture"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.ATTENDING, "scythe",
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.