Jump to content
  • 0

PartyTeleporter For L2jFrozen (4lines)


Question

Posted (edited)

hello i have a small proble on frozen (4lines)

http://prntscr.com/loli61

 


        public int getPartiesInside(int zoneId)// Calculating parties inside party area.
        {
            int i = 0;
            for (L2ZoneType zone : L2ZoneManager.getInstance().getZones(locationX, locationY, locationZ))
            {
                if (zone.getId() == zoneId)
                {
                    for (L2Character character : zone.getCharactersInside())
                    {
                        if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached()) && (((L2PcInstance) character).getParty() != null) && ((L2PcInstance) character).getParty().isLeader((L2PcInstance) character))
                        {
                            i++;
                        }
                    }
                }
            }
            return i;
        }

        public int getPlayerInside(int zoneId)// Calculating players inside party area.
        {
            int i = 0;
            for (L2ZoneType zone : L2ZoneManager.getInstance().getZone(locationX, locationY, locationZ))
            {
                if (zone.getId() == zoneId)
                {
                    for (L2Character character : zone.getCharactersInside())
                    {
                        if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached()))
                        {
                            i++;
                        }
                    }
                }
            }
            return i;
        }

zone.getCharactersInside()) and getZones in for (L2ZoneType zone : L2ZoneManager.getInstance().getZones(locationX, locationY, locationZ))

 

all code about npc

 

Edited by MarGaZeaS

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

Simply check content of L2ZoneType/L2ZoneManager  (ctrl+left click on the class name to open the file) to see by what you can edit it.

 

If you weren't lazy, you could also make a search on the sources to find existing L2ZoneManager uses.

Edited by Tryskell

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock