[HELP] Custom Tables

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
User avatar
zatei
Posts: 103
Joined: Sat Apr 10, 2010 11:25 am
Location: Russia

[HELP] Custom Tables

Post 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?
Ay kan saey dat dis qest is bollsit cauise itz vaery problames in coaer drunk bear vodka matreshka balalaika...
Sorry for bad English :D
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: [HELP] Custom Tables

Post 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.
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
zatei
Posts: 103
Joined: Sat Apr 10, 2010 11:25 am
Location: Russia

Re: [HELP] Custom Tables

Post 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 :(
Ay kan saey dat dis qest is bollsit cauise itz vaery problames in coaer drunk bear vodka matreshka balalaika...
Sorry for bad English :D
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [HELP] Custom Tables

Post 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;
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
zatei
Posts: 103
Joined: Sat Apr 10, 2010 11:25 am
Location: Russia

Re: [HELP] Custom Tables

Post by zatei »

Oh shi!

Thank you master! :)

I think this is need to be added to database_installer.*
Ay kan saey dat dis qest is bollsit cauise itz vaery problames in coaer drunk bear vodka matreshka balalaika...
Sorry for bad English :D
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: [HELP] Custom Tables

Post by jurchiks »

no it doesn't, it's only for you, not for many
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
zatei
Posts: 103
Joined: Sat Apr 10, 2010 11:25 am
Location: Russia

Re: [HELP] Custom Tables

Post 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?!?
Ay kan saey dat dis qest is bollsit cauise itz vaery problames in coaer drunk bear vodka matreshka balalaika...
Sorry for bad English :D
Post Reply