Package games.stendhal.server.entity.npc.action

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


        "Thats how long"), null, ConversationStates.INFORMATION_4,
        "\"I will be your friend.\"", null);
    npc.add(ConversationStates.INFORMATION_4, Arrays.asList(
        "I will be your friend.", "I will be your friend"), null,
        ConversationStates.ATTENDING, "Cool. We are friends now.",
        new SetQuestAction("debuggera", "friends"));

    // quests
    npc.add(ConversationStates.ATTENDING, "quest", new AdminCondition(),
        ConversationStates.ATTENDING, null, new QuestsAction(sandbox));
View Full Code Here


    toKill.put("mountain hero dwarf",   new Pair<Integer, Integer>(0,2));
    toKill.put("mountain leader dwarf", new Pair<Integer, Integer>(0,2));
   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new IncreaseKarmaAction(5.0));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "start"));
    actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, toKill));
   
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        null,
View Full Code Here

     * If player has quest and is in the correct state, just give him the
     * gold bars.
     */
    final List<ChatAction> givegold = new LinkedList<ChatAction>();
    givegold.add(new EquipItemAction("gold bar",GOLD_AMOUNT, true));
    givegold.add(new SetQuestAction(QUEST_SLOT, "lorithien"))
   
    npc.add(
      ConversationStates.IDLE,
      ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(getName()),
View Full Code Here

    /** Complete the quest */
    final List<ChatAction> reward = new LinkedList<ChatAction>();
    reward.add(new DropItemAction("gold bar", GOLD_AMOUNT));
    reward.add(new EquipItemAction("nalwor bank key", 1, true));
    reward.add(new IncreaseXPAction(200));
    reward.add(new SetQuestAction(QUEST_SLOT, "done"));
    reward.add(new IncreaseKarmaAction(10));
   
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(getName()),
            new QuestInStateCondition(QUEST_SLOT, "lorithien"),
View Full Code Here

        new MultipleActions(
            new IncreaseXPDependentOnLevelAction(5, 95.0),
            new IncreaseKarmaAction(5.0),
            new IncrementQuestAction(QUEST_SLOT, 2, 1),
            new SetQuestToTimeStampAction(QUEST_SLOT,1),
            new SetQuestAction(QUEST_SLOT,0,"done")
    ));
  }
View Full Code Here

      raiser.say("Coward, we haven't even #started!");
      return;
    }

    deathmatchState.setLifecycleState(DeathmatchLifecycle.BAIL);
    new SetQuestAction("deathmatch", 0, deathmatchState.toQuestString()).fire(player, sentence, raiser);
    // Track the number of bails.
    new IncrementQuestAction("deathmatch", 7, 1).fire(player, sentence, raiser);

    // TODO: fix race condition until bail is processed in DeathmatchEngine
    final Item helmet = player.getFirstEquipped("trophy helmet");
View Full Code Here

      }
    }
    player.updateItemAtkDef();
    TurnNotifier.get().notifyInTurns(0, new NotifyPlayerAboutHallOfFamePoints((SpeakerNPC) raiser.getEntity(), player.getName(), "D", "deathmatch_score"));
   
    new SetQuestAction("deathmatch", 0, "done").fire(player, sentence, raiser);
    // Track the number of wins.
    new IncrementQuestAction("deathmatch", 6, 1).fire(player, sentence, raiser);
    SingletonRepository.getAchievementNotifier().onFinishQuest(player);
  }
View Full Code Here

    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestInStateCondition(QUEST_SLOT, "recommended")),
      ConversationStates.IDLE,
      "Greetings! My wonderful daughter requests that I grant you citizenship of Kalavan City. Consider it done. Now, forgive me while I go back to my meal. Goodbye.",
      new MultipleActions(new IncreaseXPAction(500), new SetQuestAction(QUEST_SLOT, "done")));

    /** If you aren't in the condition to speak to him (not completed quest, or already spoke) the King will dismiss you */
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
          new QuestNotInStateCondition(QUEST_SLOT, "recommended")),
View Full Code Here

    toKill.put("minotaur",new Pair<Integer, Integer>(0,1));
    toKill.put("blue dragon",new Pair<Integer, Integer>(0,1));
    toKill.put("stone golem",new Pair<Integer, Integer>(0,1));

    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new SetQuestAction(QUEST_SLOT, "start"));
    actions.add(new StartRecordingKillsAction(QUEST_SLOT, 1, toKill));

   
    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "Fantastic! We can't wait for your return. Please kill one of each creature you can find in the underground of Athor island. I bet you'll get them all!",
        new MultipleActions(actions));

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "Oh never mind. We'll go on sunbathing then. Not that we aren't tired of it...",
        new SetQuestAction(QUEST_SLOT, "rejected"));
  }
View Full Code Here


    final List<ChatAction> actions = new LinkedList<ChatAction>();
      actions.add(new EquipItemAction("greater potion", 10));
    actions.add(new IncreaseXPAction(5000));
    actions.add(new SetQuestAction(QUEST_SLOT, "killed;1"));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncreaseKarmaAction(10.0));

   
    LinkedList<String> triggers = new LinkedList<String>();
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.action.SetQuestAction

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.