Example #1
1
 //public void titem_Import()
 //{
 //    AllLists.tItemMenuData.Clear();
 //    AllLists.tItemMenu.Clear();
 //    LoadFromDatabase.LoadFromDatabaseSQL = "SELECT * FROM t_item ";
 //    foreach (DataRow row in (InternalDataCollectionBase)mySQL.GetFromQuery(LoadFromDatabase.LoadFromDatabaseSQL).Rows)
 //    {
 //        tItem titem = new tItem();
 //        titem.index = Convert.ToInt32(row["a_index"]);
 //        titem.typeIdx = Convert.ToInt32(row["a_type_idx"]);
 //        titem.subTypeIdx = Convert.ToInt32(row["a_subtype_idx"]);
 //        titem.enable = Convert.ToInt32(row["a_enable"]);
 //        titem.wearing = Convert.ToInt32(row["a_wearing"]);
 //        titem.num0 = Convert.ToInt32(row["a_num_0"]);
 //        titem.num1 = Convert.ToInt32(row["a_num_1"]);
 //        titem.num2 = Convert.ToInt32(row["a_num_2"]);
 //        titem.num3 = Convert.ToInt32(row["a_num_3"]);
 //        titem.num4 = Convert.ToInt32(row["a_num_4"]);
 //        titem.minLevel = Convert.ToInt32(row["a_level"]);
 //        titem.maxLevel = Convert.ToInt32(row["a_leve2"]);
 //        titem.weight = Convert.ToInt32(row["a_weight"]);
 //        titem.price = Convert.ToInt32(row["a_price"]);
 //        titem.maxUse = Convert.ToInt32(row["a_max_use"]);
 //        titem.skillpoint = Convert.ToInt32(row["a_skill_point"]);
 //        titem.sskillmaster = Convert.ToInt32(row["a_sskill_master"]);
 //        titem.str = Convert.ToInt32(row["a_str"]);
 //        titem.dex = Convert.ToInt32(row["a_dex"]);
 //        titem.INT = Convert.ToInt32(row["a_int"]);
 //        titem.con = Convert.ToInt32(row["a_con"]);
 //        titem.attack = Convert.ToInt32(row["a_attack"]);
 //        titem.magic = Convert.ToInt32(row["a_magic"]);
 //        titem.defense = Convert.ToInt32(row["a_defense"]);
 //        titem.resist = Convert.ToInt32(row["a_resist"]);
 //        titem.attacklevel = Convert.ToInt32(row["a_attacklevel"]);
 //        titem.defenselevel = Convert.ToInt32(row["a_defenselevel"]);
 //        titem.hp = Convert.ToInt32(row["a_hp"]);
 //        titem.mp = Convert.ToInt32(row["a_mp"]);
 //        titem.attacktype = Convert.ToInt32(row["a_attackType"]);
 //        titem.attackspeed = Convert.ToInt32(row["a_attackSpeed"]);
 //        titem.recoverhp = Convert.ToInt32(row["a_recover_hp"]);
 //        titem.recovermp = Convert.ToInt32(row["a_recover_mp"]);
 //        titem.walkspeed = Convert.ToSingle(row["a_walk_speed"]);
 //        titem.runspeed = Convert.ToSingle(row["a_run_speed"]);
 //        titem.skill0 = Convert.ToString(row["a_skill0"]);
 //        titem.skill1 = Convert.ToString(row["a_skill1"]);
 //        titem.skill2 = Convert.ToString(row["a_skill2"]);
 //        titem.skill3 = Convert.ToString(row["a_skill3"]);
 //        titem.drop0 = Convert.ToInt32(row["a_item_0"]);
 //        titem.drop1 = Convert.ToInt32(row["a_item_1"]);
 //        titem.drop2 = Convert.ToInt32(row["a_item_2"]);
 //        titem.drop3 = Convert.ToInt32(row["a_item_3"]);
 //        titem.drop4 = Convert.ToInt32(row["a_item_4"]);
 //        titem.drop5 = Convert.ToInt32(row["a_item_5"]);
 //        titem.drop6 = Convert.ToInt32(row["a_item_6"]);
 //        titem.drop7 = Convert.ToInt32(row["a_item_7"]);
 //        titem.drop8 = Convert.ToInt32(row["a_item_8"]);
 //        titem.drop9 = Convert.ToInt32(row["a_item_9"]);
 //        titem.drop10 = Convert.ToInt32(row["a_item_10"]);
 //        titem.drop11 = Convert.ToInt32(row["a_item_11"]);
 //        titem.drop12 = Convert.ToInt32(row["a_item_12"]);
 //        titem.jewel7 = Convert.ToInt32(row["a_jewel_7"]);
 //        titem.jewel8 = Convert.ToInt32(row["a_jewel_8"]);
 //        titem.jewel9 = Convert.ToInt32(row["a_jewel_9"]);
 //        titem.jewel10 = Convert.ToInt32(row["a_jewel_10"]);
 //        titem.jewel11 = Convert.ToInt32(row["a_jewel_11"]);
 //        titem.jewel12 = Convert.ToInt32(row["a_jewel_12"]);
 //        titem.jewel13 = Convert.ToInt32(row["a_jewel_13"]);
 //        titem.jewel14 = Convert.ToInt32(row["a_jewel_14"]);
 //        titem.jewel15 = Convert.ToInt32(row["a_jewel_15"]);
 //        titem.jewel16 = Convert.ToInt32(row["a_jewel_16"]);
 //        titem.jewel17 = Convert.ToInt32(row["a_jewel_17"]);
 //        titem.jewel18 = Convert.ToInt32(row["a_jewel_18"]);
 //        titem.jewel19 = Convert.ToInt32(row["a_jewel_19"]);
 //        titem.jeweldrop0 = Convert.ToInt32(row["a_jewel_percent_0"]);
 //        titem.jeweldrop1 = Convert.ToInt32(row["a_jewel_percent_1"]);
 //        titem.jeweldrop2 = Convert.ToInt32(row["a_jewel_percent_2"]);
 //        titem.jeweldrop3 = Convert.ToInt32(row["a_jewel_percent_3"]);
 //        titem.jeweldrop4 = Convert.ToInt32(row["a_jewel_percent_4"]);
 //        titem.jeweldrop5 = Convert.ToInt32(row["a_jewel_percent_5"]);
 //        titem.jeweldrop6 = Convert.ToInt32(row["a_jewel_percent_6"]);
 //        titem.jeweldrop7 = Convert.ToInt32(row["a_jewel_percent_7"]);
 //        titem.jeweldrop8 = Convert.ToInt32(row["a_jewel_percent_8"]);
 //        titem.jeweldrop9 = Convert.ToInt32(row["a_jewel_percent_9"]);
 //        titem.jeweldrop10 = Convert.ToInt32(row["a_jewel_percent_10"]);
 //        titem.jeweldrop11 = Convert.ToInt32(row["a_jewel_percent_11"]);
 //        titem.jeweldrop12 = Convert.ToInt32(row["a_jewel_percent_12"]);
 //        titem.jeweldrop13 = Convert.ToInt32(row["a_jewel_percent_13"]);
 //        titem.jeweldrop14 = Convert.ToInt32(row["a_jewel_percent_14"]);
 //        titem.jeweldrop15 = Convert.ToInt32(row["a_jewel_percent_15"]);
 //        titem.jeweldrop16 = Convert.ToInt32(row["a_jewel_percent_16"]);
 //        titem.jeweldrop17 = Convert.ToInt32(row["a_jewel_percent_17"]);
 //        titem.jeweldrop18 = Convert.ToInt32(row["a_jewel_percent_18"]);
 //        titem.jeweldrop19 = Convert.ToInt32(row["a_jewel_percent_19"]);
 //        titem.zoneflag = Convert.ToInt64(row["a_zone_flag"]);
 //        titem.extraflag = Convert.ToInt64(row["a_extra_flag"]);
 //        titem.rvrvalue = Convert.ToInt32(row["a_rvr_value"]);
 //        titem.rvrgrade = Convert.ToInt32(row["a_rvr_grade"]);
 //        titem.bound = Convert.ToInt32(row["a_bound"]);
 //        titem.lifetime = Convert.ToInt32(row["a_lifetime"]);
 //        AllLists.tItemMenuData.Add(titem);
 //        AllLists.tItemMenu.Add(titem.index.ToString() + " - " + titem.name.ToString());
 //    }
 //}
 public void tnpc_Import()
 {
     AllLists.tnpc_MenuData.Clear();
     AllLists.tnpc_Menu.Clear();
     LoadFromDatabase.LoadFromDatabaseSQL = "SELECT * FROM t_npc";
     foreach (DataRow row in (InternalDataCollectionBase)mySQL.GetFromQuery(LoadFromDatabase.LoadFromDatabaseSQL).Rows)
     {
         tnpc tnpc = new tnpc();
         tnpc.index                 = Convert.ToInt32(row["a_index"]);
         tnpc.enable                = Convert.ToInt32(row["a_enable"]);
         tnpc.name                  = Convert.ToString(row["a_name"]);
         tnpc.family                = Convert.ToInt32(row["a_family"]);
         tnpc.skillmaster           = Convert.ToInt32(row["a_skillmaster"]);
         tnpc.flag                  = Convert.ToInt32(row["a_flag"]);
         tnpc.flag1                 = Convert.ToInt32(row["a_flag1"]);
         tnpc.stateflag             = Convert.ToInt32(row["a_state_flag"]);
         tnpc.level                 = Convert.ToInt32(row["a_level"]);
         tnpc.exp                   = Convert.ToInt32(row["a_exp"]);
         tnpc.prize                 = Convert.ToInt32(row["a_prize"]);
         tnpc.sight                 = Convert.ToInt32(row["a_sight"]);
         tnpc.size                  = Convert.ToSingle(row["a_size"]);
         tnpc.movearea              = Convert.ToInt32(row["a_move_area"]);
         tnpc.attackarea            = Convert.ToSingle(row["a_attack_area"]);
         tnpc.skillpoint            = Convert.ToInt32(row["a_skill_point"]);
         tnpc.sskillmaster          = Convert.ToInt32(row["a_sskill_master"]);
         tnpc.str                   = Convert.ToInt32(row["a_str"]);
         tnpc.dex                   = Convert.ToInt32(row["a_dex"]);
         tnpc.INT                   = Convert.ToInt32(row["a_int"]);
         tnpc.con                   = Convert.ToInt32(row["a_con"]);
         tnpc.attack                = Convert.ToInt32(row["a_attack"]);
         tnpc.magic                 = Convert.ToInt32(row["a_magic"]);
         tnpc.defense               = Convert.ToInt32(row["a_defense"]);
         tnpc.resist                = Convert.ToInt32(row["a_resist"]);
         tnpc.attacklevel           = Convert.ToInt32(row["a_attacklevel"]);
         tnpc.defenselevel          = Convert.ToInt32(row["a_defenselevel"]);
         tnpc.hp                    = Convert.ToInt32(row["a_hp"]);
         tnpc.mp                    = Convert.ToInt32(row["a_mp"]);
         tnpc.attacktype            = Convert.ToInt32(row["a_attackType"]);
         tnpc.attackspeed           = Convert.ToInt32(row["a_attackSpeed"]);
         tnpc.recoverhp             = Convert.ToInt32(row["a_recover_hp"]);
         tnpc.recovermp             = Convert.ToInt32(row["a_recover_mp"]);
         tnpc.walkspeed             = Convert.ToSingle(row["a_walk_speed"]);
         tnpc.runspeed              = Convert.ToSingle(row["a_run_speed"]);
         tnpc.skill0                = Convert.ToString(row["a_skill0"]);
         tnpc.skill1                = Convert.ToString(row["a_skill1"]);
         tnpc.skill2                = Convert.ToString(row["a_skill2"]);
         tnpc.skill3                = Convert.ToString(row["a_skill3"]);
         tnpc.drop0                 = Convert.ToInt32(row["a_item_0"]);
         tnpc.drop1                 = Convert.ToInt32(row["a_item_1"]);
         tnpc.drop2                 = Convert.ToInt32(row["a_item_2"]);
         tnpc.drop3                 = Convert.ToInt32(row["a_item_3"]);
         tnpc.drop4                 = Convert.ToInt32(row["a_item_4"]);
         tnpc.drop5                 = Convert.ToInt32(row["a_item_5"]);
         tnpc.drop6                 = Convert.ToInt32(row["a_item_6"]);
         tnpc.drop7                 = Convert.ToInt32(row["a_item_7"]);
         tnpc.drop8                 = Convert.ToInt32(row["a_item_8"]);
         tnpc.drop9                 = Convert.ToInt32(row["a_item_9"]);
         tnpc.drop10                = Convert.ToInt32(row["a_item_10"]);
         tnpc.drop11                = Convert.ToInt32(row["a_item_11"]);
         tnpc.drop12                = Convert.ToInt32(row["a_item_12"]);
         tnpc.drop13                = Convert.ToInt32(row["a_item_13"]);
         tnpc.drop14                = Convert.ToInt32(row["a_item_14"]);
         tnpc.drop15                = Convert.ToInt32(row["a_item_15"]);
         tnpc.drop16                = Convert.ToInt32(row["a_item_16"]);
         tnpc.drop17                = Convert.ToInt32(row["a_item_17"]);
         tnpc.drop18                = Convert.ToInt32(row["a_item_18"]);
         tnpc.drop19                = Convert.ToInt32(row["a_item_19"]);
         tnpc.droprate0             = Convert.ToInt32(row["a_item_percent_0"]);
         tnpc.droprate1             = Convert.ToInt32(row["a_item_percent_1"]);
         tnpc.droprate2             = Convert.ToInt32(row["a_item_percent_2"]);
         tnpc.droprate3             = Convert.ToInt32(row["a_item_percent_3"]);
         tnpc.droprate4             = Convert.ToInt32(row["a_item_percent_4"]);
         tnpc.droprate5             = Convert.ToInt32(row["a_item_percent_5"]);
         tnpc.droprate6             = Convert.ToInt32(row["a_item_percent_6"]);
         tnpc.droprate7             = Convert.ToInt32(row["a_item_percent_7"]);
         tnpc.droprate8             = Convert.ToInt32(row["a_item_percent_8"]);
         tnpc.droprate9             = Convert.ToInt32(row["a_item_percent_9"]);
         tnpc.droprate10            = Convert.ToInt32(row["a_item_percent_10"]);
         tnpc.droprate11            = Convert.ToInt32(row["a_item_percent_11"]);
         tnpc.droprate12            = Convert.ToInt32(row["a_item_percent_12"]);
         tnpc.droprate13            = Convert.ToInt32(row["a_item_percent_13"]);
         tnpc.droprate14            = Convert.ToInt32(row["a_item_percent_14"]);
         tnpc.droprate15            = Convert.ToInt32(row["a_item_percent_15"]);
         tnpc.droprate16            = Convert.ToInt32(row["a_item_percent_16"]);
         tnpc.droprate17            = Convert.ToInt32(row["a_item_percent_17"]);
         tnpc.droprate18            = Convert.ToInt32(row["a_item_percent_18"]);
         tnpc.droprate19            = Convert.ToInt32(row["a_item_percent_19"]);
         tnpc.minplus               = Convert.ToInt32(row["a_minplus"]);
         tnpc.maxplus               = Convert.ToInt32(row["a_maxplus"]);
         tnpc.probplus              = Convert.ToInt32(row["a_probplus"]);
         tnpc.product0              = Convert.ToInt32(row["a_product0"]);
         tnpc.product1              = Convert.ToInt32(row["a_product1"]);
         tnpc.product2              = Convert.ToInt32(row["a_product2"]);
         tnpc.product3              = Convert.ToInt32(row["a_product3"]);
         tnpc.product4              = Convert.ToInt32(row["a_product4"]);
         tnpc.filesmc               = Convert.ToString(row["a_file_smc"]);
         tnpc.motionwalk            = Convert.ToString(row["a_motion_walk"]);
         tnpc.motionidle            = Convert.ToString(row["a_motion_idle"]);
         tnpc.motiondam             = Convert.ToString(row["a_motion_dam"]);
         tnpc.motionattack          = Convert.ToString(row["a_motion_attack"]);
         tnpc.motiondie             = Convert.ToString(row["a_motion_die"]);
         tnpc.motionrun             = Convert.ToString(row["a_motion_run"]);
         tnpc.motionidle2           = Convert.ToString(row["a_motion_idle2"]);
         tnpc.motionattack2         = Convert.ToString(row["a_motion_attack2"]);
         tnpc.scale                 = Convert.ToSingle(row["a_scale"]);
         tnpc.attribute             = Convert.ToInt32(row["a_attribute"]);
         tnpc.firedelaycount        = Convert.ToInt32(row["a_fireDelayCount"]);
         tnpc.firedelay0            = Convert.ToSingle(row["a_fireDelay0"]);
         tnpc.firedelay1            = Convert.ToSingle(row["a_fireDelay1"]);
         tnpc.firedelay2            = Convert.ToSingle(row["a_fireDelay2"]);
         tnpc.firedelay3            = Convert.ToSingle(row["a_fireDelay3"]);
         tnpc.fireeffect0           = Convert.ToString(row["a_fireEffect0"]);
         tnpc.fireeffect1           = Convert.ToString(row["a_fireEffect1"]);
         tnpc.fireeffect2           = Convert.ToString(row["a_fireEffect2"]);
         tnpc.fireobject            = Convert.ToInt32(row["a_fireObject"]);
         tnpc.firespeed             = Convert.ToSingle(row["a_fireSpeed"]);
         tnpc.aitype                = Convert.ToInt32(row["a_aitype"]);
         tnpc.aiflag                = Convert.ToInt32(row["a_aiflag"]);
         tnpc.aileaderflag          = Convert.ToInt32(row["a_aileader_flag"]);
         tnpc.aisummonhp            = Convert.ToInt32(row["a_ai_summonHp"]);
         tnpc.aileaderidx           = Convert.ToInt32(row["a_aileader_idx"]);
         tnpc.aileadercount         = Convert.ToInt32(row["a_aileader_count"]);
         tnpc.npcchoicetriggercount = Convert.ToInt32(row["a_npc_choice_trigger_count"]);
         tnpc.npcchoicetriggerids   = Convert.ToString(row["a_npc_choice_trigger_ids"]);
         tnpc.npcchoicetriggercount = Convert.ToInt32(row["a_npc_kill_trigger_count"]);
         tnpc.npckilltriggerids     = Convert.ToString(row["a_npc_kill_trigger_ids"]);
         tnpc.createprob            = Convert.ToInt32(row["a_createprob"]);
         tnpc.socketprob0           = Convert.ToInt32(row["a_socketprob_0"]);
         tnpc.socketprob1           = Convert.ToInt32(row["a_socketprob_1"]);
         tnpc.socketprob2           = Convert.ToInt32(row["a_socketprob_2"]);
         tnpc.socketprob3           = Convert.ToInt32(row["a_socketprob_3"]);
         tnpc.jewel0                = Convert.ToInt32(row["a_jewel_0"]);
         tnpc.jewel1                = Convert.ToInt32(row["a_jewel_1"]);
         tnpc.jewel2                = Convert.ToInt32(row["a_jewel_2"]);
         tnpc.jewel3                = Convert.ToInt32(row["a_jewel_3"]);
         tnpc.jewel4                = Convert.ToInt32(row["a_jewel_4"]);
         tnpc.jewel5                = Convert.ToInt32(row["a_jewel_5"]);
         tnpc.jewel6                = Convert.ToInt32(row["a_jewel_6"]);
         tnpc.jewel7                = Convert.ToInt32(row["a_jewel_7"]);
         tnpc.jewel8                = Convert.ToInt32(row["a_jewel_8"]);
         tnpc.jewel9                = Convert.ToInt32(row["a_jewel_9"]);
         tnpc.jewel10               = Convert.ToInt32(row["a_jewel_10"]);
         tnpc.jewel11               = Convert.ToInt32(row["a_jewel_11"]);
         tnpc.jewel12               = Convert.ToInt32(row["a_jewel_12"]);
         tnpc.jewel13               = Convert.ToInt32(row["a_jewel_13"]);
         tnpc.jewel14               = Convert.ToInt32(row["a_jewel_14"]);
         tnpc.jewel15               = Convert.ToInt32(row["a_jewel_15"]);
         tnpc.jewel16               = Convert.ToInt32(row["a_jewel_16"]);
         tnpc.jewel17               = Convert.ToInt32(row["a_jewel_17"]);
         tnpc.jewel18               = Convert.ToInt32(row["a_jewel_18"]);
         tnpc.jewel19               = Convert.ToInt32(row["a_jewel_19"]);
         tnpc.jeweldrop0            = Convert.ToInt32(row["a_jewel_percent_0"]);
         tnpc.jeweldrop1            = Convert.ToInt32(row["a_jewel_percent_1"]);
         tnpc.jeweldrop2            = Convert.ToInt32(row["a_jewel_percent_2"]);
         tnpc.jeweldrop3            = Convert.ToInt32(row["a_jewel_percent_3"]);
         tnpc.jeweldrop4            = Convert.ToInt32(row["a_jewel_percent_4"]);
         tnpc.jeweldrop5            = Convert.ToInt32(row["a_jewel_percent_5"]);
         tnpc.jeweldrop6            = Convert.ToInt32(row["a_jewel_percent_6"]);
         tnpc.jeweldrop7            = Convert.ToInt32(row["a_jewel_percent_7"]);
         tnpc.jeweldrop8            = Convert.ToInt32(row["a_jewel_percent_8"]);
         tnpc.jeweldrop9            = Convert.ToInt32(row["a_jewel_percent_9"]);
         tnpc.jeweldrop10           = Convert.ToInt32(row["a_jewel_percent_10"]);
         tnpc.jeweldrop11           = Convert.ToInt32(row["a_jewel_percent_11"]);
         tnpc.jeweldrop12           = Convert.ToInt32(row["a_jewel_percent_12"]);
         tnpc.jeweldrop13           = Convert.ToInt32(row["a_jewel_percent_13"]);
         tnpc.jeweldrop14           = Convert.ToInt32(row["a_jewel_percent_14"]);
         tnpc.jeweldrop15           = Convert.ToInt32(row["a_jewel_percent_15"]);
         tnpc.jeweldrop16           = Convert.ToInt32(row["a_jewel_percent_16"]);
         tnpc.jeweldrop17           = Convert.ToInt32(row["a_jewel_percent_17"]);
         tnpc.jeweldrop18           = Convert.ToInt32(row["a_jewel_percent_18"]);
         tnpc.jeweldrop19           = Convert.ToInt32(row["a_jewel_percent_19"]);
         tnpc.zoneflag              = Convert.ToInt64(row["a_zone_flag"]);
         tnpc.extraflag             = Convert.ToInt64(row["a_extra_flag"]);
         tnpc.rvrvalue              = Convert.ToInt32(row["a_rvr_value"]);
         tnpc.rvrgrade              = Convert.ToInt32(row["a_rvr_grade"]);
         tnpc.bound                 = Convert.ToInt32(row["a_bound"]);
         tnpc.lifetime              = Convert.ToInt32(row["a_lifetime"]);
         AllLists.tnpc_MenuData.Add(tnpc);
         AllLists.tnpc_Menu.Add(tnpc.index.ToString() + " - " + tnpc.name.ToString());
     }
 }
Example #2
0
 public static void tnpc_Update(tnpc npc)
 {
     try
     {
         using (MySqlConnection mySqlConnection = new MySqlConnection(mySQL.ConnectionString))
         {
             MySqlCommand mySqlCommand = new MySqlCommand();
             mySqlConnection.Open();
             mySqlCommand.Connection = mySqlConnection;
             string str = "INSERT INTO t_npc (" + "a_index, " + "a_enable ," + "a_name ," + "a_family ," + "a_skillmaster ," + "a_flag ," + "a_flag1 ," + "a_state_flag ," + "a_level ," + "a_exp ," + "a_prize ," + "a_sight ," + "a_size ," + "a_move_area ," + "a_attack_area ," + "a_skill_point ," + "a_sskill_master ," + "a_str ," + "a_dex ," + "a_int ," + "a_con ," + "a_attack ," + "a_magic ," + "a_defense ," + "a_resist ," + "a_attacklevel ," + "a_defenselevel ," + "a_hp ," + "a_mp ," + "a_attackType ," + "a_attackSpeed ," + "a_recover_hp ," + "a_recover_mp ," + "a_walk_speed ," + "a_run_speed ," + "a_skill0 ," + "a_skill1 ," + "a_skill2 ," + "a_skill3 ," + "a_item_0 ," + "a_item_1 ," + "a_item_2 ," + "a_item_3 ," + "a_item_4 ," + "a_item_5 ," + "a_item_6 ," + "a_item_7 ," + "a_item_8 ," + "a_item_9 ," + "a_item_10 ," + "a_item_11 ," + "a_item_12 ," + "a_item_13 ," + "a_item_14 ," + "a_item_15 ," + "a_item_16 ," + "a_item_17 ," + "a_item_18 ," + "a_item_19 ," + "a_item_percent_0 ," + "a_item_percent_1 ," + "a_item_percent_2 ," + "a_item_percent_3 ," + "a_item_percent_4 ," + "a_item_percent_5 ," + "a_item_percent_6 ," + "a_item_percent_7 ," + "a_item_percent_8 ," + "a_item_percent_9 ," + "a_item_percent_10 ," + "a_item_percent_11 ," + "a_item_percent_12 ," + "a_item_percent_13 ," + "a_item_percent_14 ," + "a_item_percent_15 ," + "a_item_percent_16 ," + "a_item_percent_17 ," + "a_item_percent_18 ," + "a_item_percent_19 ," + "a_minplus ," + "a_maxplus ," + "a_probplus ," + "a_product0 ," + "a_product1 ," + "a_product2 ," + "a_product3 ," + "a_product4 ," + "a_file_smc ," + "a_motion_walk ," + "a_motion_idle ," + "a_motion_dam ," + "a_motion_attack ," + "a_motion_die ," + "a_motion_run ," + "a_motion_idle2 ," + "a_motion_attack2 ," + "a_scale ," + "a_attribute ," + "a_fireDelayCount ," + "a_fireDelay0 ," + "a_fireDelay1 ," + "a_fireDelay2 ," + "a_fireDelay3 ," + "a_fireEffect0 ," + "a_fireEffect1 ," + "a_fireEffect2 ," + "a_fireObject ," + "a_fireSpeed ," + "a_aitype ," + "a_aiflag ," + "a_aileader_flag ," + "a_ai_summonHp ," + "a_aileader_idx ," + "a_aileader_count ," + "a_crafting_category ," + "a_productIndex ," + "a_hit ," + "a_dodge ," + "a_magicavoid ," + "a_job_attribute ," + "a_npc_choice_trigger_count ," + "a_npc_choice_trigger_ids ," + "a_npc_kill_trigger_count ," + "a_npc_kill_trigger_ids ," + "a_createprob ," + "a_socketprob_0 ," + "a_socketprob_1 ," + "a_socketprob_2 ," + "a_socketprob_3 ," + "a_jewel_0 ," + "a_jewel_1 ," + "a_jewel_2 ," + "a_jewel_3 ," + "a_jewel_4 ," + "a_jewel_5 ," + "a_jewel_6 ," + "a_jewel_7 ," + "a_jewel_8 ," + "a_jewel_9 ," + "a_jewel_10 ," + "a_jewel_11 ," + "a_jewel_12 ," + "a_jewel_13 ," + "a_jewel_14 ," + "a_jewel_15 ," + "a_jewel_16 ," + "a_jewel_17 ," + "a_jewel_18 ," + "a_jewel_19 ," + "a_jewel_percent_0 ," + "a_jewel_percent_1 ," + "a_jewel_percent_2 ," + "a_jewel_percent_3 ," + "a_jewel_percent_4 ," + "a_jewel_percent_5 ," + "a_jewel_percent_6 ," + "a_jewel_percent_7 ," + "a_jewel_percent_8 ," + "a_jewel_percent_9 ," + "a_jewel_percent_10 ," + "a_jewel_percent_11 ," + "a_jewel_percent_12 ," + "a_jewel_percent_13 ," + "a_jewel_percent_14 ," + "a_jewel_percent_15 ," + "a_jewel_percent_16 ," + "a_jewel_percent_17 ," + "a_jewel_percent_18 ," + "a_jewel_percent_19 ," + "a_zone_flag ," + "a_extra_flag ," + "a_rvr_value ," + "a_rvr_grade ," + "a_bound ," + "a_lifetime" + ")" + "VALUES (" + "@index, " + "@enable ," + "@name ," + "@family ," + "@skillmaster ," + "@flag ," + "@flag1 ," + "@state_flag ," + "@level ," + "@exp ," + "@prize ," + "@sight ," + "@size ," + "@move_area ," + "@attack_area ," + "@skill_point ," + "@sskill_master ," + "@str ," + "@dex ," + "@int ," + "@con ," + "@attack ," + "@magic ," + "@defense ," + "@resist ," + "@attacklevel ," + "@defenselevel ," + "@hp ," + "@mp ," + "@attackType ," + "@attackSpeed ," + "@recover_hp ," + "@recover_mp ," + "@walk_speed ," + "@run_speed ," + "@skill0 ," + "@skill1 ," + "@skill2 ," + "@skill3 ," + "@item_0 ," + "@item_1 ," + "@item_2 ," + "@item_3 ," + "@item_4 ," + "@item_5 ," + "@item_6 ," + "@item_7 ," + "@item_8 ," + "@item_9 ," + "@item_10 ," + "@item_11 ," + "@item_12 ," + "@item_13 ," + "@item_14 ," + "@item_15 ," + "@item_16 ," + "@item_17 ," + "@item_18 ," + "@item_19 ," + "@item_percent_0 ," + "@item_percent_1 ," + "@item_percent_2 ," + "@item_percent_3 ," + "@item_percent_4 ," + "@item_percent_5 ," + "@item_percent_6 ," + "@item_percent_7 ," + "@item_percent_8 ," + "@item_percent_9 ," + "@item_percent_10 ," + "@item_percent_11 ," + "@item_percent_12 ," + "@item_percent_13 ," + "@item_percent_14 ," + "@item_percent_15 ," + "@item_percent_16 ," + "@item_percent_17 ," + "@item_percent_18 ," + "@item_percent_19 ," + "@minplus ," + "@maxplus ," + "@probplus ," + "@product0 ," + "@product1 ," + "@product2 ," + "@product3 ," + "@product4 ," + "@file_smc ," + "@motion_walk ," + "@motion_idle ," + "@motion_dam ," + "@motion_attack ," + "@motion_die ," + "@motion_run ," + "@motion_idle2 ," + "@motion_attack2 ," + "@scale ," + "@attribute ," + "@fireDelayCount ," + "@fireDelay0 ," + "@fireDelay1 ," + "@fireDelay2 ," + "@fireDelay3 ," + "@fireEffect0 ," + "@fireEffect1 ," + "@fireEffect2 ," + "@fireObject ," + "@fireSpeed ," + "@aitype ," + "@aiflag ," + "@aileader_flag ," + "@ai_summonHp ," + "@aileader_idx ," + "@aileader_count ," + "@crafting_category ," + "@productIndex ," + "@hit ," + "@dodge ," + "@magicavoid ," + "@job_attribute ," + "@npc_choice_trigger_count ," + "@npc_choice_trigger_ids ," + "@npc_kill_trigger_count ," + "@npc_kill_trigger_ids ," + "@createprob ," + "@socketprob_0 ," + "@socketprob_1 ," + "@socketprob_2 ," + "@socketprob_3 ," + "@jewel_0 ," + "@jewel_1 ," + "@jewel_2 ," + "@jewel_3 ," + "@jewel_4 ," + "@jewel_5 ," + "@jewel_6 ," + "@jewel_7 ," + "@jewel_8 ," + "@jewel_9 ," + "@jewel_10 ," + "@jewel_11 ," + "@jewel_12 ," + "@jewel_13 ," + "@jewel_14 ," + "@jewel_15 ," + "@jewel_16 ," + "@jewel_17 ," + "@jewel_18 ," + "@jewel_19 ," + "@jewel_percent_0 ," + "@jewel_percent_1 ," + "@jewel_percent_2 ," + "@jewel_percent_3 ," + "@jewel_percent_4 ," + "@jewel_percent_5 ," + "@jewel_percent_6 ," + "@jewel_percent_7 ," + "@jewel_percent_8 ," + "@jewel_percent_9 ," + "@jewel_percent_10 ," + "@jewel_percent_11 ," + "@jewel_percent_12 ," + "@jewel_percent_13 ," + "@jewel_percent_14 ," + "@jewel_percent_15 ," + "@jewel_percent_16 ," + "@jewel_percent_17 ," + "@jewel_percent_18 ," + "@jewel_percent_19 ," + "@zone_flag ," + "@extraflag ," + "@rvr_value ," + "@rvr_grade ," + "@bound ," + "@lifetime " + ")";
             mySqlCommand.CommandText = str;
             mySqlCommand.Prepare();
             mySqlCommand.Parameters.AddWithValue("@index", npc.index);
             mySqlCommand.Parameters.AddWithValue("@enable", npc.enable);
             mySqlCommand.Parameters.AddWithValue("@name", npc.name);
             mySqlCommand.Parameters.AddWithValue("@family", npc.family);
             mySqlCommand.Parameters.AddWithValue("@skillmaster", npc.skillmaster);
             mySqlCommand.Parameters.AddWithValue("@flag", npc.flag);
             mySqlCommand.Parameters.AddWithValue("@flag1", npc.flag1);
             mySqlCommand.Parameters.AddWithValue("@state_flag", npc.stateflag);
             mySqlCommand.Parameters.AddWithValue("@level", npc.level);
             mySqlCommand.Parameters.AddWithValue("@exp", npc.exp);
             mySqlCommand.Parameters.AddWithValue("@prize", npc.prize);
             mySqlCommand.Parameters.AddWithValue("@sight", npc.sight);
             mySqlCommand.Parameters.AddWithValue("@size", npc.size);
             mySqlCommand.Parameters.AddWithValue("@move_area", npc.movearea);
             mySqlCommand.Parameters.AddWithValue("@attack_area", npc.attackarea);
             mySqlCommand.Parameters.AddWithValue("@skill_point", npc.skillpoint);
             mySqlCommand.Parameters.AddWithValue("@sskill_master", npc.sskillmaster);
             mySqlCommand.Parameters.AddWithValue("@str", npc.str);
             mySqlCommand.Parameters.AddWithValue("@dex", npc.dex);
             mySqlCommand.Parameters.AddWithValue("@int", npc.INT);
             mySqlCommand.Parameters.AddWithValue("@con", npc.con);
             mySqlCommand.Parameters.AddWithValue("@attack", npc.attack);
             mySqlCommand.Parameters.AddWithValue("@magic", npc.magic);
             mySqlCommand.Parameters.AddWithValue("@defense", npc.defense);
             mySqlCommand.Parameters.AddWithValue("@resist", npc.resist);
             mySqlCommand.Parameters.AddWithValue("@attacklevel", npc.attacklevel);
             mySqlCommand.Parameters.AddWithValue("@defenselevel", npc.defenselevel);
             mySqlCommand.Parameters.AddWithValue("@hp", npc.hp);
             mySqlCommand.Parameters.AddWithValue("@mp", npc.mp);
             mySqlCommand.Parameters.AddWithValue("@attackType", npc.attacktype);
             mySqlCommand.Parameters.AddWithValue("@attackSpeed", npc.attackspeed);
             mySqlCommand.Parameters.AddWithValue("@recover_hp", npc.recoverhp);
             mySqlCommand.Parameters.AddWithValue("@recover_mp", npc.recovermp);
             mySqlCommand.Parameters.AddWithValue("@walk_speed", npc.walkspeed);
             mySqlCommand.Parameters.AddWithValue("@run_speed", npc.runspeed);
             mySqlCommand.Parameters.AddWithValue("@skill0", npc.skill0);
             mySqlCommand.Parameters.AddWithValue("@skill1", npc.skill1);
             mySqlCommand.Parameters.AddWithValue("@skill2", npc.skill2);
             mySqlCommand.Parameters.AddWithValue("@skill3", npc.skill3);
             mySqlCommand.Parameters.AddWithValue("@item_0", npc.drop0);
             mySqlCommand.Parameters.AddWithValue("@item_1", npc.drop1);
             mySqlCommand.Parameters.AddWithValue("@item_2", npc.drop2);
             mySqlCommand.Parameters.AddWithValue("@item_3", npc.drop3);
             mySqlCommand.Parameters.AddWithValue("@item_4", npc.drop4);
             mySqlCommand.Parameters.AddWithValue("@item_5", npc.drop5);
             mySqlCommand.Parameters.AddWithValue("@item_6", npc.drop6);
             mySqlCommand.Parameters.AddWithValue("@item_7", npc.drop7);
             mySqlCommand.Parameters.AddWithValue("@item_8", npc.drop8);
             mySqlCommand.Parameters.AddWithValue("@item_9", npc.drop9);
             mySqlCommand.Parameters.AddWithValue("@item_10", npc.drop10);
             mySqlCommand.Parameters.AddWithValue("@item_11", npc.drop11);
             mySqlCommand.Parameters.AddWithValue("@item_12", npc.drop12);
             mySqlCommand.Parameters.AddWithValue("@item_13", npc.drop13);
             mySqlCommand.Parameters.AddWithValue("@item_14", npc.drop14);
             mySqlCommand.Parameters.AddWithValue("@item_15", npc.drop15);
             mySqlCommand.Parameters.AddWithValue("@item_16", npc.drop16);
             mySqlCommand.Parameters.AddWithValue("@item_17", npc.drop17);
             mySqlCommand.Parameters.AddWithValue("@item_18", npc.drop18);
             mySqlCommand.Parameters.AddWithValue("@item_19", npc.drop19);
             mySqlCommand.Parameters.AddWithValue("@item_percent_0", npc.droprate0);
             mySqlCommand.Parameters.AddWithValue("@item_percent_1", npc.droprate1);
             mySqlCommand.Parameters.AddWithValue("@item_percent_2", npc.droprate2);
             mySqlCommand.Parameters.AddWithValue("@item_percent_3", npc.droprate3);
             mySqlCommand.Parameters.AddWithValue("@item_percent_4", npc.droprate4);
             mySqlCommand.Parameters.AddWithValue("@item_percent_5", npc.droprate5);
             mySqlCommand.Parameters.AddWithValue("@item_percent_6", npc.droprate6);
             mySqlCommand.Parameters.AddWithValue("@item_percent_7", npc.droprate7);
             mySqlCommand.Parameters.AddWithValue("@item_percent_8", npc.droprate8);
             mySqlCommand.Parameters.AddWithValue("@item_percent_9", npc.droprate9);
             mySqlCommand.Parameters.AddWithValue("@item_percent_10", npc.droprate10);
             mySqlCommand.Parameters.AddWithValue("@item_percent_11", npc.droprate11);
             mySqlCommand.Parameters.AddWithValue("@item_percent_12", npc.droprate12);
             mySqlCommand.Parameters.AddWithValue("@item_percent_13", npc.droprate13);
             mySqlCommand.Parameters.AddWithValue("@item_percent_14", npc.droprate14);
             mySqlCommand.Parameters.AddWithValue("@item_percent_15", npc.droprate15);
             mySqlCommand.Parameters.AddWithValue("@item_percent_16", npc.droprate16);
             mySqlCommand.Parameters.AddWithValue("@item_percent_17", npc.droprate17);
             mySqlCommand.Parameters.AddWithValue("@item_percent_18", npc.droprate18);
             mySqlCommand.Parameters.AddWithValue("@item_percent_19", npc.droprate19);
             mySqlCommand.Parameters.AddWithValue("@minplus", npc.minplus);
             mySqlCommand.Parameters.AddWithValue("@maxplus", npc.maxplus);
             mySqlCommand.Parameters.AddWithValue("@probplus", npc.probplus);
             mySqlCommand.Parameters.AddWithValue("@product0", npc.product0);
             mySqlCommand.Parameters.AddWithValue("@product1", npc.product1);
             mySqlCommand.Parameters.AddWithValue("@product2", npc.product2);
             mySqlCommand.Parameters.AddWithValue("@product3", npc.product3);
             mySqlCommand.Parameters.AddWithValue("@product4", npc.product4);
             mySqlCommand.Parameters.AddWithValue("@file_smc", npc.filesmc);
             mySqlCommand.Parameters.AddWithValue("@motion_walk", npc.motionwalk);
             mySqlCommand.Parameters.AddWithValue("@motion_idle", npc.motionidle);
             mySqlCommand.Parameters.AddWithValue("@motion_dam", npc.motiondam);
             mySqlCommand.Parameters.AddWithValue("@motion_attack", npc.motionattack);
             mySqlCommand.Parameters.AddWithValue("@motion_die", npc.motiondie);
             mySqlCommand.Parameters.AddWithValue("@motion_run", npc.motionrun);
             mySqlCommand.Parameters.AddWithValue("@motion_idle2", npc.motionidle2);
             mySqlCommand.Parameters.AddWithValue("@motion_attack2", npc.motionattack2);
             mySqlCommand.Parameters.AddWithValue("@scale", npc.scale);
             mySqlCommand.Parameters.AddWithValue("@attribute", npc.attribute);
             mySqlCommand.Parameters.AddWithValue("@fireDelayCount", npc.firedelaycount);
             mySqlCommand.Parameters.AddWithValue("@fireDelay0", npc.firedelay0);
             mySqlCommand.Parameters.AddWithValue("@fireDelay1", npc.firedelay1);
             mySqlCommand.Parameters.AddWithValue("@fireDelay2", npc.firedelay2);
             mySqlCommand.Parameters.AddWithValue("@fireDelay3", npc.firedelay3);
             mySqlCommand.Parameters.AddWithValue("@fireEffect0", npc.fireeffect0);
             mySqlCommand.Parameters.AddWithValue("@fireEffect1", npc.fireeffect1);
             mySqlCommand.Parameters.AddWithValue("@fireEffect2", npc.fireeffect2);
             mySqlCommand.Parameters.AddWithValue("@fireObject", npc.fireobject);
             mySqlCommand.Parameters.AddWithValue("@fireSpeed", npc.firespeed);
             mySqlCommand.Parameters.AddWithValue("@aitype", npc.aitype);
             mySqlCommand.Parameters.AddWithValue("@aiflag", npc.aiflag);
             mySqlCommand.Parameters.AddWithValue("@aileader_flag", npc.aileaderflag);
             mySqlCommand.Parameters.AddWithValue("@ai_summonHp", npc.aisummonhp);
             mySqlCommand.Parameters.AddWithValue("@aileader_idx", npc.aileaderidx);
             mySqlCommand.Parameters.AddWithValue("@aileader_count", npc.aileadercount);
             mySqlCommand.Parameters.AddWithValue("@crafting_category", npc.craftingcategory);
             mySqlCommand.Parameters.AddWithValue("@productIndex", npc.productindex);
             mySqlCommand.Parameters.AddWithValue("@hit", npc.hit);
             mySqlCommand.Parameters.AddWithValue("@dodge", npc.dodge);
             mySqlCommand.Parameters.AddWithValue("@magicavoid", npc.magicavoid);
             mySqlCommand.Parameters.AddWithValue("@job_attribute", npc.jobattribute);
             mySqlCommand.Parameters.AddWithValue("@npc_choice_trigger_count", npc.npcchoicetriggercount);
             mySqlCommand.Parameters.AddWithValue("@npc_choice_trigger_ids", npc.npcchoicetriggerids);
             mySqlCommand.Parameters.AddWithValue("@npc_kill_trigger_count", npc.npckilltriggercount);
             mySqlCommand.Parameters.AddWithValue("@npc_kill_trigger_ids", npc.npckilltriggerids);
             mySqlCommand.Parameters.AddWithValue("@createprob", npc.createprob);
             mySqlCommand.Parameters.AddWithValue("@socketprob_0", npc.socketprob0);
             mySqlCommand.Parameters.AddWithValue("@socketprob_1", npc.socketprob1);
             mySqlCommand.Parameters.AddWithValue("@socketprob_2", npc.socketprob2);
             mySqlCommand.Parameters.AddWithValue("@socketprob_3", npc.socketprob3);
             mySqlCommand.Parameters.AddWithValue("@jewel_0", npc.jewel0);
             mySqlCommand.Parameters.AddWithValue("@jewel_1", npc.jewel1);
             mySqlCommand.Parameters.AddWithValue("@jewel_2", npc.jewel2);
             mySqlCommand.Parameters.AddWithValue("@jewel_3", npc.jewel3);
             mySqlCommand.Parameters.AddWithValue("@jewel_4", npc.jewel4);
             mySqlCommand.Parameters.AddWithValue("@jewel_5", npc.jewel5);
             mySqlCommand.Parameters.AddWithValue("@jewel_6", npc.jewel6);
             mySqlCommand.Parameters.AddWithValue("@jewel_7", npc.jewel7);
             mySqlCommand.Parameters.AddWithValue("@jewel_8", npc.jewel8);
             mySqlCommand.Parameters.AddWithValue("@jewel_9", npc.jewel9);
             mySqlCommand.Parameters.AddWithValue("@jewel_10", npc.jewel0);
             mySqlCommand.Parameters.AddWithValue("@jewel_11", npc.jewel1);
             mySqlCommand.Parameters.AddWithValue("@jewel_12", npc.jewel2);
             mySqlCommand.Parameters.AddWithValue("@jewel_13", npc.jewel3);
             mySqlCommand.Parameters.AddWithValue("@jewel_14", npc.jewel4);
             mySqlCommand.Parameters.AddWithValue("@jewel_15", npc.jewel5);
             mySqlCommand.Parameters.AddWithValue("@jewel_16", npc.jewel6);
             mySqlCommand.Parameters.AddWithValue("@jewel_17", npc.jewel7);
             mySqlCommand.Parameters.AddWithValue("@jewel_18", npc.jewel8);
             mySqlCommand.Parameters.AddWithValue("@jewel_19", npc.jewel9);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_0", npc.jeweldrop0);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_1", npc.jeweldrop1);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_2", npc.jeweldrop2);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_3", npc.jeweldrop3);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_4", npc.jeweldrop4);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_5", npc.jeweldrop5);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_6", npc.jeweldrop6);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_7", npc.jeweldrop7);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_8", npc.jeweldrop8);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_9", npc.jeweldrop9);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_10", npc.jeweldrop10);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_11", npc.jeweldrop11);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_12", npc.jeweldrop12);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_13", npc.jeweldrop13);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_14", npc.jeweldrop14);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_15", npc.jeweldrop15);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_16", npc.jeweldrop16);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_17", npc.jeweldrop17);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_18", npc.jeweldrop18);
             mySqlCommand.Parameters.AddWithValue("@jewel_percent_19", npc.jeweldrop19);
             mySqlCommand.Parameters.AddWithValue("@zone_flag", npc.zoneflag);
             mySqlCommand.Parameters.AddWithValue("@extraflag", npc.extraflag);
             mySqlCommand.Parameters.AddWithValue("@rvr_value", npc.rvrvalue);
             mySqlCommand.Parameters.AddWithValue("@rvr_grade", npc.rvrgrade);
             mySqlCommand.Parameters.AddWithValue("@bound", npc.bound);
             mySqlCommand.Parameters.AddWithValue("@lifetime", npc.lifetime);
             mySqlCommand.ExecuteNonQuery();
             mySqlConnection.Close();
         }
     }
     catch (MySqlException ex)
     {
         int num = (int)MessageBox.Show(ex.Message.ToString());
     }
 }