Examples of SellerBehaviour


Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

  public void behave(final String method, final Map<String, Integer> items)
      throws NoSuchMethodException {
    if ("buy".equalsIgnoreCase(method)) {
      new BuyerAdder().add(this, new BuyerBehaviour(items), true);
    } else if ("sell".equalsIgnoreCase(method)) {
      new SellerAdder().addSeller(this, new SellerBehaviour(items));
    } else {
      throw new NoSuchMethodException("Behaviour.add(" + method
          + ") not supported.");
    }
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

      protected void createDialog() {
        addGreeting("Welcome to the Kobold City of Wofol. I hope you come in peace.");
        addJob("I run a buying and selling #trade with kobolds - or whoever else passes by. I am one of the few Kobolds who can speak with non-Kobolds.");
        addHelp("I #deal in all sorts of items.");
        addQuest("Try Alrak the mountain dwarf who lives here with the kobolds. He'd probably have more than one task to give you.");
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("sellstuff2")), false);
        new BuyerAdder().add(this, new BuyerBehaviour(shops.get("buystuff2")), false);
        addOffer("Please look at the each blackboard on the wall to see what I buy and sell at the moment.");
        addGoodbye("Bye, and please don't attack too many of my friends.");

      }
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

        /*
         * addHelp("You may want to buy some potions or do some #task
         * for me.");
         */
        addHelp("I can #heal you, and I can #offer you powerful #scrolls that are #magic.");
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("scrolls")));
        new HealerAdder().addHealer(this, 250);
        add(
                ConversationStates.ATTENDING,
                Arrays.asList("magic", "scroll", "scrolls"),
                null,
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

        addReply(ConversationPhrases.NO_MESSAGES, "Very well, if I can help you just say.");
        addJob("I sell roses in this here market.");
        addHelp("If you need to access your funds, there is a branch of Fado bank right here in Kirdneh. It's the small building north of the museum, on the east of the city.");
        final Map<String, Integer> offerings = new HashMap<String, Integer>();
        offerings.put("rose", 50);
        new SellerAdder().addSeller(this, new SellerBehaviour(offerings));
        addGoodbye("Come back soon!");
      }
    };

    sellernpc.setEntityClass("woman_001_npc");
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

      protected void createDialog() {
        addGreeting();
        addJob("I am a wizard who sells #magic #scrolls. Just ask me for an #offer!");
        addHelp("You can take powerful magic with you on your adventures with the aid of my #magic #scrolls!");

        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("scrolls")));

        add(
                ConversationStates.ATTENDING,
                Arrays.asList("magic", "scroll", "scrolls", "magic scrolls"),
                null,
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

            "way is a bit harder.");
        addQuest("I don't have time for those things, sorry. Working.. working.. working..");
        addReply("empty sack","Oh, I got plenty of those to sell. Ask me for an #offer.");
                final Map<String, Integer> offerings = new HashMap<String, Integer>();
                offerings.put("empty sack", 10);
                new SellerAdder().addSeller(this, new SellerBehaviour(offerings));
        addGoodbye("Bye bye. Be careful on your way.");
      }
    };

    npc.setDescription("You see Karl, a friendly elderly farmer.");
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

      @Override
      protected void createDialog() {
        addGreeting();
        addJob("I am Salesman. What you?");
        addHelp("I sell nice items, look at blackboard on wall.");
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("sellbetterstuff1")), false);
        addOffer("Look at blackboard on wall to see my offer.");
        addQuest("I am so happy as I am. I want nothing.");
        addGoodbye();
      }
    };
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

        add(ConversationStates.ATTENDING, "heal", null, ConversationStates.ATTENDING, null, new HealPetsAction());

        addJob("I'm the veterinarian.");
       
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("healing")) {

          @Override
          public int getUnitPrice(final String item) {
            // Player gets 20 % rebate
            return (int) (0.8f * priceCalculator.calculatePrice(item, null));
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

      @Override
      protected void createDialog() {
        addGreeting();
        addJob("I sell good quality armor and weapons.");
        addHelp("Look at the blackboard for what I provide.");
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("sellbetterstuff2")), false);
        addOffer("Look at the blackboard to see my offer.");
        addQuest("I thank you for offering to help, but I am fine.");
        addGoodbye();
      }
    };
View Full Code Here

Examples of games.stendhal.server.entity.npc.behaviour.impl.SellerBehaviour

        addJob("I'm looking after the weaponry here. We have plenty of ammunition but running low on armor. I see you have some you might #offer though.");
        addHelp("I buy armor for the barracks here, make me an #offer. If you'll keep it quiet, I'll even sell you ammunition.");
        addOffer("Please look at the blackboard by the shields rack to see what we are short of, and what we pay. I also sell a variety of arrows.");
        addQuest("Oh, thanks but no thanks. I don't need anything.");
        new BuyerAdder().add(this, new BuyerBehaviour(shops.get("buyrare3")), false);
        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("sellarrows")), false);
        addGoodbye("Goodbye, comrade.");
      }
    };

    npc.setDescription("You see Mrotho, guarding over Ados Barracks.");
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.