Jump to content
  • 0

shop zone


Question

2 answers to this question

Recommended Posts

  • 0
Posted

You will have to create new Zone Type (if there isn't one already created)

 

Take a look for example how does Peace Zone type works (check chode from gamserver/model/zones/type)

  • 0
Posted

The most simplest && efficient way to block all towns without condition is to change in core the TownZone.

 

In gameserver.model.zone.type, find L2TownZone.java

 

Replace onEnter/onExit methods with that code :

 

	@Override
protected void onEnter(L2Character character)
{
	if (character instanceof L2PcInstance)
	{
		// PVP possible during siege, now for siege participants only
		// Could also check if this town is in siege, or if any siege is going on
		if (((L2PcInstance) character).getSiegeState() != 0 && Config.ZONE_TOWN == 1)
			return;

		//((L2PcInstance)character).sendMessage("You entered "+_townName);
	}

	if (_isPeaceZone && Config.ZONE_TOWN != 2)
		character.setInsideZone(L2Character.ZONE_PEACE, true);

	character.setInsideZone(L2Character.ZONE_TOWN, true);
	character.setInsideZone(L2Character.ZONE_NOSTORE, true);
}

@Override
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);
	character.setInsideZone(L2Character.ZONE_NOSTORE, false);
}

 

If you want to make special little zones inside town, and not all the superficy of the town, just do as Matim said.

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