begin /*初始化数据*/ declare $entry mediumint(8) default '0'; declare $class int(11) default '0'; declare $subclass int(11) default '0'; declare $unk0 int(11) default '-1'; declare $name varchar(255) default ''; declare $displayid mediumint(8) default '0'; declare $Quality int(11) default '0'; declare $Flags bigint(20) default '0'; declare $Faction int(11) default '0'; declare $BuyCount int(11) default '1'; declare $BuyPrice bigint(20) default '0'; declare $SellPrice int(10) default '0'; declare $InventoryType int(11) default '0'; declare $AllowableClass int(11) default '-1'; declare $AllowableRace int(11) default '-1'; declare $ItemLevel int(11) default '0'; declare $RequiredLevel int(11) default '0'; declare $RequiredSkill int(11) default '0'; declare $RequiredSkillRank int(11) default '0'; declare $requiredspell mediumint(8) default '0'; declare $requiredhonorrank mediumint(8) default '0'; declare $RequiredCityRank mediumint(8) default '0'; declare $RequiredReputationFaction int(11) default '0'; declare $RequiredReputationRank int(11) default '0'; declare $maxcount int(11) default '0'; declare $stackable int(11) default '1'; declare $ContainerSlots int(11) default '0'; declare $StatsCount int(11) default '0'; declare $stat_type1 int(11) default '0'; declare $stat_value1 smallint(6) default '0'; declare $stat_type2 int(11) default '0'; declare $stat_value2 smallint(6) default '0'; declare $stat_type3 int(11) default '0'; declare $stat_value3 smallint(6) default '0'; declare $stat_type4 int(11) default '0'; declare $stat_value4 smallint(6) default '0'; declare $stat_type5 int(11) default '0'; declare $stat_value5 smallint(6) default '0'; declare $stat_type6 int(11) default '0'; declare $stat_value6 smallint(6) default '0'; declare $stat_type7 int(11) default '0'; declare $stat_value7 smallint(6) default '0'; declare $stat_type8 int(11) default '0'; declare $stat_value8 smallint(6) default '0'; declare $stat_type9 int(11) default '0'; declare $stat_value9 smallint(6) default '0'; declare $stat_type10 int(11) default '0'; declare $stat_value10 smallint(6) default '0'; declare $ScalingStatDistribution smallint(6) default '0'; declare $ScalingStatValue int(6) default '0'; declare $dmg_min1 float default '0'; declare $dmg_max1 float default '0'; declare $dmg_type1 int(11) default '0'; declare $dmg_min2 float default '0'; declare $dmg_max2 float default '0'; declare $dmg_type2 int(11) default '0'; declare $armor int(11) default '0'; declare $holy_res int(11) default '0'; declare $fire_res int(11) default '0'; declare $nature_res int(11) default '0'; declare $frost_res int(11) default '0'; declare $shadow_res int(11) default '0'; declare $arcane_res int(11) default '0'; declare $delay int(11) default '1000'; declare $ammo_type int(11) default '0'; declare $RangedModRange float default '0'; declare $spellid_1 mediumint(8) default '0'; declare $spelltrigger_1 int(11) default '0'; declare $spellcharges_1 smallint(4) default NULL; declare $spellppmRate_1 float default '0'; declare $spellcooldown_1 int(11) default '-1'; declare $spellcategory_1 int(11) default '0'; declare $spellcategorycooldown_1 int(11) default '-1'; declare $spellid_2 mediumint(8) default '0'; declare $spelltrigger_2 int(11) default '0'; declare $spellcharges_2 smallint(4) default NULL; declare $spellppmRate_2 float default '0'; declare $spellcooldown_2 int(11) default '-1'; declare $spellcategory_2 int(11) default '0'; declare $spellcategorycooldown_2 int(11) default '-1'; declare $spellid_3 mediumint(8) default '0'; declare $spelltrigger_3 int(11) default '0'; declare $spellcharges_3 smallint(4) default NULL; declare $spellppmRate_3 float default '0'; declare $spellcooldown_3 int(11) default '-1'; declare $spellcategory_3 int(11) default '0'; declare $spellcategorycooldown_3 int(11) default '-1'; declare $spellid_4 mediumint(8) default '0'; declare $spelltrigger_4 int(11) default '0'; declare $spellcharges_4 smallint(4) default NULL; declare $spellppmRate_4 float default '0'; declare $spellcooldown_4 int(11) default '-1'; declare $spellcategory_4 int(11) default '0'; declare $spellcategorycooldown_4 int(11) default '-1'; declare $spellid_5 mediumint(8) default '0'; declare $spelltrigger_5 int(11) default '0'; declare $spellcharges_5 smallint(4) default NULL; declare $spellppmRate_5 float default '0'; declare $spellcooldown_5 int(11) default '-1'; declare $spellcategory_5 int(11) default '0'; declare $spellcategorycooldown_5 int(11) default '-1'; declare $bonding int(11) default '0'; declare $description varchar(255) default ''; declare $PageText mediumint(8) default '0'; declare $LanguageID int(11) default '0'; declare $PageMaterial int(11) default '0'; declare $startquest mediumint(8) default '0'; declare $lockid mediumint(8) default '0'; declare $Material tinyint(4) default '0'; declare $sheath int(11) default '0'; declare $RandomProperty mediumint(8) default '0'; declare $RandomSuffix mediumint(8) default '0'; declare $block mediumint(8) default '0'; declare $itemset mediumint(8) default '0'; declare $MaxDurability int(11) default '0'; declare $area mediumint(8) default '0'; declare $Map smallint(6) default '0'; declare $BagFamily mediumint(9) default '0'; declare $TotemCategory mediumint(9) default '0'; declare $socketColor_1 tinyint(4) default '0'; declare $socketContent_1 mediumint(9) default '0'; declare $socketColor_2 tinyint(4) default '0'; declare $socketContent_2 mediumint(9) default '0'; declare $socketColor_3 tinyint(4) default '0'; declare $socketContent_3 mediumint(9) default '0'; declare $socketBonus mediumint(9) default '0'; declare $GemProperties mediumint(9) default '0'; declare $RequiredDisenchantSkill smallint(6) default '-1'; declare $ArmorDamageModifier float default '0'; declare $Duration int(11) default '0' ; declare $ItemLimitCategory smallint(6) default '0'; declare $HolidayId int(11) default '0'; declare $ScriptName varchar(64) default ''; declare $DisenchantID mediumint(8) default '0'; declare $FoodType int(11) default '0'; declare $minMoneyLoot int(10) default '0'; declare $maxMoneyLoot int(10) default '0'; declare $WDBVerified int(11) default '1'; declare $sxjc int; declare $Mod int; declare $shjc int; declare $kxjc int; declare $hjjc int; declare $gdjc int; declare $num int; declare $i int default 1; declare $x int; declare $newName varchar(255); declare $sjbs int default 2000004; declare $shbs int default 2000003; declare $newentry mediumint(8); declare $sjsl int; declare $shsl int; declare $sjzz int; declare $shzz int; declare $cgl int; declare $cgxj int; /*录入数据需求*/ /*原武器编号*/ set $entry=99997; /*原武器属性记录*/ select class, subclass, unk0, name, displayid, Quality, Flags, Faction, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, maxcount, stackable, ContainerSlots, StatsCount, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, ScalingStatDistribution, ScalingStatValue, dmg_min1, dmg_max1, dmg_type1, dmg_min2, dmg_max2, dmg_type2, armor, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, ammo_type, RangedModRange, spellid_1, spelltrigger_1, spellcharges_1, spellppmRate_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, spellid_2, spelltrigger_2, spellcharges_2, spellppmRate_2, spellcooldown_2, spellcategory_2, spellcategorycooldown_2, spellid_3, spelltrigger_3, spellcharges_3, spellppmRate_3, spellcooldown_3, spellcategory_3, spellcategorycooldown_3, spellid_4, spelltrigger_4, spellcharges_4, spellppmRate_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, spellid_5, spelltrigger_5, spellcharges_5, spellppmRate_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, bonding, description, PageText, LanguageID, PageMaterial, startquest, lockid, Material, sheath, RandomProperty, RandomSuffix, block, itemset, MaxDurability, area, Map, BagFamily, TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties, RequiredDisenchantSkill, ArmorDamageModifier, Duration, ItemLimitCategory, HolidayId, ScriptName, DisenchantID, FoodType, minMoneyLoot, maxMoneyLoot, WDBVerified into $class,$subclass,$unk0,$name,$displayid,$Quality,$Flags,$Faction,$BuyCount,$BuyPrice,$SellPrice,$InventoryType,$AllowableClass,$AllowableRace,$ItemLevel,$RequiredLevel,$RequiredSkill,$RequiredSkillRank,$requiredspell,$requiredhonorrank,$RequiredCityRank,$RequiredReputationFaction,$RequiredReputationRank,$maxcount,$stackable,$ContainerSlots,$StatsCount,$stat_type1,$stat_value1,$stat_type2,$stat_value2,$stat_type3,$stat_value3,$stat_type4,$stat_value4,$stat_type5,$stat_value5,$stat_type6,$stat_value6,$stat_type7,$stat_value7,$stat_type8,$stat_value8,$stat_type9,$stat_value9,$stat_type10,$stat_value10,$ScalingStatDistribution,$ScalingStatValue,$dmg_min1,$dmg_max1,$dmg_type1,$dmg_min2,$dmg_max2,$dmg_type2,$armor,$holy_res,$fire_res,$nature_res,$frost_res,$shadow_res,$arcane_res,$delay,$ammo_type,$RangedModRange,$spellid_1,$spelltrigger_1,$spellcharges_1,$spellppmRate_1,$spellcooldown_1,$spellcategory_1,$spellcategorycooldown_1,$spellid_2,$spelltrigger_2,$spellcharges_2,$spellppmRate_2,$spellcooldown_2,$spellcategory_2,$spellcategorycooldown_2,$spellid_3,$spelltrigger_3,$spellcharges_3,$spellppmRate_3,$spellcooldown_3,$spellcategory_3,$spellcategorycooldown_3,$spellid_4,$spelltrigger_4,$spellcharges_4,$spellppmRate_4,$spellcooldown_4,$spellcategory_4,$spellcategorycooldown_4,$spellid_5,$spelltrigger_5,$spellcharges_5,$spellppmRate_5,$spellcooldown_5,$spellcategory_5,$spellcategorycooldown_5,$bonding,$description,$PageText,$LanguageID,$PageMaterial,$startquest,$lockid,$Material,$sheath,$RandomProperty,$RandomSuffix,$block,$itemset,$MaxDurability,$area,$Map,$BagFamily,$TotemCategory,$socketColor_1,$socketContent_1,$socketColor_2,$socketContent_2,$socketColor_3,$socketContent_3,$socketBonus,$GemProperties,$RequiredDisenchantSkill,$ArmorDamageModifier,$Duration,$ItemLimitCategory,$HolidayId,$ScriptName,$DisenchantID,$FoodType,$minMoneyLoot,$maxMoneyLoot,$WDBVerified from item_template where entry=$entry; /*批量升级模式 1 增值 2 翻倍*/ set $Mod=1; /*属性批量增长数值(或倍数)*/ set $sxjc=50; /*伤害批量增长数值(或倍数)*/ set $shjc=100; /*抗性批量增长数值(或倍数)*/ set $kxjc=5; /*护甲批量增长数值(或倍数)*/ set $hjjc=500; /*格挡批量增长数值(或倍数)*/ set $gdjc=200; /*初始化备注*/ set $description=''; /*升级石的基本需求*/ set $sjsl=5; /*守护石的基本需求*/ set $shsl=1; /*升级石的增长数量*/ set $sjzz=10; /*守护石的增长数量*/ set $shzz=1; /*成功几率*/ set $cgl=70; /*成功率下降*/ set $cgxj=5; /*创造升级物品批量个数*/ set $num=0; /**************批量开始**************/ if $num!=0 then WHILE $i<=$num DO /*重新编号*/ /*set $newentry=concat($entry,'',$i); 这个是加在后面...*/ set $newentry=concat($i,'',$entry); /*物品改名*/ set $newName=concat(concat($name,'','Lv'),'',$i); set $description=concat($description,'','★'); If $Mod=1 then /*****************************属性设置*************************/ if $stat_type1 !=0 then set $stat_value1 =$stat_value1+$sxjc; end if; if $stat_type2 !=0 then set $stat_value2 =$stat_value2+$sxjc; end if; if $stat_type3 !=0 then set $stat_value3 =$stat_value3+$sxjc; end if; if $stat_type4 !=0 then set $stat_value4 =$stat_value4+$sxjc; end if; if $stat_type5 !=0 then set $stat_value5 =$stat_value5+$sxjc; end if; if $stat_type6 !=0 then set $stat_value6 =$stat_value6+$sxjc; end if; if $stat_type7 !=0 then set $stat_value7 =$stat_value7+$sxjc; end if; if $stat_type8 !=0 then set $stat_value8 =$stat_value8+$sxjc; end if; if $stat_type9 !=0 then set $stat_value9 =$stat_value9+$sxjc; end if; if $stat_type10 !=0 then set $stat_value10 =$stat_value10+$sxjc; end if; /**************************伤害/防护***********************/ set $dmg_min1 =$dmg_min1+$shjc; set $dmg_max1 =$dmg_max1+$shjc; if $dmg_min2 !=0 then set $dmg_min2 =$dmg_min2+$shjc; end if; if $dmg_max2 !=0 then set $dmg_max2 =$dmg_max2+$shjc; end if; set $holy_res =$holy_res+$kxjc; set $fire_res =$fire_res+$kxjc; set $nature_res =$nature_res+$kxjc; set $frost_res =$frost_res+$kxjc; set $shadow_res =$shadow_res+$kxjc; set $arcane_res =$arcane_res+$kxjc; set $armor =$armor+$hjjc; set $block =$block+$gdjc; Else /*****************************属性设置*************************/ set $stat_value1 =$stat_value1*$sxjc; set $stat_value2 =$stat_value2*$sxjc; set $stat_value3 =$stat_value3*$sxjc; set $stat_value4 =$stat_value4*$sxjc; set $stat_value5 =$stat_value5*$sxjc; set $stat_value6 =$stat_value6*$sxjc; set $stat_value7 =$stat_value7*$sxjc; set $stat_value8 =$stat_value8*$sxjc; set $stat_value9 =$stat_value9*$sxjc; set $stat_value10 =$stat_value10*$sxjc; /**************************伤害/防护***********************/ set $dmg_min1 =$dmg_min1*$shjc; set $dmg_max1 =$dmg_max1*$shjc; set $dmg_min2 =$dmg_min2*$shjc; set $dmg_max2 =$dmg_max2*$shjc; set $holy_res =$holy_res*$kxjc; set $fire_res =$fire_res*$kxjc; set $nature_res =$nature_res*$kxjc; set $frost_res =$frost_res*$kxjc; set $shadow_res =$shadow_res*$kxjc; set $arcane_res =$arcane_res*$kxjc; set $armor =$armor*$hjjc; set $block =$block*$gdjc; end If; /******************执行插入*************************/ INSERT INTO item_template() VALUES ($newentry,$class,$subclass,$unk0,$newName,$displayid,$Quality,$Flags,$Faction,$BuyCount,$BuyPrice,$SellPrice,$InventoryType,$AllowableClass,$AllowableRace,$ItemLevel,$RequiredLevel,$RequiredSkill,$RequiredSkillRank,$requiredspell,$requiredhonorrank,$RequiredCityRank,$RequiredReputationFaction,$RequiredReputationRank,$maxcount,$stackable,$ContainerSlots,$StatsCount,$stat_type1,$stat_value1,$stat_type2,$stat_value2,$stat_type3,$stat_value3,$stat_type4,$stat_value4,$stat_type5,$stat_value5,$stat_type6,$stat_value6,$stat_type7,$stat_value7,$stat_type8,$stat_value8,$stat_type9,$stat_value9,$stat_type10,$stat_value10,$ScalingStatDistribution,$ScalingStatValue,$dmg_min1,$dmg_max1,$dmg_type1,$dmg_min2,$dmg_max2,$dmg_type2,$armor,$holy_res,$fire_res,$nature_res,$frost_res,$shadow_res,$arcane_res,$delay,$ammo_type,$RangedModRange,$spellid_1,$spelltrigger_1,$spellcharges_1,$spellppmRate_1,$spellcooldown_1,$spellcategory_1,$spellcategorycooldown_1,$spellid_2,$spelltrigger_2,$spellcharges_2,$spellppmRate_2,$spellcooldown_2,$spellcategory_2,$spellcategorycooldown_2,$spellid_3,$spelltrigger_3,$spellcharges_3,$spellppmRate_3,$spellcooldown_3,$spellcategory_3,$spellcategorycooldown_3,$spellid_4,$spelltrigger_4,$spellcharges_4,$spellppmRate_4,$spellcooldown_4,$spellcategory_4,$spellcategorycooldown_4,$spellid_5,$spelltrigger_5,$spellcharges_5,$spellppmRate_5,$spellcooldown_5,$spellcategory_5,$spellcategorycooldown_5,$bonding,$description,$PageText,$LanguageID,$PageMaterial,$startquest,$lockid,$Material,$sheath,$RandomProperty,$RandomSuffix,$block,$itemset,$MaxDurability,$area,$Map,$BagFamily,$TotemCategory,$socketColor_1,$socketContent_1,$socketColor_2,$socketContent_2,$socketColor_3,$socketContent_3,$socketBonus,$GemProperties,$RequiredDisenchantSkill,$ArmorDamageModifier,$Duration,$ItemLimitCategory,$HolidayId,$ScriptName,$DisenchantID,$FoodType,$minMoneyLoot,$maxMoneyLoot,$WDBVerified); set $i=$i+1; END WHILE; /************************插入升级公式*****************/ set $i=1; /*set $newentry=concat($entry,'',$i); 这个是加在后面...*/ set $newentry=concat($i,'',$entry); INSERT INTO custom_item_levelup (`item_entry`, `item_num`, `energy_entry`, `energy_num`, `guard_entry`, `guard_num`, `newitem_entry`, `rp`, `rank`, `level`, `type`, `points`, `price`) VALUES ($entry, 1, $sjbs, $sjsl, $shbs, $shsl, $newentry, $cgl, 0, 0, 0, 0, 0); if $num>1 then set $i=1; WHILE $i<$num DO set $x=$i+1; /*改变消耗数量 和 成功几率*/ set $sjsl =$sjsl+$sjzz; set $shsl =$shsl+$shzz; set $cgl =$cgl-$cgxj; if $cgl <=0 then set $cgl = 1; end if; INSERT INTO custom_item_levelup (`item_entry`, `item_num`, `energy_entry`, `energy_num`, `guard_entry`, `guard_num`, `newitem_entry`, `rp`, `rank`, `level`, `type`, `points`, `price`) VALUES (concat($i,'',$entry), 1, $sjbs, $sjsl, $shbs, $shsl, concat($x,'',$entry), $cgl, 0, 0, 0, 0, 0); /*(concat($entry,'',$i), 1, $sjbs, $sjsl, $shbs, $shsl, concat($entry,'',$x), $cgl, 0, 0, 0, 0, 0); 这个是加在后面...*/ set $i=$i+1; END WHILE; end if; end if; end