Jump to content
  • 0

shop zone


m4s4cru
 Share

Question

2 answers to this question

Recommended Posts

  • 0

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)

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share



×
×
  • 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 Disbaled AdBlock