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

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