Can't add a npc with sql file

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
ADONES
Posts: 51
Joined: Sun Dec 06, 2009 10:28 pm

Can't add a npc with sql file

Post by ADONES »

Hello Dudes,

i'm running the Epilogue with nighly pack and want to add some custom npcs like i did on Gracia Final.

I tryed it with the same sql file like i did at Gracia Final but it dont work... I tryed add them to "custom_npc" table that works.. i can see them in the Database but can not spawn them everytime ingame brings the error "Target cannot be found". If i try to add them to normal "npc" table it dont works... i checked the id's if some are double but there are no double id's.. so it should work i guess... but it don't.

Example of my try:

Code: Select all

REPLACE INTO `npc` VALUES (40001, 31126, 'Blacksmith of Mammon', 1, 'L2House', 1, 'NPC.e_smith_master_MDwarf', 08.00, 16.50, 70, 'male', 'L2Merchant', 40, 3862, 1494, 0.00, 0.00, 40, 43, 30, 21, 20, 20, 0, 0, 1303, 471, 607, 382, 253, 0, 333, 0, 0, 0, 30, 132, 'NULL', 0, 0, 0, 'LAST_HIT', 0, 0, 0, 'fighter', 'false'); 
I also already tryed the ' everywhere.

Can someone help me? Or whrite me an sql how to insert my npcs?

Thank you in advance
sincerely yours
ADONES
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Can't add a npc with sql file

Post by Probe »

paste the sql line error you get, or simply do as follows:
copy the existing SQL entry of Blacksmith of Mammon, and just put in a new id (keep template id as default)
User avatar
LasTravel
Posts: 888
Joined: Tue Jan 05, 2010 12:08 am
Location: Spain

Re: Can't add a npc with sql file

Post by LasTravel »

ADONES wrote:

Code: Select all

REPLACE INTO `npc` VALUES (40001, 31126, 'Blacksmith of Mammon', 1, 'L2House', 1, 'NPC.e_smith_master_MDwarf', 08.00, 16.50, 70, 'male', 'L2Merchant', 40, 3862, 1494, 0.00, 0.00, 40, 43, 30, 21, 20, 20, 0, 0, 1303, 471, 607, 382, 253, 0, 333, 0, 0, 0, 30, 132, 'NULL', 0, 0, 0, 'LAST_HIT', 0, 0, 0, 'fighter', 'false'); 
try:

Code: Select all

REPLACE INTO `npc` VALUES ('40001', '31126', 'Blacksmith of Mammon', '1', 'L2House', '1', 'NPC.e_smith_master_MDwarf', '08.00', '16.50', '70', 'male', 'L2Merchant', '40', '3862', '1494', '11.85', '2.78', '40', '43', '30', '21', '20', '10', '0', '0', '1314', '470', '780', '382', '278', '0', '333', '0', '0', '0', '0', '50', '120', 'NULL', '0', '1', '0', 'LAST_HIT', '0', '0', '0', 'fighter', 'false');
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Can't add a npc with sql file

Post by janiii »

Custom npc table has to be enabled in config.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ADONES
Posts: 51
Joined: Sun Dec 06, 2009 10:28 pm

Re: Can't add a npc with sql file

Post by ADONES »

Thanks for your help..

i tried with that code u whrote me las... but i still get this error..

Code: Select all

[Err] 1136 - Column count doesn't match value count at row 1[Err] REPLACE INTO `npc` VALUES ('40001', '31126', 'Blacksmith of Mammon', '1', 'L2House', '1', 'NPC.e_smith_master_MDwarf', '08.00', '16.50', '70', 'male', 'L2Merchant', '40', '3862', '1494', '11.85', '2.78', '40', '43', '30', '21', '20', '10', '0', '0', '1314', '470', '780', '382', '278', '0', '333', '0', '0', '0', '0', '50', '120', 'NULL', '0', '1', '0', 'LAST_HIT', '0', '0', '0', 'fighter', 'false');[Msg] Finished - Unsuccessfully
and janiii... i already activated custom npc table in the General config... still dont work.. any other ideas?

ty
sincerely yours
ADONES
User avatar
LasTravel
Posts: 888
Joined: Tue Jan 05, 2010 12:08 am
Location: Spain

Re: Can't add a npc with sql file

Post by LasTravel »

try:

Code: Select all

INSERT INTO `custom_npc` VALUES ('40001', '31126', 'Blacksmith of Mammon', '1', 'L2House', '1', 'NPC.e_smith_master_MDwarf', '08.00', '16.50', '70', 'male', 'L2Merchant', '40', '3862', '1494', '11.85', '2.78', '40', '43', '30', '21', '20', '10', '0', '0', '1314', '470', '780', '382', '278', '0', '333', '0', '0', '0', '0', '50', '120', 'NULL', '0', '1', '0', 'LAST_HIT', '0', '0', '0', 'fighter', 'false');
[/quote]
ADONES
Posts: 51
Joined: Sun Dec 06, 2009 10:28 pm

Re: Can't add a npc with sql file

Post by ADONES »

I already got this npc in my custom_npc list.. :D but if i want to spawn him it says "Target cannot be found" thats... why i asked to insert him to normal npc table...
User avatar
qwerty13
Posts: 640
Joined: Mon Feb 02, 2009 9:57 am
Location: Europe
Contact:

Re: Can't add a npc with sql file

Post by qwerty13 »

Check configs, maybe you forgot to enable this table?
ADONES
Posts: 51
Joined: Sun Dec 06, 2009 10:28 pm

Re: Can't add a npc with sql file

Post by ADONES »

and janiii... i already activated custom npc table in the General config... still dont work.. any other ideas?
Post Reply