[HELP] OnZoneEnter() event

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
fifa4ka
Posts: 7
Joined: Sun Jun 26, 2011 4:18 am

[HELP] OnZoneEnter() event

Post 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
User avatar
adelaide887
Posts: 1
Joined: Fri Sep 02, 2011 7:48 am
Contact:

Re: [HELP] OnZoneEnter() event

Post by adelaide887 »

are you fix it now? :D :D

i want to know the answer...... :lol: :lol: :lol:
i love l2jserver,and also love play games and ipad and iphone, I love play game r4 card
fifa4ka
Posts: 7
Joined: Sun Jun 26, 2011 4:18 am

Re: [HELP] OnZoneEnter() event

Post by fifa4ka »

No...my question "how to do this?"
User avatar
Origami
Posts: 21
Joined: Mon May 18, 2009 5:54 pm
Location: Moscow/Russia

Re: [HELP] OnZoneEnter() event

Post by Origami »

May be using kinda flag mobSpawned (true/false) can help? :?
Месть - это блюдо, которое подают в тапки...
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: [HELP] OnZoneEnter() event

Post by JIV »

u need own custom zone type
fifa4ka
Posts: 7
Joined: Sun Jun 26, 2011 4:18 am

Re: [HELP] OnZoneEnter() event

Post 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.
fifa4ka
Posts: 7
Joined: Sun Jun 26, 2011 4:18 am

Re: [HELP] OnZoneEnter() event

Post by fifa4ka »

UP! Need advice
Post Reply