Package com.l2jfrozen.gameserver.model.zone.type

Examples of com.l2jfrozen.gameserver.model.zone.type.L2TownZone


    {
      int x1,y1,z1;
      x1 = getX();
      y1 = getY();
      z1 = getZ();
      L2TownZone Town;
      Town = TownManager.getInstance().getTown(x1,y1,z1);
      if(Town != null && isinTownWar() )
      {
        if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
        {
          return;
        }
        else if(Config.TW_ALL_TOWNS)
        {
View Full Code Here


    }

    Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();
    {
      int x,y,z;
      L2TownZone Town;
      byte zonaPaz = 1;

      for(L2PcInstance onlinePlayer : pls)
        if(onlinePlayer.isOnline() == 1 )
        {
          x = onlinePlayer.getX();
          y = onlinePlayer.getY();
          z = onlinePlayer.getZ();

          Town = TownManager.getInstance().getTown(x, y, z);
          if(Town != null)
          {
            if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
            {
              onlinePlayer.setInsideZone(zonaPaz, false);
              onlinePlayer.revalidateZone(true);
            }
            else if(Config.TW_ALL_TOWNS)
View Full Code Here

    }

    Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();
    {
      int xx,yy,zz;
      L2TownZone Town;
      byte zonaPaz = 1;

      for(L2PcInstance onlinePlayer : pls)
        if(onlinePlayer.isOnline() == 1 )
        {
          xx = onlinePlayer.getX();
          yy = onlinePlayer.getY();
          zz = onlinePlayer.getZ();

          Town = TownManager.getInstance().getTown(xx,yy,zz);
          if(Town != null)
          {
            if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
            {
              onlinePlayer.setInsideZone(zonaPaz, true);
              onlinePlayer.revalidateZone(true);
            }
            else if(Config.TW_ALL_TOWNS)
View Full Code Here

                {
                  temp = new L2PeaceZone(zoneId);
                }
                else if(zoneType.equals("Town"))
                {
                  temp = new L2TownZone(zoneId);
                }
                else if(zoneType.equals("OlympiadStadium"))
                {
                  temp = new L2OlympiadStadiumZone(zoneId);
                }
View Full Code Here

        return new Location(coord[0], coord[1], coord[2]);
      }
    }

    // Get the nearest town
    L2TownZone local_zone = null;
    if(activeChar!=null && (local_zone = TownManager.getInstance().getClosestTown(activeChar))!=null)
    {
      coord = local_zone.getSpawnLoc();
      return new Location(coord[0], coord[1], coord[2]);
    }
   
    local_zone = TownManager.getInstance().getTown(9); //giran
    coord = local_zone.getSpawnLoc();
    return new Location(coord[0], coord[1], coord[2]);
   
   
  }
View Full Code Here

  public final Castle getCastle()
  {
    // Get castle this NPC belongs to (excluding L2Attackable)
    if (_castleIndex < 0)
    {
      L2TownZone town = TownManager.getInstance().getTown(getX(), getY(), getZ());
     
      if (town != null)
      {
        _castleIndex = CastleManager.getInstance().getCastleIndex(town.getTaxById());
      }
     
      if (_castleIndex < 0)
      {
        _castleIndex = CastleManager.getInstance().findNearestCastlesIndex(this);
View Full Code Here

    {
      int x1, y1, z1;
      x1 = getX();
      y1 = getY();
      z1 = getZ();
      L2TownZone Town;
      Town = TownManager.getInstance().getTown(x1, y1, z1);
      if (Town != null && isinTownWar())
      {
        if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
        {
          reviveRequest(this, null, false);
        }
        else if (Config.TW_ALL_TOWNS)
        {
View Full Code Here

  {
    int x,y,z;
    x = getX();
    y = getY();
    z = getZ();
    L2TownZone Town;
    Town = TownManager.getInstance().getTown(x,y,z);
    if(Town != null && isinTownWar())
    {
      if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
      {
        getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);
        sendMessage("You received your prize for a town war kill!");
      }
      else if(Config.TW_ALL_TOWNS)
View Full Code Here

    x = getX();
    y = getY();
    z = getZ();
   
    //get local town
    L2TownZone Town = TownManager.getInstance().getTown(x,y,z);

    setPkKills(getPkKills() + 1);
   
    /*if(!Config.TW_ALLOW_KARMA && Town != null && isinTownWar())
    {
      //nothing
    }
    else */
    if(Town == null || (isinTownWar() && Config.TW_ALLOW_KARMA))
    {
      setKarma(getKarma() + newKarma);
    }
    /*else if()
    {
      setKarma(getKarma() + newKarma);
    }*/

    if(Town != null && isinTownWar())
    {
      if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
      {
        getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);
        sendMessage("You received your prize for a town war kill!");
      }
      else if(Config.TW_ALL_TOWNS && Town.getTownId() != 0)
      {
        getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);
        sendMessage("You received your prize for a town war kill!");
      }
    }
View Full Code Here

        }

        Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();
        {
          int x,y,z;
          L2TownZone Town;
          byte zonaPaz = 1;

          for(L2PcInstance onlinePlayer : pls)
            if(onlinePlayer.isOnline() == 1 )
            {
              x = onlinePlayer.getX();
              y = onlinePlayer.getY();
              z = onlinePlayer.getZ();

              Town = TownManager.getInstance().getTown(x, y, z);
              if(Town != null)
              {
                if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
                {
                  onlinePlayer.setInsideZone(zonaPaz, false);
                  onlinePlayer.revalidateZone(true);
                }
                else if(Config.TW_ALL_TOWNS)
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.zone.type.L2TownZone

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.