View Single Post
  #5  
Old 07-29-2013, 12:05 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

you are doing an insert without declaring the columns.. this is a horrible practice and leads specifically to this type of issue.

Here:
Code:
INSERT INTO `npc_types` (`id`,`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`)
	SELECT 223097 AS `id`,'zone_status' AS `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` = 223171;
Note, you should be specifying the id of the new NPC also.
Reply With Quote