Examples of AdminCondition


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

        "My mom said, i am not allowed to talk to strangers.", null);
    npc.behave("bye", "Bye.");

    // Greating and admins may enable or disable her
    npc.add(ConversationStates.IDLE, Arrays.asList("hi", "hello",
        "greetings", "hola"), new AdminCondition(),
        ConversationStates.ATTENDING,
        "Hi, game master. Do you think i am #crazy?", null);

//    npc.add(ConversationStates.IDLE, [ "hi","hello","greetings","hola" ],
//        new AdminCondition(), ConversationStates.QUESTION_1,
//        "May I talk to strangers?", null);
//    npc.add(ConversationStates.QUESTION_1, SpeakerNPC.YES_MESSAGES, new AdminCondition(),
//        ConversationStates.ATTENDING, null, new DebuggeraEnablerAction(true));
//    npc.add(ConversationStates.QUESTION_1, ConversationPhrases.NO_MESSAGES, new AdminCondition(),
//        ConversationStates.ATTENDING, null, new DebuggeraEnablerAction(false));

    npc.behave(Arrays.asList("insane", "crazy", "mad"),
        "Why are you so mean? I AM NOT INSANE. My mummy says, I am a #special child.");
    npc.behave(
        Arrays.asList("special", "special child"),
        "I can see another world in my dreams. That are more thans dreams. There the people are sitting in front of machines called computers. This are realy strange people. They cannot use telepathy without something they call inter-network. But these people and machines are somehow connected to our world. If I concentrate, I can #change thinks in our world.");
    // npc.behave("verschmelzung", "\r\nYou have one hand,\r\nI have the
    // other.\r\nPut them together,\r\nWe have each other.");
    npc.add(
        ConversationStates.ATTENDING,
        Arrays.asList("susi"),
        null,
        ConversationStates.ATTENDING,
        "Yes, she is my twin sister. People consider her normal because she hides her special abilities.",
        null);

    // change
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("change", "change"), new QuestInStateCondition(
            "debuggera", "friends"), ConversationStates.ATTENDING,
        "I can teleport you.", null);
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("change", "change"),
        new QuestNotInStateCondition("debuggera", "friends"),
        ConversationStates.ATTENDING,
        "Do you want to become my #friend?", null);

    // friends
    npc.add(ConversationStates.ATTENDING,
        Arrays.asList("friend", "friends"), new QuestInStateCondition(
            "debuggera", "friends"), ConversationStates.ATTENDING,
        "We are friends.", null);
    npc.add(
        ConversationStates.ATTENDING,
        Arrays.asList("friend", "friends"),
        new QuestNotInStateCondition("debuggera", "friends"),
        ConversationStates.INFORMATION_1,
        "Please repeat:\r\n                        \"A circle is round,\"",
        null);
    npc.add(ConversationStates.INFORMATION_1, Arrays.asList(
        "A circle is round,", "A circle is round"), null,
        ConversationStates.INFORMATION_2, "\"it has no end.\"", null);
    npc.add(ConversationStates.INFORMATION_2, Arrays.asList(
        "it has no end.", "it has no end"), null,
        ConversationStates.INFORMATION_3, "\"That's how long,\"", null);
    npc.add(ConversationStates.INFORMATION_3, Arrays.asList(
        "That's how long,", "That's how long", "Thats how long,",
        "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));

    // teleport
    npc.add(ConversationStates.ATTENDING, Arrays.asList("teleport",
        "teleportme"), new AdminCondition(), ConversationStates.IDLE,
        null, new TeleportNPCAction(sandbox));

    final StendhalRPWorld world = SingletonRepository.getRPWorld();
    npc.add(ConversationStates.ATTENDING, Arrays.asList("sightseeing",
        "memory", "memoryhole"), new AdminCondition(),
        ConversationStates.IDLE, null, new SightseeingAction(sandbox,
            world));
  }
View Full Code Here

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

        addReply("words", "Roses are red, violets are blue, Stendhal is great, and so are you!");
        addReply("portals", "The one with the Sun goes to semos city. It shows you where this house really is. The rest are clear, I hope. There is a door to the bank, the jail, and the Death Match in Ados. Of course they are all one way portals so you will not be disturbed by unexpected visitors.");
        addQuest("Now you're really testing how much thought went into making me!");
        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.");
      }
View Full Code Here

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

       */
      @Override
      public void createDialog() {
        add(ConversationStates.IDLE,
          Arrays.asList("hi", "hola", "hello", "heya"),
          new NotCondition(new AdminCondition(REQUIRED_ADMINLEVEL_INFO)),
          ConversationStates.IDLE,
          null,  new ReadNewsAction());
        add(ConversationStates.IDLE,
          Arrays.asList("hi", "hola", "hello", "heya"),
          new AdminCondition(REQUIRED_ADMINLEVEL_INFO),
          ConversationStates.ATTENDING,
          HiOldFriend, null);
        add(ConversationStates.ATTENDING,
          Arrays.asList("help"),
          new AdminCondition(REQUIRED_ADMINLEVEL_SET),
          ConversationStates.ATTENDING,
          WillHelp, null);
        add(ConversationStates.ATTENDING,
          Arrays.asList("speech", "remove"),
          new NotCondition(new AdminCondition(REQUIRED_ADMINLEVEL_SET)),
          ConversationStates.ATTENDING,
          TooScared, null);
        add(ConversationStates.ATTENDING,
          Arrays.asList("help"),
          new NotCondition(new AdminCondition(REQUIRED_ADMINLEVEL_SET)),
          ConversationStates.ATTENDING,
          InfoOnly, new ReadJobsAction());
        add(ConversationStates.ATTENDING,
          Arrays.asList("info", "list", "tasks", "news"),
          new AdminCondition(REQUIRED_ADMINLEVEL_INFO),
          ConversationStates.ATTENDING,
          null, new ReadJobsAction());   
        add(ConversationStates.ATTENDING,
          Arrays.asList("speech"),
          new AdminCondition(REQUIRED_ADMINLEVEL_SET),
          ConversationStates.ATTENDING,
          null, new WriteNewsAction());
        add(ConversationStates.ATTENDING,
          Arrays.asList("remove"),
          new AdminCondition(REQUIRED_ADMINLEVEL_SET),
          ConversationStates.ATTENDING,
          null, new RemoveNewsAction());
        add(ConversationStates.ATTENDING,
            Arrays.asList("clear"),
            new AdminCondition(REQUIRED_ADMINLEVEL_SET),
            ConversationStates.ATTENDING,
            null, new ClearNewsAction());
        addGoodbye();
      }
    };
View Full Code Here

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

          ConversationStates.ATTENDING,
          "You did not rent any sign, so I cannot remove one.", null);

        // admins may remove signs (even low level admins)
        add(ConversationStates.ATTENDING, "delete",
          new AdminCondition(100),
          ConversationStates.ATTENDING, null,
          new ChatAction() {
            public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
              if (sentence.getExpressions().size() < 2) {
                npc.say("Syntax: delete <nameofplayer>");
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.