Page 1 of 1

ScriptZone

Posted: Sat Oct 10, 2009 5:25 pm
by XavierElf
Somebody can explain how correctly to use ScriptZone? :?:

Re: ScriptZone

Posted: Sat Oct 10, 2009 5:53 pm
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.

Re: ScriptZone

Posted: Sat Oct 10, 2009 6:34 pm
by XavierElf
And how to specify to a script to be activated in a certain zone?

Re: ScriptZone

Posted: Sun Oct 11, 2009 9:48 am
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);}