New spawn table

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
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

New spawn table

Post by samusiuks »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:
Last edited by samusiuks on Sun Apr 25, 2010 8:58 am, edited 5 times in total.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: New spawn table

Post by jurchiks »

what's the point of this "new spawn system"?
also statement.setInt(1, 1); starts from 0, not 1
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: New spawn table

Post by JIV »

jurchiks wrote:also statement.setInt(1, 1); starts from 0, not 1
read PreparedStatement javadoc
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: New spawn table

Post by jurchiks »

oops, my mistake
sometimes i don't get java, some things start with 0, some with 1...
probly not the only language with this though
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

any ideas what's wrong?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: New spawn table

Post by janiii »

you are missing

Code: Select all

spawn.init();
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

It works ,thank you ^^.
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

The npcs spawns fine now ,but when a delete code is triggered in game npcs aren't deleted.
The first code and this one is in separate files.

Code: Select all

    public final List<L2Spawn> getNpcs()    {        return _npcs;    }

Code: Select all

public void unspawnNpcs()	{		for (L2Spawn spawn : getNpcs())		{			if (spawn == null)				continue; 			spawn.stopRespawn();			spawn.getLastSpawn().doDie(spawn.getLastSpawn());		} 		getNpcs().clear();	}
Last edited by samusiuks on Fri Apr 23, 2010 12:50 pm, edited 1 time in total.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: New spawn table

Post by JIV »

use delete()
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

delete doesn't work here ,it needs a cast ,but if you add one nothing is changed.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: New spawn table

Post by janiii »

Code: Select all

spawn.stopRespawn();spawn.getLastSpawn().deleteMe();
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

.
Last edited by samusiuks on Sun Apr 25, 2010 8:59 am, edited 2 times in total.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: New spawn table

Post by janiii »

where is the delete function?

hints for code: before loading the spawn table, you should clear the contents of the list so that you dont have double spawns.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
samusiuks
Posts: 20
Joined: Mon May 04, 2009 10:55 am

Re: New spawn table

Post by samusiuks »

So i need to delete those spawns from the Spawn Table load .I have no idea how to delete those ...I used the delete code from castle ,but i get errors with no explanation.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: New spawn table

Post by janiii »

I cant give you support if you dont answer my questions!
What is your delete function - with what code do you delete the spawntable?
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Post Reply