Package games.stendhal.server.entity.npc.condition

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


    // 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() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {

                        final int required = (sentence.getNumeral().getAmount());
View Full Code Here


    // 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() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {

                        final int required = (sentence.getNumeral().getAmount());
View Full Code Here

   
    // handle house numbers 26 to 49
    addMatching(ConversationStates.QUEST_OFFERED,
        // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(getLowestHouseNumber(), getHighestHouseNumber()),
        ConversationStates.ATTENDING,
        null,
        new BuyHouseChatAction(getCost(), QUEST_SLOT));

    addJob("I'm an estate agent. In simple terms, I sell houses for the city of Kirdneh. Please ask about the #cost if you are interested. Our brochure is at #http://stendhalgame.org/wiki/StendhalHouses.");
View Full Code Here

   
    // handle house numbers 101 to 108
    addMatching(ConversationStates.QUEST_OFFERED,
         // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(getLowestHouseNumber(), getHighestHouseNumber()),
        ConversationStates.ATTENDING,
        null,
        new BuyHouseChatAction(getCost(), QUEST_SLOT));
   
View Full Code Here

// handle house numbers 1 to 25
addMatching(ConversationStates.QUEST_OFFERED,
    // match for all numbers as trigger expression
    ExpressionType.NUMERAL, new JokerExprMatcher(),
    new TextHasNumberCondition(getLowestHouseNumber(), getHighestHouseNumber()),
    ConversationStates.ATTENDING,
    null,
    new BuyHouseChatAction(getCost(), QUEST_SLOT));

addJob("I'm an estate agent. In simple terms, I sell houses to those who have been granted #citizenship. They #cost a lot, of course. Our brochure is at #http://stendhalgame.org/wiki/StendhalHouses.");
View Full Code Here

   
    // handle house numbers getLowestHouseNumber() - getHighestHouseNumber()
    addMatching(ConversationStates.QUEST_OFFERED,
         // match for all numbers as trigger expression
        ExpressionType.NUMERAL, new JokerExprMatcher(),
        new TextHasNumberCondition(getLowestHouseNumber(), getHighestHouseNumber()),
        ConversationStates.ATTENDING,
        null,
        new BuyHouseChatAction(getCost(), QUEST_SLOT));
   
    addJob("I'm an estate agent. In simple terms, I sell houses for the city of Ados. Please ask about the #cost if you are interested. Our brochure is at #http://stendhalgame.org/wiki/StendhalHouses.");
View Full Code Here

        });
    // 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() {
          public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {

                        final String room = Integer.toString(sentence.getNumeral().getAmount());
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.condition.TextHasNumberCondition

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.