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.

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