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

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


    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


    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.YES_MESSAGES,
        null,
        ConversationStates.ATTENDING,
        "Great! Enjoy your visit. I know THEY will. Oh, watch out, we have a couple chaos dragonriders exercising our dragons. Don't get in their way!",
        new MultipleActions(new TeleportAction("-1_ados_outside_w", 25, 28, Direction.DOWN), new SetQuestAction(QUEST_SLOT, "done;"), new SetQuestToTimeStampAction(QUEST_SLOT,1)));

    npc.add(ConversationStates.QUEST_OFFERED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.ATTENDING,
View Full Code Here

   
    final List<ChatAction> actions = new LinkedList<ChatAction>();
    actions.add(new DropRecordedItemAction(QUEST_SLOT,0));
    actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1));
    actions.add(new IncrementQuestAction(QUEST_SLOT,2,1));
    actions.add(new SetQuestAction(QUEST_SLOT, 0, "done"));
    actions.add(new IncreaseXPDependentOnLevelAction(5.0/3.0, 290.0));
    actions.add(new IncreaseKarmaAction(10.0));
    actions.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
        int goldamount;
View Full Code Here

    final ChatCondition condition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
            new QuestStateStartsWithCondition(QUEST_SLOT,"decorating"),
            new TimePassedCondition(QUEST_SLOT, 1, 5)
          );
    final ChatAction action = new MultipleActions(
                      new SetQuestAction(QUEST_SLOT,"done"),
                      new IncreaseKarmaAction(20),
                      new IncreaseXPAction(10000),
                      // here, true = bind them to player
                      new EquipItemAction("black legs", 1, true)
                    );
View Full Code Here

        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),
                    new DropItemAction("goblet",1)
                    );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
View Full Code Here

        new QuestStateStartsWithCondition(QUEST_SLOT, "find_vera"),
        new PlayerHasItemWithHimCondition("note")
      );
   
    final ChatAction action = new MultipleActions(
          new SetQuestAction(QUEST_SLOT, 0, "kill_scientist"),
          new StartRecordingKillsAction(QUEST_SLOT, 1, "Sergej Elos", 0, 1),
          new DropItemAction("note")
        );
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
View Full Code Here

  private void playerReturnsAfterGivingWhenFinished(final SpeakerNPC npc) {
    final ChatCondition condition = new AndCondition(
        new QuestStateStartsWithCondition(QUEST_SLOT, "making;"),
        new TimePassedCondition(QUEST_SLOT, 1, REQUIRED_MINUTES)
      );
    final ChatAction action = new SetQuestAction(QUEST_SLOT,"find_vera");
    npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
        new AndCondition(new GreetingMatchesNameCondition(npc.getName()), condition),
        ConversationStates.INFORMATION_1,
        "I finished the legs. But I cannot trust you. Before I give the" +
        " jewelled legs to you, I need a message from my darling. Ask Mayor" +
View Full Code Here

          new CollectRequestedItemsAction(
              item.getKey(), QUEST_SLOT,
              "Good, do you have anything else?",
              "You have already brought that!",
              new MultipleActions(
                  new SetQuestAction(QUEST_SLOT,"legs"),
                  new SayTextAction("I am a stupid fool too much in love with my wife Vera to remember, of course these legs also need a base to add " +
                      "the jewels to. Please return with a pair of shadow legs. Bye.")), ConversationStates.IDLE
              ));
    }
  }
View Full Code Here

  final AndCondition legscondition = new AndCondition(new GreetingMatchesNameCondition(npc.getName()),
                new QuestInStateCondition(QUEST_SLOT, "legs"),
                new PlayerHasItemWithHimCondition("shadow legs")
                );
  final ChatAction action = new MultipleActions(
  new SetQuestAction(QUEST_SLOT,"making;"),
  new SetQuestToTimeStampAction(QUEST_SLOT, 1),
  new DropItemAction("shadow legs"));
  npc.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES,
      legscondition,
      ConversationStates.IDLE,
View Full Code Here

    npc.add(ConversationStates.QUEST_STARTED,
        ConversationPhrases.YES_MESSAGES,
        null,
        ConversationStates.IDLE,
        "I am waiting, Semos man." ,
        new SetQuestAction(QUEST_SLOT, NEEDED_ITEMS));
   
    npc.add(ConversationStates.QUEST_STARTED,
        ConversationPhrases.NO_MESSAGES,
        null,
        ConversationStates.QUEST_STARTED,
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.