xible77
07-28-2013, 06:13 PM
I get this error when I try to create a new npc.
---------------------------------------------
[07.28. - 09:49:24] Starting Log: logs/eqemu_error_zone_11364.log
[07.28. - 09:49:24] NPCSpawnDB Error: INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values("Server_Greeter",1,1,1,31,0,0,0,0.000000,0,0,0,1.250000,28,28) #1364: Field 'special_abilities' doesn't have a default value
Running latest peq database dump. Any help appreciated, Thanks.
NatedogEZ
07-28-2013, 11:41 PM
This is what I do to add new NPCs.. just copy old ones lol
SELECT 1337 INTO @COPY; #ID of NPC to copy from
SELECT "Uber_new_guy" INTO @NAME; #New NPCs name
INSERT INTO npc_types SELECT
'',
@NAME,
`lastname`,
`level`,
`race`,
`class`,
`bodytype`,
`hp`,
`mana`,
`gender`,
`texture`,
`helmtexture`,
`size`,
`hp_regen_rate`,
`mana_regen_rate`,
`loottable_id`,
`merchant_id`,
`alt_currency_id`,
`npc_spells_id`,
`npc_faction_id`,
`adventure_template_id`,
`trap_template`,
`mindmg`,
`maxdmg`,
`attack_count`,
`special_abilities`,
`aggroradius`,
`face`,
`luclin_hairstyle`,
`luclin_haircolor`,
`luclin_eyecolor`,
`luclin_eyecolor2`,
`luclin_beardcolor`,
`luclin_beard`,
`drakkin_heritage`,
`drakkin_tattoo`,
`drakkin_details`,
`armortint_id`,
`armortint_red`,
`armortint_green`,
`armortint_blue`,
`d_meele_texture1`,
`d_meele_texture2`,
`prim_melee_type`,
`sec_melee_type`,
`runspeed`,
`MR`,
`CR`,
`DR`,
`FR`,
`PR`,
`Corrup`,
`see_invis`,
`see_invis_undead`,
`qglobal`,
`AC`,
`npc_aggro`,
`spawn_limit`,
`attack_speed`,
`findable`,
`STR`,
`STA`,
`DEX`,
`AGI`,
`_INT`,
`WIS`,
`CHA`,
`see_hide`,
`see_improved_hide`,
`trackable`,
`isbot`,
`exclude`,
`ATK`,
`Accuracy`,
`slow_mitigation`,
`version`,
`maxlevel`,
`scalerate`,
`private_corpse`,
`unique_spawn_by_name`,
`underwater`,
`isquest`,
`emoteid`,
`spellscale`,
`healscale`
FROM npc_types
WHERE id = @COPY
;
sorvani
07-29-2013, 12:05 PM
you are doing an insert without declaring the columns.. this is a horrible practice and leads specifically to this type of issue.
Here:
INSERT INTO `npc_types` (`id`,`name`,`lastname`,`level`,`race`,`class`,`bo dytype`,`hp`,`mana`,`gender`,`texture`,
`helmtexture`,`size`,`hp_regen_rate`,`mana_regen_r ate`,`loottable_id`,`merchant_id`,`alt_currency_id `,
`npc_spells_id`,`npc_faction_id`,`adventure_templa te_id`,`trap_template`,`mindmg`,`maxdmg`,`attack_c ount`,
`special_abilities`,`aggroradius`,`face`,`luclin_h airstyle`,`luclin_haircolor`,`luclin_eyecolor`,`lu clin_eyecolor2`,
`luclin_beardcolor`,`luclin_beard`,`drakkin_herita ge`,`drakkin_tattoo`,`drakkin_details`,`armortint_ id`,
`armortint_red`,`armortint_green`,`armortint_blue` ,`d_meele_texture1`,`d_meele_texture2`,`prim_melee _type`,
`sec_melee_type`,`runspeed`,`MR`,`CR`,`DR`,`FR`,`P R`,`Corrup`,`see_invis`,`see_invis_undead`,`qgloba l`,`AC`,
`npc_aggro`,`spawn_limit`,`attack_speed`,`findable `,`STR`,`STA`,`DEX`,`AGI`,`_INT`,`WIS`,`CHA`,`see_ hide`,
`see_improved_hide`,`trackable`,`isbot`,`exclude`, `ATK`,`Accuracy`,`slow_mitigation`,`version`,`maxl evel`,
`scalerate`,`private_corpse`,`unique_spawn_by_name `,`underwater`,`isquest`,`emoteid`,`spellscale`,`h ealscale`)
SELECT 223097 AS `id`,'zone_status' AS `name`,`lastname`,`level`,`race`,`class`,`bodytype `,`hp`,`mana`,`gender`,
`texture`,`helmtexture`,`size`,`hp_regen_rate`,`ma na_regen_rate`,`loottable_id`,`merchant_id`,`alt_c urrency_id`,
`npc_spells_id`,`npc_faction_id`,`adventure_templa te_id`,`trap_template`,`mindmg`,`maxdmg`,`attack_c ount`,
`special_abilities`,`aggroradius`,`face`,`luclin_h airstyle`,`luclin_haircolor`,`luclin_eyecolor`,`lu clin_eyecolor2`,
`luclin_beardcolor`,`luclin_beard`,`drakkin_herita ge`,`drakkin_tattoo`,`drakkin_details`,`armortint_ id`,`armortint_red`,
`armortint_green`,`armortint_blue`,`d_meele_textur e1`,`d_meele_texture2`,`prim_melee_type`,`sec_mele e_type`,
`runspeed`,`MR`,`CR`,`DR`,`FR`,`PR`,`Corrup`,`see_ invis`,`see_invis_undead`,`qglobal`,`AC`,`npc_aggr o`,`spawn_limit`,
`attack_speed`,`findable`,`STR`,`STA`,`DEX`,`AGI`, `_INT`,`WIS`,`CHA`,`see_hide`,`see_improved_hide`, `trackable`,
`isbot`,`exclude`,`ATK`,`Accuracy`,`slow_mitigatio n`,`version`,`maxlevel`,`scalerate`,`private_corps e`,`unique_spawn_by_name`,
`underwater`,`isquest`,`emoteid`,`spellscale`,`hea lscale`
FROM `npc_types` WHERE `id` = 223171;
Note, you should be specifying the id of the new NPC also.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.