Examples of BehaviourAction


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

            + "' and at most #'stake " + MAX_STAKE
            + "' pieces of gold. So, how much will you risk?", null);

    ramon.add(ConversationStates.ATTENDING, "stake", null,
        ConversationStates.ATTENDING, null,
        new BehaviourAction(new Behaviour(), "stake", "offer") {
          @Override
          public void fireSentenceError(Player player, Sentence sentence, EventRaiser npc) {
                npc.say(sentence.getErrorString() + " Just tell me how much you want to risk, for example #'stake 50'.");
          }
View Full Code Here

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

        addHelp("You can't get into the imperial city of Sedah without a key.");
        addQuest("The only favour I need is cold hard cash.");
        addOffer("Only a #bribe could persuade me to hand over the key to that gate.");

        addReply("bribe", null,
          new BehaviourAction(new Behaviour("money"), "bribe", "offer") {
            @Override
            public void fireSentenceError(Player player, Sentence sentence, EventRaiser raiser) {
              raiser.say(sentence.getErrorString() + " Are you trying to trick me? Bribe me some number of coins!");
            }
View Full Code Here

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

              + ".", null);
    }

    engine.add(ConversationStates.ATTENDING, action, null, false,
        ConversationStates.ATTENDING, null,
        new BehaviourAction(outfitBehaviour, action, "offer") {
          @Override
          public void fireRequestOK(final ItemParserResult res, Player player, Sentence sentence, EventRaiser raiser) {
            // find out what the player wants to wear

            // We ignore any amounts.
View Full Code Here

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

        new AndCondition(
            new NotCondition(new SentenceHasErrorCondition()),
            buyerBehaviour.getTransactionCondition()),
        false, ConversationStates.ATTENDING,
        null,
        new BehaviourAction(buyerBehaviour, "sell", "buy") {
          @Override
          public void fireRequestOK(final ItemParserResult res, final Player player, final Sentence sentence, final EventRaiser raiser) {
            if (player.isBadBoy()) {
              // don't buy from player killers at all
              raiser.say("Sorry, but I just can't trust you. You look too dangerous to deal with. Please go away.");
View Full Code Here

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

      new NotCondition(new SentenceHasErrorCondition()),
      sellerBehaviour.getTransactionCondition());

    engine.add(ConversationStates.ATTENDING, "buy", condition, false,
        ConversationStates.ATTENDING, null,
        new BehaviourAction(sellerBehaviour, "buy", "sell") {
          @Override
          public void fireRequestOK(final ItemParserResult res, final Player player, final Sentence sentence, final EventRaiser raiser) {
            String chosenItemName = res.getChosenItemName();

            // find out if the NPC sells this item, and if so,
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.