Examples of HousePortal


Examples of games.stendhal.server.entity.mapstuff.portal.HousePortal

    final String claimedHouse = player.getQuest(questSlot);
 
    try {
     
      final int id = Integer.parseInt(claimedHouse);
      final HousePortal portal = HouseUtilities.getHousePortal(id);
     
      final int refund = (cost * depreciationPercentage) / 100 - houseTax.getTaxDebt(portal);

      final StackableItem money = (StackableItem) SingletonRepository.getEntityManager().getItem("money");
      money.setQuantity(refund);
      player.equipOrPutOnGround(money);
 
      portal.changeLock();
      portal.setOwner("");
      // the player has sold the house. clear the slot
      player.removeQuest(questSlot);
      raiser.say("Thanks, here is your " + Integer.toString(refund)
             + " money owed, from the house value, minus any owed taxes. Now that you don't own a house "
             + "you would be free to buy another if you want to.");
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.portal.HousePortal

    if(!player.hasQuest("house")) {
      hist.add("I've never bought a house.");
      return(hist);
    }
    hist.add("I bought " +  HouseUtilities.getHousePortal(MathHelper.parseInt(player.getQuest("house"))).getDoorId() + ".")
    HousePortal playerHousePortal = HouseUtilities.getPlayersHouse(player);
    if(playerHousePortal!=null) {
      int unpaidPeriods = houseTax.getUnpaidTaxPeriods(player);
      if (unpaidPeriods>0) {
        hist.add("I owe " + Grammar.quantityplnoun(unpaidPeriods, "month", "one") + " worth of tax.");
      } else {
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.portal.HousePortal

  public void testFire() {
    BuyHouseChatAction action = new BuyHouseChatAction(1, HouseSellerNPCBase.QUEST_SLOT);
    String zoneName = "0_ados_city_n";
    StendhalRPZone ados = new StendhalRPZone(zoneName);
    MockStendlRPWorld.get().addRPZone(ados);
    housePortal = new HousePortal("schnick bla 51");
    housePortal.setIdentifier("keep rpzone happy");
    housePortal.setDestination(zoneName, "schnick bla 51");
    ados.add(housePortal);
    chest = new StoredChest();
    ados.add(chest);
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.portal.HousePortal

  @Test
  public void testAdosHouseSeller() {
    String zoneName = "0_ados_city_n";
    StendhalRPZone ados = new StendhalRPZone(zoneName);
    MockStendlRPWorld.get().addRPZone(ados);
    housePortal = new HousePortal("schnick bla 51");
    housePortal.setDestination(zoneName, "schnick bla 51");
    housePortal.setIdentifier("keep rpzone happy");
    ados.add(housePortal);
    chest = new StoredChest();
    ados.add(chest);
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.