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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...