- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
millers
Hello i tried to import npc buffer but i get this error
Edited in General.properties :
# Default: False
CustomNpcBufferTables = True
# Default: False
CustomNpcTable = True
and mysql table custom_npcaidata is empty
why i get this error ?
here is the part from npctable.java
//------------------------------------------------------------------- //NPC AI Attributes & Data ... try { PreparedStatement statement10 = con.prepareStatement("SELECT " + L2DatabaseFactory.getInstance().safetyString(new String[] {"npc_id", "primary_attack","skill_chance","can_move","soulshot","spiritshot","sschance","spschance","minrangeskill","minrangechance","maxrangeskill","maxrangechance","ischaos","clan","clan_range","enemyClan","enemyRange","ai_type","dodge"}) + " FROM npcaidata ORDER BY npc_id"); ResultSet NpcAIDataTable = statement10.executeQuery(); L2NpcAIData npcAIDat = null; L2NpcTemplate npcDat = null; int cont=0; while (NpcAIDataTable.next()) { int npc_id = NpcAIDataTable.getInt("npc_id"); npcDat = _npcs.get(npc_id); if (npcDat == null) { _log.severe("NPCTable: AI Data Error with id : " + npc_id); continue; } npcAIDat = new L2NpcAIData(); npcAIDat.setPrimaryAttack(NpcAIDataTable.getInt("primary_attack")); npcAIDat.setSkillChance(NpcAIDataTable.getInt("skill_chance")); npcAIDat.setCanMove(NpcAIDataTable.getInt("can_move")); npcAIDat.setSoulShot(NpcAIDataTable.getInt("soulshot")); npcAIDat.setSpiritShot(NpcAIDataTable.getInt("spiritshot")); npcAIDat.setSoulShotChance(NpcAIDataTable.getInt("sschance")); npcAIDat.setSpiritShotChance(NpcAIDataTable.getInt("spschance")); npcAIDat.setIsChaos(NpcAIDataTable.getInt("ischaos")); npcAIDat.setShortRangeSkill(NpcAIDataTable.getInt("minrangeskill")); npcAIDat.setShortRangeChance(NpcAIDataTable.getInt("minrangechance")); npcAIDat.setLongRangeSkill(NpcAIDataTable.getInt("maxrangeskill")); npcAIDat.setLongRangeChance(NpcAIDataTable.getInt("maxrangechance")); //npcAIDat.setSwitchRangeChance(NpcAIDataTable.getInt("rangeswitchchance")); npcAIDat.setClan(NpcAIDataTable.getString("clan")); npcAIDat.setClanRange(NpcAIDataTable.getInt("clan_range")); npcAIDat.setEnemyClan(NpcAIDataTable.getString("enemyClan")); npcAIDat.setEnemyRange(NpcAIDataTable.getInt("enemyRange")); npcAIDat.setDodge(NpcAIDataTable.getInt("dodge")); npcAIDat.setAi(NpcAIDataTable.getString("ai_type")); //npcAIDat.setBaseShldRate(NpcAIDataTable.getInt("baseShldRate")); //npcAIDat.setBaseShldDef(NpcAIDataTable.getInt("baseShldDef")); //npcDat.addAIData(npcAIDat); npcDat.setAIData(npcAIDat); cont++; } NpcAIDataTable.close(); statement10.close(); _log.info("NPC AI Data Table: Loaded " + cont + " AI Data."); } catch (Exception e) { _log.log(Level.SEVERE, "NPCTable: Error reading NPC AI Data: " + e.getMessage(), e); }I'm Using l2jserver !!!
3 answers to this question
Recommended Posts