Examples of addMatching()


Examples of games.stendhal.server.entity.npc.SpeakerNPC.addMatching()

        ConversationStates.QUEST_ITEM_QUESTION,
        "Sure, I sell eggshells. They're not worth much to me. I'll swap you one eggshell for every " + Integer.toString(REQUIRED_POISONS) + " disease poisons you bring me. I need it to kill the rats you see. Anyway, how many eggshells was you wanting?",
        null);

    // respond to question of how many eggshells are desired. terry expects a number or some kind
    npc.addMatching(ConversationStates.QUEST_ITEM_QUESTION,
        // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(1, 5000),
        ConversationStates.ATTENDING, null,
        new ChatAction() {
View Full Code Here

Examples of games.stendhal.server.entity.npc.SpeakerNPC.addMatching()

        "Keep it quiet will you! Yeah, I got moss, it's "
        + Integer.toString(MOSS_COST) + " money each. How many do you want?",
        null);

    // responding to question of how many they want, with a number
    npc.addMatching(ConversationStates.QUEST_ITEM_QUESTION,
        // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(1, 5000),
        ConversationStates.ATTENDING, null,
        new ChatAction() {
View Full Code Here

Examples of games.stendhal.server.entity.npc.SpeakerNPC.addMatching()

            startQuiz();
            player.setQuest(QUEST_SLOT, "" + System.currentTimeMillis());
          }
        });

    fisherman.addMatching(ConversationStates.QUESTION_1, Expression.JOKER, new JokerExprMatcher(),
        new NotCondition(new TriggerInListCondition(ConversationPhrases.GOODBYE_MESSAGES)),
        ConversationStates.ATTENDING, null,
        new ChatAction() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
            String species = getCurrentSpecies();
View Full Code Here

Examples of games.stendhal.server.entity.npc.SpeakerNPC.addMatching()

    fisherman.add(ConversationStates.QUESTION_1,
      ConversationPhrases.NO_MESSAGES, null,
      ConversationStates.ATTENDING,
      "Too bad. I would have had a nice reward for you.", null);

    fisherman.addMatching(ConversationStates.QUESTION_2, Expression.JOKER, new JokerExprMatcher(), null,
      ConversationStates.ATTENDING, null,
      new ChatAction() {
        public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
          final String name = player.getQuest(QUEST_SLOT);
          final String quote = quotes.get(name);
View Full Code Here

Examples of games.stendhal.server.entity.npc.SpeakerNPC.addMatching()

              npc.say("How lovely! Please read our catalogue here and tell me the room number that you would like.");
            }
          }
        });
    // player says room number
    linda.addMatching(ConversationStates.QUESTION_1,
        // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(1, 15),
        ConversationStates.IDLE, null,
        new ChatAction() {
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.