Page 1 of 1

[HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 8:03 am
by fifa4ka
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:

Hi guys. I have a private server that has some features.

I'm doing a custom quest and event OnEnterZone spawn a monster. I have a problem. When character enter inside zone and triggered event OnEnterZone... mob is appears...then another mobs... and another...and another ... and so on to infinity. But I need to spawn only one monster when char enter inside zone.

Tell me how to do this?

Code: Select all

public String onEnterZone(L2Character character, L2ZoneType zone)    {           if (character instanceof L2PcInstance)        {            if (zone.getId() == CUSTOM_ZONE)            {                addSpawn(18001, character.getX()+Rnd.get(100), character.getY()+Rnd.get(100), character.getZ(), 62980, false, 0);            }        }           return super.onEnterZone(character,zone);    }
Sorry for english Iuse translator

Re: [HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 8:10 am
by adelaide887
are you fix it now? :D :D

i want to know the answer...... :lol: :lol: :lol:

Re: [HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 9:13 am
by fifa4ka
No...my question "how to do this?"

Re: [HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 10:24 am
by Origami
May be using kinda flag mobSpawned (true/false) can help? :?

Re: [HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 11:10 am
by JIV
u need own custom zone type

Re: [HELP] OnZoneEnter() event

Posted: Fri Sep 02, 2011 11:58 am
by fifa4ka
JIV wrote:u need own custom zone type
I not understand you.

I make custom zone type = "ScriptZone" shape = "cylinder" and it works. But when I go into this zone (event OnEnterZone) that spawns a lot of monsters but I need only one.

Re: [HELP] OnZoneEnter() event

Posted: Sat Sep 03, 2011 4:58 am
by fifa4ka
UP! Need advice