Examples of KilledCondition


Examples of games.stendhal.server.entity.npc.condition.KilledCondition

    // 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 GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new NotCondition(new KilledCondition("dark elf archer", "dark elf captain", "thing"))),
        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 snivelling dark elf captain and any evil dark elf archers you find! And bring me the amulet from the mutant thing.",
        null);
   
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "start"),
            new KilledCondition("dark elf archer", "dark elf captain", "thing"),
            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, "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),
View Full Code Here

Examples of games.stendhal.server.entity.npc.condition.KilledCondition

    // he's killed a black dragon
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "knife_offered"),
            new KilledCondition("black dragon"),
            new PlayerHasItemWithHimCondition("obsidian"),
            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
    npc.add(ConversationStates.IDLE,
        ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, "knife_offered"),
            new NotCondition(new KilledCondition("black dragon")),
            new PlayerHasItemWithHimCondition("obsidian"),
            new PlayerHasItemWithHimCondition(FISH)),
        ConversationStates.ATTENDING,
        "Didn't you hear me properly? I told you to go slay a black dragon for the obsidian, not buy it! How do I know this isn't a fake gem? *grumble* I'm not making a special knife for someone who is scared to face a dragon.",
        null);
View Full Code Here

Examples of games.stendhal.server.entity.npc.condition.KilledCondition

    // Player returned with goblet and had killed the vampire lord, and has iron, so offer to forge the sword.
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT,"start"),
          new PlayerHasItemWithHimCondition("goblet"),
          new KilledCondition("vampire lord"),
          new PlayerHasItemWithHimCondition("iron", REQUIRED_IRON)),
      ConversationStates.IDLE,
      "You've brought everything I need to make the vampire sword. Come back in "
      + REQUIRED_MINUTES
      + " minutes and it will be ready",
      new MultipleActions(startforging));

    // Player returned with goblet and had killed the vampire lord, so offer to forge the sword if iron is brought
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT,"start"),
            new PlayerHasItemWithHimCondition("goblet"),
            new KilledCondition("vampire lord"),
            new NotCondition(new PlayerHasItemWithHimCondition("iron", REQUIRED_IRON))),
    ConversationStates.QUEST_ITEM_BROUGHT,
    "You have battled hard to bring that goblet. I will use it to #forge the vampire sword",
    null);
   
    // Player has only an empty goblet currently, remind to go to Catacombs
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT,"start"),
          new PlayerHasItemWithHimCondition("empty goblet"),
          new NotCondition(new PlayerHasItemWithHimCondition("goblet"))),
      ConversationStates.IDLE,
      "Did you lose your way? The Catacombs are in North Semos. Don't come back without a " +
      "full goblet! Bye!",
      null);
   
    // Player has a goblet (somehow) but did not kill a vampire lord
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT,"start"),
            new PlayerHasItemWithHimCondition("goblet"),
            new NotCondition(new KilledCondition("vampire lord"))),
    ConversationStates.IDLE,
    "Hm, that goblet is not filled with vampire blood; it can't be, you have not killed the vampire lord. You must slay him.",
    null);
   
    // Player lost the empty goblet?
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.