Jump to content
  • 0

[Help] Character restriction


bjorkker02

Question

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

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

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