Page 1 of 1

Error creating custom NPC table

Posted: Mon May 02, 2011 1:50 am
by sabiduria2012
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:4601
L2JDP Revision Number:7968

Code: Select all

NPCTable: Error creating custom NPC table.com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'critical' in 'field list'        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)        at java.lang.reflect.Constructor.newInstance(Unknown Source)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)        at com.mysql.jdbc.Util.getInstance(Util.java:386)        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)        at com.l2jserver.gameserver.datatables.NpcTable.restoreNpcData(NpcTable.java:104)        at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:64)         at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:49)         at com.l2jserver.gameserver.datatables.NpcTable$SingletonHolder.<clinit>(NpcTable.java:919)        at com.l2jserver.gameserver.datatables.NpcTable.getInstance(NpcTable.java:57)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:265)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:491) NpcTable: Loaded 517 Minions.Unclosed connection! Trace: com.l2jserver.gameserver.datatables.NpcTable.restoreNpcData(NpcTable.java:75)java.lang.RuntimeException        at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:227)        at com.l2jserver.gameserver.datatables.NpcTable.restoreNpcData(NpcTable.java:75)        at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:64)         at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:49)         at com.l2jserver.gameserver.datatables.NpcTable$SingletonHolder.<clinit>(NpcTable.java:919)        at com.l2jserver.gameserver.datatables.NpcTable.getInstance(NpcTable.java:57)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:265)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:491) NPC AI Data Table: Loaded 10088 AI Data.NPCTable: Error reading NPC Custom AI Data: Unknown column 'can_move' in 'fieldlist'com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'can_move' in 'field list'        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)        at java.lang.reflect.Constructor.newInstance(Unknown Source)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)        at com.mysql.jdbc.Util.getInstance(Util.java:386)        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)        at com.l2jserver.gameserver.datatables.NpcTable.restoreNpcData(NpcTable.java:423)        at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:64)         at com.l2jserver.gameserver.datatables.NpcTable.<init>(NpcTable.java:49)         at com.l2jserver.gameserver.datatables.NpcTable$SingletonHolder.<clinit>(NpcTable.java:919)        at com.l2jserver.gameserver.datatables.NpcTable.getInstance(NpcTable.java:57)        at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:265)        at com.l2jserver.gameserver.GameServer.main(GameServer.java:491)

Code: Select all

CREATE TABLE IF NOT EXISTS `custom_npc`(  `id` mediumint(7) unsigned NOT NULL DEFAULT '0',  `idTemplate` smallint(5) unsigned NOT NULL DEFAULT '0',  `name` varchar(200) NOT NULL DEFAULT '',  `serverSideName` tinyint(1) NOT NULL DEFAULT '1',  `title` varchar(45) NOT NULL DEFAULT '',  `serverSideTitle` tinyint(1) NOT NULL DEFAULT '1',  `class` varchar(200) DEFAULT NULL,  `collision_radius` decimal(6,2) DEFAULT NULL,  `collision_height` decimal(6,2) DEFAULT NULL,  `level` tinyint(2) DEFAULT NULL,  `sex` enum('etc','female','male') NOT NULL DEFAULT 'etc',  `type` varchar(22) DEFAULT NULL,  `attackrange` smallint(4) DEFAULT NULL,  `hp` decimal(8,0) DEFAULT NULL,  `mp` decimal(8,0) DEFAULT NULL,  `hpreg` decimal(6,2) DEFAULT NULL,  `mpreg` decimal(6,2) DEFAULT NULL,  `str` tinyint(2) NOT NULL DEFAULT '40',  `con` tinyint(2) NOT NULL DEFAULT '43',  `dex` tinyint(2) NOT NULL DEFAULT '30',  `int` tinyint(2) NOT NULL DEFAULT '21',  `wit` tinyint(2) NOT NULL DEFAULT '20',  `men` tinyint(2) NOT NULL DEFAULT '20',  `exp` int(9) NOT NULL DEFAULT '0',  `sp` int(9) NOT NULL DEFAULT '0',  `patk` mediumint(6) DEFAULT NULL,  `pdef` mediumint(6) DEFAULT NULL,  `matk` mediumint(6) DEFAULT NULL,  `mdef` mediumint(6) DEFAULT NULL,  `atkspd` smallint(4) NOT NULL DEFAULT '230',  `critical` tinyint(1) NOT NULL DEFAULT '1',  `aggro` smallint(4) NOT NULL DEFAULT '0',  `matkspd` smallint(4) NOT NULL DEFAULT '333',  `rhand` smallint(5) unsigned NOT NULL DEFAULT '0',  `lhand` smallint(5) unsigned NOT NULL DEFAULT '0',  `enchant` tinyint(1) NOT NULL DEFAULT '0',  `walkspd` smallint(3) NOT NULL DEFAULT '60',  `runspd` smallint(3) NOT NULL DEFAULT '120',  `targetable` tinyint(1) NOT NULL DEFAULT '1',  `show_name` tinyint(1) NOT NULL DEFAULT '1',  `dropHerbGroup` tinyint(1) NOT NULL DEFAULT '0',  `basestats` tinyint(1) NOT NULL DEFAULT '0',  PRIMARY KEY (`id`)); INSERT IGNORE INTO `custom_npc` VALUES(50007,31324,'Andromeda',1,'L2J Wedding Manager',1,'NPC.a_casino_FDarkElf',8.00,23.00,70,'female','L2WeddingManager',40,2444,2444,0.00,0.00,10,10,10,10,10,10,0,0,500,500,500,500,278,1,0,333,0,0,0,28,120,0,0,0,0),(70010,31606,'Catrina',1,'L2J TvT Event Manager',1,'Monster2.queen_of_cat',8.00,15.00,70,'female','L2TvTEventNpc',40,2444,2444,0.00,0.00,10,10,10,10,10,10,0,0,500,500,500,500,278,1,0,333,0,0,0,28,120,0,0,0,0),(1000003,32226,'Shiela',1,'L2J NPC Buffer',1,'LineageNPC2.K_F1_grand',11.00,22.25,70,'male','L2NpcBuffer',40,2444,2444,0.00,0.00,10,10,10,10,10,10,0,0,500,500,500,500,278,1,0,333,0,0,0,28,120,0,0,0,0),-- eventmod Elpies(900100,20432,'Elpy',1,'',1,'LineageMonster.elpy',5.00,4.50,1,'male','L2EventMonster',40,40,36,3.16,0.91,40,43,30,21,20,20,35,2,8,40,7,25,230,1,0,333,0,0,0,50,80,0,0,0,0),-- eventmod Rabbits(900101,32365,'Snow',1,'Event Manager',1,'LineageNPC2.TP_game_staff',5.00,12.50,70,'male','L2Npc',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,1,0,333,0,0,0,68,109,1,1,0,0),(900102,13098,'Event Treasure Chest',1,'',1,'LineageMonster.mimic_even',8.50,8.50,80,'male','L2EventChest',40,2880,1524,0.00,0.00,40,43,30,21,20,20,0,0,1499,577,1035,384,230,1,0,253,0,0,0,1,1,0,0,0,0),-- eventmod Race(900103,32365,'Start',1,'Event Manager',1,'LineageNPC2.TP_game_staff',5.00,12.50,70,'male','L2Npc',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,1,0,333,0,0,0,68,109,0,0,0,0),(900104,32365,'Finish',1,'Event Manager',1,'LineageNPC2.TP_game_staff',5.00,12.50,70,'male','L2Npc',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,1,0,333,0,0,0,68,109,0,0,0,0); 
For mas that I have treated I have not found which is the mistake or wherefrom it comes ... already activate the gameserver of gamserver/config/general.propierties and in the same one activate the table of custom npc

Also observe some related topics but sera did not give to me the clear response much abuse that someone throws a hand? Thank you and forgive the inconvenience.

Re: Error creating custom NPC table

Posted: Mon May 02, 2011 2:05 am
by hope
NPCTable: Error creating custom NPC table.
Unknown column 'critical' in 'field list'
        NPC AI Data Table: Loaded 10088 AI Data.
NPCTable: Error reading NPC Custom AI Data: Unknown column 'can_move' in 'field
list'


update your tables

Re: Error creating custom NPC table

Posted: Mon May 02, 2011 2:08 am
by sabiduria2012
If you realize in the sql not this table of "critical" not other one ... since you hope that you erase something that not this one? Already certainly that looks for them and this it is the problem that he says to me that it must not be but to appear as mistake. Many graces pro your response.
______________________________________________________________________________________________
I edit the topic and place the solution of the same one ... edit the sql and agregenle this one erasing everything what existed.

custom_npcaidata

Code: Select all

CREATE TABLE IF NOT EXISTS `custom_npcaidata` (  `npc_id` int(5) NOT NULL DEFAULT '0',  `skill_chance` int(3) DEFAULT NULL,  `primary_attack` int(1) DEFAULT NULL,  `can_move` tinyint(1) NOT NULL DEFAULT '1',  `minrangeskill` int(5) DEFAULT NULL,  `minrangechance` int(3) DEFAULT NULL,  `maxrangeskill` int(5) DEFAULT NULL,  `maxrangechance` int(3) DEFAULT NULL,  `soulshot` int(4) DEFAULT '0',  `spiritshot` int(4) DEFAULT '0',  `spschance` int(3) DEFAULT '0',  `sschance` int(3) DEFAULT '0',  `ischaos` int(4) DEFAULT NULL,  `clan` varchar(40) DEFAULT NULL,  `clan_range` int(4) DEFAULT NULL,  `enemyRange` int(4) DEFAULT NULL,  `enemyClan` varchar(40) DEFAULT NULL,  `dodge` int(3) DEFAULT NULL,  `ai_type` varchar(8) DEFAULT 'fighter',  PRIMARY KEY (`npc_id`));

Re: Error creating custom NPC table

Posted: Mon May 02, 2011 3:36 am
by hope