Jump to content
  • 0

[Help] Character restriction


Question

Posted

Hello folks then .. :-[

 

I need help with my AIOs since restrict them from leaving towns is hard

so I would know how to use a punishment for such

 

In L2TownZone.java this

protected void onExit(L2Character character)
{
	// TODO: there should be no exit if there was possibly no enter
	if (_isPeaceZone)
		character.setInsideZone(L2Character.ZONE_PEACE, false);

	character.setInsideZone(L2Character.ZONE_TOWN, false);

if (character instanceof L2PcInstance)

{	
		if (((L2PcInstance)character).isDonator() && getTownId() == 7)

		{
			((L2PcInstance)character).sendMessage("AIOs can't leave town. You are now back.");
            ((L2PcInstance)character).teleToLocation(MapRegionTable.TeleportWhereType.Town);
		}
		else if (((L2PcInstance)character).isDonator() && getTownId() == 8)
		{
			((L2PcInstance)character).sendMessage("AIOs can't leave town. You are now back.");
            ((L2PcInstance)character).teleToLocation(MapRegionTable.TeleportWhereType.Town);
		}
		else
			((L2PcInstance)character).sendMessage("You have entered a non-restricted area.");
			 		}

  }		

 

 

It works, but the restriction also applies when it goes to Town to Town .. here's how to limit access only to towns with ID 1-13!?

thx

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..