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

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


        ConversationStates.IDLE,   
        "Thank you!",       
        new MultipleActions(
                new DropItemAction("twilight elixir"),
                new SetQuestAction(mithrilcloak.getQuestSlot(), "taking_striped_cloak"),
                new TeleportAction("int_ados_sewing_room", 12, 20, Direction.DOWN)
                )
        );

    npc2.add(ConversationStates.QUEST_ITEM_QUESTION,
        ConversationPhrases.NO_MESSAGES,
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

        add(ConversationStates.ATTENDING,
            "playground",
            new AdminCondition(500),
            ConversationStates.IDLE,
            "Have fun!",
            new TeleportAction("int_admin_playground", 20, 20, Direction.DOWN));
        addGoodbye("Bye, remember to take care of yourself.");
      }

      @Override
      protected void createPath() {
View Full Code Here

      @Override
      protected void createDialog() {
        addGreeting("#elddir a evlos tsum uoy ecalp siht #evael ot kees uoy fI");
        add(ConversationStates.ATTENDING, "evael", null, ConversationStates.QUESTION_1, "?erus uoy erA .truh lliw tI", null);
        final List<ChatAction> processStep = new LinkedList<ChatAction>();
        processStep.add(new TeleportAction("int_afterlife", 31, 23, Direction.UP));
        processStep.add(new DecreaseKarmaAction(100.0));
        processStep.add(new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            player.subXP(10000);
            // wipe riddle slot if player decided they couldnt answer it and would take the karma hit
View Full Code Here

    npc2.add(ConversationStates.ATTENDING, "challenge",
         new AndCondition(new LevelGreaterThanCondition(19),
              new DeathMatchEmptyCondition(),
              new NotCondition(new PlayerHasPetOrSheepCondition())),
         ConversationStates.IDLE, null,        
         new TeleportAction("0_ados_wall_n", 100, 86, Direction.DOWN));


    npc2.add(ConversationStates.ATTENDING, "challenge",
       new AndCondition(new LevelGreaterThanCondition(19),
            new NotCondition(new DeathMatchEmptyCondition()),
            new NotCondition(new PlayerHasPetOrSheepCondition())),
         ConversationStates.QUESTION_1, null,        
         new ChatAction() {
           public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
             final List<Player> dmplayers = arena.getPlayers();
             final List<String> dmplayernames = new LinkedList<String>();
             for (Player dmplayer : dmplayers) {
               dmplayernames.add(dmplayer.getName());
             }
             // List the players inside deathmatch
             npc.say("There are heroes battling right now in the deathmatch, so it may be dangerous there. Do you want to join "
                 + Grammar.enumerateCollection(dmplayernames) + "?");
           }
         });

    npc2.add(ConversationStates.ATTENDING, "challenge",
       new AndCondition(new LevelGreaterThanCondition(19),
            new PlayerHasPetOrSheepCondition()),
       ConversationStates.ATTENDING, "Sorry, but it would be too scary for your pet in there.",
         null);


    npc2.add(ConversationStates.QUESTION_1, ConversationPhrases.YES_MESSAGES, null,
         ConversationStates.IDLE, null,        
         new TeleportAction("0_ados_wall_n", 100, 86, Direction.DOWN));


    npc2.add(ConversationStates.QUESTION_1, ConversationPhrases.NO_MESSAGES, null,
         ConversationStates.ATTENDING, "That's a bit cowardly, but never mind. If there's anything else you want, just say.",        
         null);
View Full Code Here

                new QuestNotActiveCondition(QUEST_SLOT)),
                ConversationStates.ATTENDING,
                "Semos, Nalwor and Fado bank chests are to my right. The chests owned by Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.",
                new MultipleActions(
                    new DropItemAction("money", COST),
                    new TeleportAction(ZONE_NAME, 10, 10, Direction.DOWN),
                    new SetQuestAction(QUEST_SLOT, "start"),
                    new ChatAction() {
                      public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
                        SingletonRepository.getTurnNotifier().notifyInTurns(0, new Timer(player));
                      }}));
       
        add(ConversationStates.ATTENDING,
            ConversationPhrases.YES_MESSAGES,
            new AndCondition(
                new NotCondition(new PlayerHasItemWithHimCondition("money", COST)),
                new QuestNotActiveCondition(QUEST_SLOT)),
            ConversationStates.ATTENDING,
            "You do not have enough money!",
            null);
       
        add(ConversationStates.ATTENDING,
            ConversationPhrases.YES_MESSAGES,
            new QuestActiveCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Hm, I do not understand you. If you wish to #leave, just say",
            null);

        add(ConversationStates.ATTENDING,
            ConversationPhrases.NO_MESSAGES,
            new QuestNotActiveCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Very well.",
            null);

        add(ConversationStates.ATTENDING,
            ConversationPhrases.NO_MESSAGES,
            new QuestActiveCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Hm, I do not understand you. If you wish to #leave, just say",
            null);

        add(ConversationStates.ATTENDING,
            "leave",
            new QuestNotActiveCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Leave where?",
            null);


        add(ConversationStates.ATTENDING,
            "leave",
            new QuestActiveCondition(QUEST_SLOT),
            ConversationStates.ATTENDING,
            "Thank you for using the Wizard's Bank",
            // we used to use teleportAway() here
            new MultipleActions(
                new TeleportAction(ZONE_NAME, 15, 16, Direction.DOWN),
                new SetQuestAction(QUEST_SLOT, "done"),
                new ChatAction() {
                  public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
                    SingletonRepository.getTurnNotifier().dontNotify(new Timer(player));
                  }}));
View Full Code Here

          new NotCondition(new PlayerHasItemWithHimCondition("candle"))),
      ConversationStates.IDLE,
      null,
      new MultipleActions(
          new SetQuestAction(QUEST_SLOT, "first_step"),
          new TeleportAction("int_semos_wizards_tower_1", 15, 16, Direction.DOWN)));
  }
View Full Code Here

    // send a player who has completed the quest to the top spire
    npc.add(ConversationStates.ATTENDING,
      "teleport",
      new QuestCompletedCondition(QUEST_SLOT),
      ConversationStates.IDLE, null,
      new TeleportAction("int_semos_wizards_tower_8", 21, 22, Direction.UP));

    // player who has completed quest asks about the tower or test, offer the teleport or help
    npc.add(ConversationStates.ATTENDING,
      Arrays.asList("tower", "test"),
      new QuestCompletedCondition(QUEST_SLOT),
View Full Code Here

TOP

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

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.