Examples of DropItemAction


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

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

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

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

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

      npc.add(ConversationStates.ATTENDING,  Arrays.asList("salva","knife","potion"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "knife"),
        new PlayerHasItemWithHimCondition("knife")),
        ConversationStates.ATTENDING, "Very good! Now I need the items to make the love #potion. I need 3 lilia flowers, 1 sprig of kokuda, 1 glass of wine and 1 black pearl. Please bring them all together at once and then ask me to make the #potion.",
        new MultipleActions(new SetQuestAction(QUEST_SLOT, "potion"), new DropItemAction("knife")));

      npc.add(ConversationStates.ATTENDING,  Arrays.asList("salva","knife","potion"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "knife"),
        new NotCondition(new PlayerHasItemWithHimCondition("knife"))),
        ConversationStates.ATTENDING, "I see you have been to Hackim, but where is the magic knife?",
        null);

    final List<ChatAction> potionactions = new LinkedList<ChatAction>();
    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
View Full Code Here

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

        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "pies"),
        new PlayerHasItemWithHimCondition("pie",5)),
        ConversationStates.ATTENDING, "Ah, thank you very much! Now I will tell you a little secret of mine. I am not a blacksmith, "
        + "only an assistant. I can't make knives at all! But I sell Salva a normal knife and is happy enough with that! So just take her "
        + "a plain knife like you could buy from Xin Blanca in Semos Tavern. I'll tell her I made it! Oh and thanks for the pies!!!",
        new MultipleActions(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "knife", 1.0), new DropItemAction("pie",5)));

      npc.add(ConversationStates.ATTENDING, Arrays.asList("salva", "pies"),
        new AndCondition(new QuestInStateCondition(QUEST_SLOT, "pies"),
        new NotCondition(new PlayerHasItemWithHimCondition("pie",5))),
        ConversationStates.ATTENDING, "Arlindo from Ados makes the best meat and vegetable pies. Please remember to bring me 5, I am hungry!",
View Full Code Here

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

      List<String> questTrigger;
      questTrigger = new LinkedList<String>(ConversationPhrases.QUEST_MESSAGES);
    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,
View Full Code Here

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

                new PlayerHasItemWithHimCondition("money", COST),
                new QuestNotActiveCondition(QUEST_SLOT)),
                ConversationStates.ATTENDING,
                "Semos, Nalwor and Fado bank chests are to my right. The chests owned by Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.",
                new MultipleActions(
                    new DropItemAction("money", COST),
                    new TeleportAction(ZONE_NAME, 10, 10, Direction.DOWN),
                    new SetQuestAction(QUEST_SLOT, "start"),
                    new ChatAction() {
                      public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
                        SingletonRepository.getTurnNotifier().notifyInTurns(0, new Timer(player));
View Full Code Here

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

        ConversationPhrases.YES_MESSAGES,
        new PlayerHasItemWithHimCondition("money", REQUIRED_MONEY),
        ConversationStates.ATTENDING,
        "Alright, here's the beans. Once you take them, you come down in about 30 minutes. And if you get nervous up there, hit one of the green panic squares to take you back here.",
        new MultipleActions(
            new DropItemAction("money", REQUIRED_MONEY),
            new EquipItemAction("rainbow beans", 1, true),
            // this is still complicated and could probably be split out further
            new ChatAction() {
              public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
                if (player.hasQuest(QUEST_SLOT)) {
View Full Code Here

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

    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));

    final List<ChatAction> reward1 = new LinkedList<ChatAction>(reward);
    reward1.add(new DropItemAction("leather cuirass"));

    npc.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      // make sure the player isn't cheating by putting the armor
      // away and then saying "yes"
      new PlayerHasItemWithHimCondition("leather cuirass"),
      ConversationStates.ATTENDING, "Oh, I am so thankful! Here is some gold I found ... ehm ... somewhere. Now that you have proven yourself a trusted customer, you may have access to your own private banking #vault any time you like.",
      new MultipleActions(reward1));

    final List<ChatAction> reward2 = new LinkedList<ChatAction>(reward);
    reward2.add(new DropItemAction("pauldroned leather cuirass"));
    npc.add(
      ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
      // make sure the player isn't cheating by putting the armor
      // away and then saying "yes"
View Full Code Here

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

  private void prepareBringingStep() {
    final SpeakerNPC npc = npcs.get("Anastasia");
    // player has fish soup and tells Anastasia, yes, it is for her
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("fish soup"));
    reward.add(new IncreaseXPAction(200));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(5));
    reward.add(new EquipItemAction("potion",10));
    reward.add(new ChatAction() {
View Full Code Here

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

        "Do you have 3 sandwiches, 3 bottles of beer and 3 glasses of wine?",
        null);
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(600));
    actions.add(new DropItemAction("sandwich",3));
    actions.add(new DropItemAction("beer",3));
    actions.add(new DropItemAction("wine",3));
    // the extra parts in the quest state are for wrvil and mrotho not to give them cloaks and armor twice
    actions.add(new SetQuestAndModifyKarmaAction(QUEST_SLOT, "clothes;none;none", 2.0));   
   
    npc.add(ConversationStates.QUEST_ITEM_QUESTION, ConversationPhrases.YES_MESSAGES,
        new AndCondition(
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.