Page 1 of 1

[HELP] Custom Tables

Posted: Tue May 25, 2010 6:10 pm
by zatei
L2J Revision Number: 4213
L2JDP Revision Number: 7429

Hi guys!

I want to understand a logic of spawning/deleting custom/standart mobs and npc's.
Today I was cleaned my DB and found many crap in my custom_notspawned and custom_spawnlist tables.

So i was opened config file and found this:

Code: Select all

# ---------------------------------------------------------------------------# Database Custom Tables# ---------------------------------------------------------------------------# Default: FalseCustomSpawnlistTable = True # Option to save GM spawn only in the custom table.# Default: FalseSaveGmSpawnOnCustom = True # Option to delete spawn in alternate table.# Default: FalseDeleteGmSpawnOnCustom = True etc...
So if i delete any STANDART spawn from server it will not physically delete spawn from "spawnlist" table but it will add a new line in "custom_notspawned" table and it's great idea if you don't want to have a problems with restoring missing spawns in future.

But if i delete any CUSTOM spawn from server it will make same things and this is not good, i think. I personally don't want to collect thousands of old spawns that i have spawned and deleted in testing purposes.

Is there any way to make the server to delete CUSTOM spawns from "custom_spawnlist" table when i delete any CUSTOM spawned NPC or Mob? If not in configs maybe in the core?

Re: [HELP] Custom Tables

Posted: Tue May 25, 2010 6:54 pm
by jurchiks
You can't separate them, but you can simply delete the records from notspawned that are marked as custom npc spawns (DELETE FROM `custom_notspawned` WHERE isCustom=1). I dunno if those mark also self-spawned npcs from normal npc table or just from custom_npc table.

Re: [HELP] Custom Tables

Posted: Tue May 25, 2010 7:02 pm
by zatei
Yes, i know, but lines in "custom_spawnlist" table will not delete with this way and my "deleted" spawns will appear in their positions.

5 mins ago i finished to compare/clean both tables manually, very crappy way :(

Re: [HELP] Custom Tables

Posted: Tue May 25, 2010 7:14 pm
by janiii

Code: Select all

DELETE FROM custom_spawnlist WHERE id IN (SELECT id FROM custom_notspawned WHERE isCustom = 1);DELETE FROM custom_notspawned WHERE isCustom = 1;

Re: [HELP] Custom Tables

Posted: Tue May 25, 2010 9:37 pm
by zatei
Oh shi!

Thank you master! :)

I think this is need to be added to database_installer.*

Re: [HELP] Custom Tables

Posted: Tue May 25, 2010 9:43 pm
by jurchiks
no it doesn't, it's only for you, not for many

Re: [HELP] Custom Tables

Posted: Wed May 26, 2010 12:12 am
by zatei
Who need this unusefull data in DB? For what?

For what do you need 2 strokes instead of 0 strokes in your DB if only benefit is looking for some ID's in that strokes?
You even don't know in what location it was been spawned, only XYZ coords.

For what?!?