Examples of KilledForQuestCondition


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

    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,
        "Thank you so much! Now I can sleep a bit better. Please take some soup.",
        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,
        "Please help me with reaching my goal of taking revenge!",
        null);
  }
View Full Code Here

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

    res.add("I have a note with some terrible news on it to give Vasi.");
    if ("find_vera".equals(questState) && player.isEquipped("note")) { 
      return res;
    }
    res.add("Vasi Elos is so sad and angry that Vera is gone. I must kill his own brother and give him a goblet of blood.");
    if (questState.startsWith("kill_scientist") && !new KilledForQuestCondition(QUEST_SLOT, 1).fire(player, null, null)) {
      return res;
    }
    res.add("I killed the Imperial Scientist Sergej Elos and must take the goblet of his blood as proof.");
    if (questState.startsWith("kill_scientist") && new KilledForQuestCondition(QUEST_SLOT, 1).fire(player, null, null)) {
      return res;
    }
    res.add("Vasi Elos is really sad. He's decorating the legs he made...with blood.");
    if (questState.startsWith("decorating")) { 
      return res;
View Full Code Here

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

  }
 
  private void playerReturnsAfterKillingTheImperialScientist(SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new QuestStateStartsWithCondition(QUEST_SLOT, "kill_scientist"),
        new KilledForQuestCondition(QUEST_SLOT, 1),
        new PlayerHasItemWithHimCondition("goblet")
      );
    ChatAction action = new MultipleActions(
                    new SetQuestAction(QUEST_SLOT, "decorating;"),
                    new SetQuestToTimeStampAction(QUEST_SLOT, 1),
View Full Code Here

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

    final ChatCondition condition = new AndCondition(
        new GreetingMatchesNameCondition(npc.getName()),
        new QuestStateStartsWithCondition(QUEST_SLOT, "kill_scientist"),
        new NotCondition(
            new AndCondition(
                    new KilledForQuestCondition(QUEST_SLOT, 1),
                    new PlayerHasItemWithHimCondition("goblet")))
      );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        condition, ConversationStates.IDLE,
        "I am only in pain. Kill my brother and bring me his blood. It's all I want now.",
View Full Code Here

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

    if (!player.hasQuest(QUEST_SLOT)) {
      return res;
    }
    final String questState = player.getQuest(QUEST_SLOT);
    res.add("Hayunn Naratha is the first guy I ever met in this world, he challenged me to kill a rat.");
    if (player.getQuest(QUEST_SLOT, 0).equals("start") && (new KilledForQuestCondition(QUEST_SLOT,1)).fire(player, null, null)) {
      res.add("I killed that rat, I should go back to tell him!");
    }
    if (player.getQuest(QUEST_SLOT, 0).equals("start")) {
      return res;
    }
View Full Code Here

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

    //player returns to Hayunn not having killed a rat
    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.ATTENDING,
        "I see you haven't managed to kill a rat yet. Do you need me to tell you how to fight them?",
        null);

    //player returns to Hayunn having killed a rat
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseXPAction(10));
    actions.add(new SetQuestAction(QUEST_SLOT, "killed"));

    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.INFORMATION_1,
        "You killed the rat! Now, I guess you want to explore. Do you want to know the way to Semos?",
        new MultipleActions(actions));

View Full Code Here

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

    final SpeakerNPC npc = npcs.get("Zogfang");

    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.ATTENDING,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
            raiser.say("Just go kill Dhohr Nuggetcutter and his minions; the mountain leader, hero and elder dwarves. Even the simple mountain dwarves are a danger to us, kill them too.");               
        }
    });
   
    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,
        null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
            raiser.say("Thank you so much. You are a warrior, indeed! Here, have one of these. We have found them scattered about. We have no idea what they are.");
View Full Code Here

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

      return res;
    }

    res.add("I want to help Semos.");
    if (player.hasQuest(QUEST_SLOT) && !player.isQuestCompleted(QUEST_SLOT)) {
      final boolean questDone = new KilledForQuestCondition(QUEST_SLOT, 0)
          .fire(player, null, null);
      final String creatureToKill = getCreatureToKillFromPlayer(player);
      if (!questDone) {
        res.add("I have been asked to kill a " + creatureToKill
            + " to help Semos. I haven't killed it yet.");
View Full Code Here

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

        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotCompletedCondition(QUEST_SLOT),
            new NotCondition(
                    new KilledForQuestCondition(QUEST_SLOT, 0))),
        ConversationStates.ATTENDING,
        null,
        new ChatAction() {
          public void fire(Player player, Sentence sentence, EventRaiser npc) {
              final String questKill = player.getQuest(QUEST_SLOT, 0).split(",")[0];
              npc.say("You didn't kill " + Grammar.a_noun(questKill)
                  + " yet. Go and do it and say #complete only after you're done.");             
          }
        });

    // player killed creature
    npc.add(ConversationStates.ATTENDING,
        ConversationPhrases.FINISH_MESSAGES,
        new AndCondition(
            new QuestStartedCondition(QUEST_SLOT),
            new QuestNotCompletedCondition(QUEST_SLOT),
                new KilledForQuestCondition(QUEST_SLOT, 0)),
        ConversationStates.ATTENDING,
        "Good work! Let me thank you in the name of the people of Semos!",
        new MultipleActions(
            new IncreaseXPDependentOnLevelAction(5, 95.0),
            new IncreaseKarmaAction(5.0),
View Full Code Here

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

    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,
        "Brilliant! You killed some of these ugly creatures as I see! Hopefully they'll not return that fast or we will still not have the chance to explore some places."  + " Please take these greater potions as a reward for your help.",
        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,
        "Please free these lovely places on Athor from ugly #creatures!",
        null);
  }
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.