ScriptZone

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

ScriptZone

Post by XavierElf »

Somebody can explain how correctly to use ScriptZone? :?:
Sry for my bad english...
User avatar
devo
Posts: 798
Joined: Mon Jun 15, 2009 1:19 pm

Re: ScriptZone

Post by devo »

You need to make jython script to handle onEnter() onExit().
Its just a zone to set player in or out of zone, all effects are handled by script.
A hero of war is that what they see...
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: ScriptZone

Post by XavierElf »

And how to specify to a script to be activated in a certain zone?
Sry for my bad english...
User avatar
devo
Posts: 798
Joined: Mon Jun 15, 2009 1:19 pm

Re: ScriptZone

Post by devo »

just quick example, you have to add also onExitZone.

Code: Select all

private static final int[] ZONES = {zoneid1,zoneid2}; public String onEnterZone(L2Character character, L2ZoneType zone){	if (character instanceof L2PcInstance)	{	switch(zone.getId())	case zoneid1:		action		break;	case zoneid:		action		break;	default:		return super.onEnterZone(character,zone);	}	return super.onEnterZone(character,zone); } for (int zones : ZONES){	addEnterZoneId(zones);	addExitZoneId(zones);}  
A hero of war is that what they see...
Post Reply