Examples of DropItemAction


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

        ConversationStates.IDLE,
        "Okay, that's all I need to fix the ring. Come back in "
            + REQUIRED_MINUTES
            + " minutes and it will be ready. Bye for now.",
        new MultipleActions(
            new DropItemAction("gold bar", REQUIRED_GOLD),
            new DropItemAction("emerald", REQUIRED_GEM),
            new DropItemAction("money", REQUIRED_MONEY),
            new ChatAction() {
              public void fire(final Player player,
                  final Sentence sentence,
                  final EventRaiser npc) {
                final RingOfLife emeraldRing = (RingOfLife) player.getFirstEquipped("emerald ring");
                if (player.isBoundTo(emeraldRing)) {
                  player.setQuest(QUEST_SLOT, "forging;"
                      + System.currentTimeMillis());
                } else {
                  player.setQuest(QUEST_SLOT, "forgingunbound;"
                      + System.currentTimeMillis());
                }

              }
            },
            new DropItemAction("emerald ring")));
   
    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
        ConversationPhrases.YES_MESSAGES,
        new NotCondition(new  AndCondition(
            new PlayerHasItemWithHimCondition("gold bar", REQUIRED_GOLD),
View Full Code Here

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

  private void prepareBringingStep() {
   
    final SpeakerNPC npc = npcs.get("Mr. Yeti");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("snowball", REQUIRED_SNOWBALLS));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestToTimeStampAction(QUEST_SLOT));
    reward.add(new IncreaseKarmaAction(15));
    // player gets either cod or perch, which we don't have a standard action for
    // and the npc says the name of the reward, too
View Full Code Here

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

            new NotCondition(new PlayerHasItemWithHimCondition("flask"))),
        ConversationStates.ATTENDING,
        "Medicine for #Tad? Didn't he tell you to bring a flask?", null);

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new DropItemAction("flask"));
    processStep.add(new IncreaseXPAction(10));
    processStep.add(new SetQuestAction(QUEST_SLOT, "corpse&herbs"));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
View Full Code Here

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

            new NotCondition(new PlayerHasItemWithHimCondition("arandula"))),
        ConversationStates.ATTENDING,
        "Can you fetch those #herbs for the #medicine?", null);

    final List<ChatAction> processStep = new LinkedList<ChatAction>();
    processStep.add(new DropItemAction("arandula"));
    processStep.add(new IncreaseXPAction(50));
    processStep.add(new SetQuestAction(QUEST_SLOT, "potion"));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
View Full Code Here

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

      ConversationStates.ATTENDING,
      "Hey, my good friend, remember that leather hat I asked you about before? It's still pretty chilly here...",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("leather helmet"));
    reward.add(new IncreaseXPAction(50));
    reward.add(new IncreaseKarmaAction(10));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // make sure the player isn't cheating by putting the
View Full Code Here

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

  private void step_3() {
    final SpeakerNPC npc = npcs.get("Plink");
   
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("teddy"));
    reward.add(new IncreaseXPAction(20));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
View Full Code Here

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

      ConversationStates.ATTENDING,
      "Hey, I'm still waiting for that beer, remember? Anyway, what can I do for you?",
      null);

    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("beer"));
    reward.add(new EquipItemAction("money", 20));
    reward.add(new IncreaseXPAction(50));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
    npc.add(
View Full Code Here

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

    npc.add(ConversationStates.ATTENDING,
      questTrigger,
      new AndCondition(new QuestNotCompletedCondition(QUEST_SLOT), new PlayerHasItemWithHimCondition("ice sword")),
      ConversationStates.ATTENDING,
      "my ice :)",
      new MultipleActions(new DropItemAction("ice sword"), new IncreaseXPAction(1000), new IncreaseKarmaAction(30.0), new SetQuestAction(QUEST_SLOT, "done;1")));
   
    // says quest or ice and has ice sword with him (second+ time)
    // player gets a karma bonus and some xp
    npc.add(ConversationStates.ATTENDING,
      questTrigger,
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("coal",25)),
        ConversationStates.ATTENDING,
        null,
        new MultipleActions(
            new DropItemAction("coal",25),
            new ChatAction() {
              public void fire(final Player player,
                  final Sentence sentence,
                  final EventRaiser npc) {
                int grilledsteakAmount = Rand.rand(4) + 1;
View Full Code Here

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

        new PlayerHasItemWithHimCondition("goblet")
      );
    ChatAction action = new MultipleActions(
                    new SetQuestAction(QUEST_SLOT, "decorating;"),
                    new SetQuestToTimeStampAction(QUEST_SLOT, 1),
                    new DropItemAction("goblet",1)
                    );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
        ConversationStates.ATTENDING,
        "Ha, ha, ha! I will cover those jewelled legs with this blood and they will transform " +
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.