Package games.stendhal.server.entity.npc.condition

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


    // the player returns to Eonna after having started the quest.
    // Eonna checks if the player has killed one of each animal race.
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, 0, "start"), new KilledForQuestCondition(QUEST_SLOT,1)),
        ConversationStates.ATTENDING, "A hero at last! Thank you!",
        new MultipleActions(reward));

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestInStateCondition(QUEST_SLOT, 0, "start"), new NotCondition(new KilledForQuestCondition(QUEST_SLOT, 1))),
        ConversationStates.QUEST_STARTED,
        "Don't you remember promising to clean out the rats from my #basement?",
        null);

    npc.add(
View Full Code Here


    reward.add(new SetQuestAction(QUEST_SLOT, "done"));

    // the player returns after having started the quest.
    // Saman checks if kill was made
    npc.add(ConversationStates.ATTENDING, "kill",
      new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "start"), new KilledForQuestCondition(QUEST_SLOT, 1)),
      ConversationStates.ATTENDING,
      "Revenge! Good! Take club of hooman blud.",
      new MultipleActions(reward));

    npc.add(ConversationStates.ATTENDING, "kill",
      new AndCondition(new QuestInStateCondition(QUEST_SLOT, 0, "start"), new NotCondition(new KilledForQuestCondition(QUEST_SLOT, 1))),
      ConversationStates.ATTENDING,
      "kill Mountain Orc Chief! Kotoch orcs nid revenge!",
      null);
  }
View Full Code Here

      res.add("I do not want to kill anyone for the Orc Saman.");
    }
    if (questState.startsWith("start") || questState.equals("done")) {
      res.add("I like a challenge and want to try kill the captive mountain orc chief. I was given the prison key.");
    }
    if ((questState.startsWith("start") && (new KilledForQuestCondition(QUEST_SLOT, 1)).fire(player,null,null)) || questState.equals("done")) {
      res.add("I killed the mountain orc chief in Kotoch Prison.");
    }
    if (questState.equals("done")) {
      res.add("I told the Orc Saman about the kill and he gave me a powerful Club of Thorns to use.");
    }
View Full Code Here

    triggers.addAll(ConversationPhrases.QUEST_MESSAGES);   
    npc.add(ConversationStates.ATTENDING,
        triggers,
        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT, 0, "start"),
            new KilledForQuestCondition(QUEST_SLOT, 1)),
        ConversationStates.ATTENDING,
        "I see you have killed the gnomes as I asked. I hope they will stay away from the carrots for a while! "
        + "Please take these potions as a reward.",
        new MultipleActions(actions));

    npc.add(ConversationStates.ATTENDING,
        triggers,
        new AndCondition(
            new QuestInStateCondition(QUEST_SLOT, 0, "start"),
            new NotCondition(new KilledForQuestCondition(QUEST_SLOT, 1))),
        ConversationStates.ATTENDING,
        "You need to teach those pesky gnomes a lesson, by killing some as an example! "
        + "Make sure you get the leaders, too, at least one infantryman and one cavalryman.",
        null);
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.condition.KilledForQuestCondition

Copyright © 2018 www.massapicom. 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.