Advertisement
slp13at420

sql fast insert file creator

Nov 16th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.78 KB | None | 0 0
  1. -- sql extractor
  2. local Command = ".sqlpull"
  3. local Start = 60000
  4. local End = 60999
  5.  
  6. function Sqlpull(event, pPlayer, msg)
  7.     if(msg == Command)then 
  8.         local EntryID = Start
  9.         local File = io.open("scripts/ADMIN/gear.sql", "w")
  10.        
  11.         File:write("DELETE FROM `items` WHERE entry>'"..tostring(Start).."'-1 AND entry<'"..tostring(End).."'+1;\n")
  12.        
  13.         File:write("INSERT INTO `items` (`entry`, `class`, `subclass`, `field4`, `name1`, `displayid`, `quality`, `inventorytype`, `allowableclass`, `allowablerace`, `Unique`, `maxcount`, `itemstatscount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, ") -- `  23
  14.        
  15.         File:write("`stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `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`, ") -- 24
  16.        
  17.         File:write("`ammo_type`, `range`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`,  `spelltrigger_2`, `spellcharges_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, ") -- 20
  18.        
  19.         File:write("`spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `sheathID`, `block`, `itemset`, `bagfamily`, `TotemCategory`, `socket_color_1`, `unk201_3`, `socket_color_2`, `unk201_5`, `socket_color_3`, `unk201_7`, `socket_bonus`, `GemProperties`) VALUES \n\n") -- 27
  20.  
  21.             repeat
  22.                 local XClassID = WorldDBQuery("SELECT `class` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  23.                 local ClassID = XClassID:GetColumn(0):GetLong()
  24.  
  25.                 local XSubclassID = WorldDBQuery("SELECT `subclass` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;")
  26.                 local SubclassID = XSubclassID:GetColumn(0):GetLong()
  27.  
  28.                 local XField4ID = WorldDBQuery("SELECT `field4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  29.                 local Field4ID = XField4ID:GetColumn(0):GetLong()
  30.  
  31.                 local XName1ID = WorldDBQuery("SELECT `name1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  32.                 local Name1ID = XName1ID:GetColumn(0):GetString()
  33.  
  34.                 local XDisplayID = WorldDBQuery("SELECT `displayid` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  35.                 local DisplayID = XDisplayID:GetColumn(0):GetLong()
  36.  
  37.                 local XQualityID = WorldDBQuery("SELECT `quality` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  38.                 local QualityID = XQualityID:GetColumn(0):GetLong()
  39.  
  40.                 local XInventorytypeID = WorldDBQuery("SELECT `inventorytype` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  41.                 local InventorytypeID = XInventorytypeID:GetColumn(0):GetLong()
  42.  
  43.                 local XAllowableclassID = WorldDBQuery("SELECT `allowableclass` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  44.                 local AllowableclassID = XAllowableclassID:GetColumn(0):GetLong()
  45.  
  46.                 local XAllowableraceID = WorldDBQuery("SELECT `allowablerace` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  47.                 local AllowableraceID = XAllowableraceID:GetColumn(0):GetLong()
  48.  
  49.                 local XUniqueID = WorldDBQuery("SELECT `unique` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  50.                 local UniqueID = XUniqueID:GetColumn(0):GetLong()
  51. --
  52.                 local XMaxcountID = WorldDBQuery("SELECT `maxcount` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  53.                 local MaxcountID = XMaxcountID:GetColumn(0):GetLong()
  54.  
  55.                 local XItemstatscountID = WorldDBQuery("SELECT `itemstatscount` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  56.                 local ItemstatscountID = XItemstatscountID:GetColumn(0):GetLong()
  57.  
  58.                 local XStat_Type1ID = WorldDBQuery("SELECT `stat_type1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  59.                 local Stat_Type1ID = XStat_Type1ID:GetColumn(0):GetLong()
  60.  
  61.                 local XStat_Value1ID = WorldDBQuery("SELECT `stat_value1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  62.                 local Stat_Value1ID = XStat_Value1ID:GetColumn(0):GetLong()
  63.  
  64.                 local XStat_Type2ID = WorldDBQuery("SELECT `stat_type2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  65.                 local Stat_Type2ID = XStat_Type2ID:GetColumn(0):GetLong()
  66.  
  67.                 local XStat_Value2ID = WorldDBQuery("SELECT `stat_value2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  68.                 local Stat_Value2ID = XStat_Value2ID:GetColumn(0):GetLong()
  69.  
  70.                 local XStat_Type3ID = WorldDBQuery("SELECT `stat_type3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  71.                 local Stat_Type3ID = XStat_Type3ID:GetColumn(0):GetLong()
  72.  
  73.                 local XStat_Value3ID = WorldDBQuery("SELECT `stat_value3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  74.                 local Stat_Value3ID = XStat_Value3ID:GetColumn(0):GetLong()
  75.  
  76.                 local XStat_Type4ID = WorldDBQuery("SELECT `stat_type4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  77.                 local Stat_Type4ID = XStat_Type4ID:GetColumn(0):GetLong()
  78.  
  79.                 local XStat_Value4ID = WorldDBQuery("SELECT `stat_value4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  80.                 local Stat_Value4ID = XStat_Value4ID:GetColumn(0):GetLong()
  81. --
  82.                 local XStat_Type5ID = WorldDBQuery("SELECT `stat_type5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  83.                 local Stat_Type5ID = XStat_Type5ID:GetColumn(0):GetLong()
  84.  
  85.                 local XStat_Value5ID = WorldDBQuery("SELECT `stat_value5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  86.                 local Stat_Value5ID = XStat_Value5ID:GetColumn(0):GetLong()
  87.  
  88.                 local XStat_Type6ID = WorldDBQuery("SELECT `stat_type6` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  89.                 local Stat_Type6ID = XStat_Type6ID:GetColumn(0):GetLong()
  90.  
  91.                 local XStat_Value6ID = WorldDBQuery("SELECT `stat_value6` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  92.                 local Stat_Value6ID = XStat_Value6ID:GetColumn(0):GetLong()
  93.  
  94.                 local XStat_Type7ID = WorldDBQuery("SELECT `stat_type7` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  95.                 local Stat_Type7ID = XStat_Type7ID:GetColumn(0):GetLong()
  96.  
  97.                 local XStat_Value7ID = WorldDBQuery("SELECT `stat_value7` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  98.                 local Stat_Value7ID = XStat_Value7ID:GetColumn(0):GetLong()
  99.  
  100.                 local XStat_Type8ID = WorldDBQuery("SELECT `stat_type8` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  101.                 local Stat_Type8ID = XStat_Type8ID:GetColumn(0):GetLong()
  102.  
  103.                 local XStat_Value8ID = WorldDBQuery("SELECT `stat_value8` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  104.                 local Stat_Value8ID = XStat_Value8ID:GetColumn(0):GetLong()
  105.  
  106.                 local XStat_Type9ID = WorldDBQuery("SELECT `stat_type9` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  107.                 local Stat_Type9ID = XStat_Type9ID:GetColumn(0):GetLong()
  108.  
  109.                 local XStat_Value9ID = WorldDBQuery("SELECT `stat_value9` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  110.                 local Stat_Value9ID = XStat_Value9ID:GetColumn(0):GetLong()
  111. --
  112.                 local XStat_Type10ID = WorldDBQuery("SELECT `stat_type10` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  113.                 local Stat_Type10ID = XStat_Type10ID:GetColumn(0):GetLong()
  114.  
  115.                 local XStat_Value10ID = WorldDBQuery("SELECT `stat_value10` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  116.                 local Stat_Value10ID = XStat_Value10ID:GetColumn(0):GetLong()
  117.  
  118.                 local XDmg_Min1ID = WorldDBQuery("SELECT `dmg_min1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  119.                 local Dmg_Min1ID = XDmg_Min1ID:GetColumn(0):GetLong()
  120.  
  121.                 local XDmg_Max1ID = WorldDBQuery("SELECT `dmg_max1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  122.                 local Dmg_Max1ID = XDmg_Max1ID:GetColumn(0):GetLong()
  123.  
  124.                 local XDmg_Type1ID = WorldDBQuery("SELECT `dmg_type1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  125.                 local Dmg_Type1ID = XDmg_Type1ID:GetColumn(0):GetLong()
  126.  
  127.                 local XDmg_Min2ID = WorldDBQuery("SELECT `dmg_min2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  128.                 local Dmg_Min2ID = XDmg_Min2ID:GetColumn(0):GetLong()
  129.  
  130.                 local XDmg_Max2ID = WorldDBQuery("SELECT `dmg_max2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  131.                 local Dmg_Max2ID = XDmg_Max2ID:GetColumn(0):GetLong()
  132.  
  133.                 local XDmg_Type2ID = WorldDBQuery("SELECT `dmg_type2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  134.                 local Dmg_Type2ID = XDmg_Type2ID:GetColumn(0):GetLong()
  135.  
  136.                 local XArmorID = WorldDBQuery("SELECT `armor` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  137.                 local ArmorID = XArmorID:GetColumn(0):GetLong()
  138.  
  139.                 local XHoly_ResID = WorldDBQuery("SELECT `holy_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  140.                 local Holy_ResID = XHoly_ResID:GetColumn(0):GetLong()
  141. --
  142.                 local XFire_ResID = WorldDBQuery("SELECT `fire_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  143.                 local Fire_ResID = XFire_ResID:GetColumn(0):GetLong()
  144.  
  145.                 local XNature_ResID = WorldDBQuery("SELECT `nature_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  146.                 local Nature_ResID = XNature_ResID:GetColumn(0):GetLong()
  147.  
  148.                 local XFrost_ResID = WorldDBQuery("SELECT `frost_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  149.                 local Frost_ResID = XFrost_ResID:GetColumn(0):GetLong()
  150.  
  151.                 local XShadow_ResID = WorldDBQuery("SELECT `shadow_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  152.                 local Shadow_ResID = XShadow_ResID:GetColumn(0):GetLong()
  153.  
  154.                 local XArcane_ResID = WorldDBQuery("SELECT `arcane_res` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  155.                 local Arcane_ResID = XArcane_ResID:GetColumn(0):GetLong()
  156.  
  157.                 local XDelayID = WorldDBQuery("SELECT `delay` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  158.                 local DelayID = XDelayID:GetColumn(0):GetLong()
  159.  
  160.                 local XAmmo_TypeID = WorldDBQuery("SELECT `ammo_type` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  161.                 local Ammo_TypeID = XAmmo_TypeID:GetColumn(0):GetLong()
  162.  
  163.                 local XRangeID = WorldDBQuery("SELECT `range` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  164.                 local RangeID = XRangeID:GetColumn(0):GetUShort()
  165.  
  166.                 local XSpellid_1ID = WorldDBQuery("SELECT `spellid_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  167.                 local Spellid_1ID = XSpellid_1ID:GetColumn(0):GetLong()
  168.  
  169.                 local XSpelltrigger_1ID = WorldDBQuery("SELECT `spelltrigger_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  170.                 local Spelltrigger_1ID = XSpelltrigger_1ID:GetColumn(0):GetLong()
  171. --
  172.                 local XSpellcharges_1ID = WorldDBQuery("SELECT `spellcharges_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  173.                 local Spellcharges_1ID = XSpellcharges_1ID:GetColumn(0):GetLong()
  174.  
  175.                 local XSpellcooldown_1ID = WorldDBQuery("SELECT `spellcooldown_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  176.                 local Spellcooldown_1ID = XSpellcooldown_1ID:GetColumn(0):GetLong()
  177.  
  178.                 local XSpellcategory_1ID = WorldDBQuery("SELECT `spellcategory_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  179.                 local Spellcategory_1ID = XSpellcategory_1ID:GetColumn(0):GetLong()
  180.  
  181.                 local XSpellcategorycooldown_1ID = WorldDBQuery("SELECT `spellcategorycooldown_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  182.                 local Spellcategorycooldown_1ID = XSpellcategorycooldown_1ID:GetColumn(0):GetLong()
  183.  
  184.                 local XSpellid_2ID = WorldDBQuery("SELECT `spellid_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  185.                 local Spellid_2ID = XSpellid_2ID:GetColumn(0):GetLong()
  186.  
  187.                 local XSpelltrigger_2ID = WorldDBQuery("SELECT `spelltrigger_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  188.                 local Spelltrigger_2ID = XSpelltrigger_2ID:GetColumn(0):GetLong()
  189.  
  190.                 local XSpellcharges_2ID = WorldDBQuery("SELECT `spellcharges_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  191.                 local Spellcharges_2ID = XSpellcharges_2ID:GetColumn(0):GetLong()
  192.  
  193.                 local XSpellcooldown_2ID = WorldDBQuery("SELECT `spellcooldown_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  194.                 local Spellcooldown_2ID = XSpellcooldown_2ID:GetColumn(0):GetLong()
  195.  
  196.                 local XSpellcategory_2ID = WorldDBQuery("SELECT `spellcategory_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  197.                 local Spellcategory_2ID = XSpellcategory_2ID:GetColumn(0):GetLong()
  198.  
  199.                 local XSpellcategorycooldown_2ID = WorldDBQuery("SELECT `spellcategorycooldown_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  200.                 local Spellcategorycooldown_2ID = XSpellcategorycooldown_2ID:GetColumn(0):GetLong()
  201. --
  202.                 local XSpellid_3ID = WorldDBQuery("SELECT `spellid_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  203.                 local Spellid_3ID = XSpellid_3ID:GetColumn(0):GetLong()
  204.  
  205.                 local XSpelltrigger_3ID = WorldDBQuery("SELECT `spelltrigger_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  206.                 local Spelltrigger_3ID = XSpelltrigger_3ID:GetColumn(0):GetLong()
  207.  
  208.                 local XSpellcharges_3ID = WorldDBQuery("SELECT `spellcharges_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  209.                 local Spellcharges_3ID = XSpellcharges_3ID:GetColumn(0):GetLong()
  210.  
  211.                 local XSpellcooldown_3ID = WorldDBQuery("SELECT `spellcooldown_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  212.                 local Spellcooldown_3ID = XSpellcooldown_3ID:GetColumn(0):GetLong()
  213.  
  214.                 local XSpellcategory_3ID = WorldDBQuery("SELECT `spellcategory_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  215.                 local Spellcategory_3ID = XSpellcategory_3ID:GetColumn(0):GetLong()
  216.  
  217.                 local XSpellcategorycooldown_3ID = WorldDBQuery("SELECT `spellcategorycooldown_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  218.                 local Spellcategorycooldown_3ID = XSpellcategorycooldown_3ID:GetColumn(0):GetLong()
  219.  
  220.                 local XSpellid_4ID = WorldDBQuery("SELECT `spellid_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  221.                 local Spellid_4ID = XSpellid_4ID:GetColumn(0):GetLong()
  222.  
  223.                 local XSpelltrigger_4ID = WorldDBQuery("SELECT `spelltrigger_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  224.                 local Spelltrigger_4ID = XSpelltrigger_4ID:GetColumn(0):GetLong()
  225.  
  226.                 local XSpellcharges_4ID = WorldDBQuery("SELECT `spellcharges_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  227.                 local Spellcharges_4ID = XSpellcharges_4ID:GetColumn(0):GetLong()
  228.  
  229.                 local XSpellcooldown_4ID = WorldDBQuery("SELECT `spellcooldown_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  230.                 local Spellcooldown_4ID = XSpellcooldown_4ID:GetColumn(0):GetLong()
  231. --
  232.                 local XSpellcategory_4ID = WorldDBQuery("SELECT `spellcategory_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  233.                 local Spellcategory_4ID = XSpellcategory_4ID:GetColumn(0):GetLong()
  234.  
  235.                 local XSpellcategorycooldown_4ID = WorldDBQuery("SELECT `spellcategorycooldown_4` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  236.                 local Spellcategorycooldown_4ID = XSpellcategorycooldown_4ID:GetColumn(0):GetLong()
  237.  
  238.                 local XSpellid_5ID = WorldDBQuery("SELECT `spellid_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  239.                 local Spellid_5ID = XSpellid_5ID:GetColumn(0):GetLong()
  240.  
  241.                 local XSpelltrigger_5ID = WorldDBQuery("SELECT `spelltrigger_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  242.                 local Spelltrigger_5ID = XSpelltrigger_5ID:GetColumn(0):GetLong()
  243.  
  244.                 local XSpellcharges_5ID = WorldDBQuery("SELECT `spellcharges_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  245.                 local Spellcharges_5ID = XSpellcharges_5ID:GetColumn(0):GetLong()
  246.  
  247.                 local XSpellcooldown_5ID = WorldDBQuery("SELECT `spellcooldown_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  248.                 local Spellcooldown_5ID = XSpellcooldown_5ID:GetColumn(0):GetLong()
  249.  
  250.                 local XSpellcategory_5ID = WorldDBQuery("SELECT `spellcategory_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  251.                 local Spellcategory_5ID = XSpellcategory_5ID:GetColumn(0):GetLong()
  252.  
  253.                 local XSpellcategorycooldown_5ID = WorldDBQuery("SELECT `spellcategorycooldown_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  254.                 local Spellcategorycooldown_5ID = XSpellcategorycooldown_5ID:GetColumn(0):GetLong()
  255.  
  256.                 local XBondingID = WorldDBQuery("SELECT `bonding` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  257.                 local BondingID = XBondingID:GetColumn(0):GetLong()
  258.  
  259.                 local XDescriptionID = WorldDBQuery("SELECT `description` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  260.                 local DescriptionID = XDescriptionID:GetColumn(0):GetString()
  261. --
  262.                 local XSheathID = WorldDBQuery("SELECT `sheathID` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  263.                 local SheathID = XSheathID:GetColumn(0):GetLong()
  264.  
  265.                 local XBlockID = WorldDBQuery("SELECT `block` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  266.                 local BlockID = XBlockID:GetColumn(0):GetLong()
  267.  
  268.                 local XItemsetID = WorldDBQuery("SELECT `itemset` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  269.                 local ItemsetID = XItemsetID:GetColumn(0):GetLong()
  270.  
  271.                 local XBagfamilyID = WorldDBQuery("SELECT `bagfamily` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  272.                 local BagfamilyID = XBagfamilyID:GetColumn(0):GetLong()
  273.  
  274.                 local XTotemcategoryID = WorldDBQuery("SELECT `totemcategory` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  275.                 local TotemcategoryID = XTotemcategoryID:GetColumn(0):GetLong()
  276.  
  277.                 local XSocket_Color_1ID = WorldDBQuery("SELECT `socket_color_1` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  278.                 local Socket_Color_1ID = XSocket_Color_1ID:GetColumn(0):GetLong()
  279.  
  280.                 local XUnk201_3ID = WorldDBQuery("SELECT `unk201_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  281.                 local Unk201_3ID = XUnk201_3ID:GetColumn(0):GetLong()
  282.  
  283.                 local XSocket_Color_2ID = WorldDBQuery("SELECT `socket_color_2` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  284.                 local Socket_Color_2ID = XSocket_Color_2ID:GetColumn(0):GetLong()
  285.  
  286.                 local XUnk201_5ID = WorldDBQuery("SELECT `unk201_5` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  287.                 local Unk201_5ID = XUnk201_5ID:GetColumn(0):GetLong()
  288.  
  289.                 local XSocket_Color_3ID = WorldDBQuery("SELECT `socket_color_3` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  290.                 local Socket_Color_3ID = XSocket_Color_3ID:GetColumn(0):GetLong()
  291. --
  292.                 local XUnk201_7ID = WorldDBQuery("SELECT `unk201_7` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  293.                 local Unk201_7ID = XUnk201_7ID:GetColumn(0):GetLong()
  294.  
  295.                 local XSocket_BonusID = WorldDBQuery("SELECT `socket_bonus` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  296.                 local Socket_BonusID = XSocket_BonusID:GetColumn(0):GetLong()
  297.  
  298.                 local XGempropertiesID = WorldDBQuery("SELECT `GemProperties` FROM world.items WHERE `entry` = '"..EntryID.."' LIMIT 1;");
  299.                 local GempropertiesID = XGempropertiesID:GetColumn(0):GetLong()
  300.  
  301.                 File:write ("("..tostring(EntryID)..", "..tostring(ClassID)..", "..tostring(SubclassID)..", "..tostring(Field4ID)..", '"..tostring(Name1ID).."', "..tostring(DisplayID)..", "..tostring(QualityID)..", "..tostring(InventorytypeID)..", "..tostring(AllowableclassID)..", "..tostring(AllowableraceID)..", "..tostring(UniqueID)..", "..tostring(MaxcountID)..", "..tostring(ItemstatscountID)..", "..tostring(Stat_Type1ID)..", "..tostring(Stat_Value1ID)..", "..tostring(Stat_Type2ID)..", "..tostring(Stat_Value2ID)..", "..tostring(Stat_Type3ID)..", "..tostring(Stat_Value3ID)..", "..tostring(Stat_Type4ID)..", "..tostring(Stat_Value4ID)..", "..tostring(Stat_Type5ID)..", "..tostring(Stat_Value5ID)..", ") -- 23
  302.  
  303.                 File:write (""..tostring(Stat_Type6ID)..", "..tostring(Stat_Value6ID)..", "..tostring(Stat_Type7ID)..", "..tostring(Stat_Value7ID)..", "..tostring(Stat_Type8ID)..", "..tostring(Stat_Value8ID)..", "..tostring(Stat_Type9ID)..", "..tostring(Stat_Value9ID)..", "..tostring(Stat_Type10ID)..", "..tostring(Stat_Value10ID)..", "..tostring(Dmg_Min1ID)..", "..tostring(Dmg_Max1ID)..", "..tostring(Dmg_Type1ID)..", "..tostring(Dmg_Min2ID)..", "..tostring(Dmg_Max2ID)..", "..tostring(Dmg_Type2ID)..", "..tostring(ArmorID)..", "..tostring(Holy_ResID)..", "..tostring(Fire_ResID)..", "..tostring(Nature_ResID)..", "..tostring(Frost_ResID)..", "..tostring(Shadow_ResID)..", "..tostring(Arcane_ResID)..", "..tostring(DelayID)..", ") -- 24
  304.                
  305.                 File:write (""..tostring(Ammo_TypeID)..", "..tostring(RangeID)..", "..tostring(Spellid_1ID)..", "..tostring(Spelltrigger_1ID)..", "..tostring(Spellcharges_1ID)..", "..tostring(Spellcooldown_1ID)..", "..tostring(Spellcategory_1ID)..", "..tostring(Spellcategorycooldown_1ID)..", "..tostring(Spellid_2ID)..", "..tostring(Spelltrigger_2ID)..", "..tostring(Spellcharges_2ID)..", "..tostring(Spellcooldown_2ID)..", "..tostring(Spellcategory_2ID)..", "..tostring(Spellcategorycooldown_2ID)..", "..tostring(Spellid_3ID)..", "..tostring(Spelltrigger_3ID)..", "..tostring(Spellcharges_3ID)..", "..tostring(Spellcooldown_3ID)..", "..tostring(Spellcategory_3ID)..", "..tostring(Spellcategorycooldown_3ID)..", ") -- 20
  306.                
  307.                 File:write (""..tostring(Spellid_4ID)..", "..tostring(Spelltrigger_4ID)..", "..tostring(Spellcharges_4ID)..", "..tostring(Spellcooldown_4ID)..", "..tostring(Spellcategory_4ID)..", "..tostring(Spellcategorycooldown_4ID)..", "..tostring(Spellid_5ID)..", "..tostring(Spelltrigger_5ID)..", "..tostring(Spellcharges_5ID)..", "..tostring(Spellcooldown_5ID)..", "..tostring(Spellcategory_5ID)..", "..tostring(Spellcategorycooldown_5ID)..", "..tostring(BondingID)..", '"..tostring(DescriptionID).."', "..tostring(SheathID)..", "..tostring(BlockID)..", "..tostring(ItemsetID)..", "..tostring(BagfamilyID)..", "..tostring(TotemcategoryID)..", "..tostring(Socket_Color_1ID)..", "..tostring(Unk201_3ID)..", "..tostring(Socket_Color_2ID)..", "..tostring(Unk201_5ID)..", "..tostring(Socket_Color_3ID)..", "..tostring(Unk201_7ID)..", "..tostring(Socket_BonusID)..", "..tostring(GempropertiesID).."),\n") -- 27
  308.                
  309.                 print(""..EntryID.."\n")
  310.  
  311.                     repeat
  312.                         EntryID = (EntryID+1)
  313.                         Idtest = WorldDBQuery("SELECT `entry` FROM world.items WHERE `entry` = '"..EntryID.."' limit 1;");
  314.                         until (Idtest~=nil)
  315.                        
  316.                 until (EntryID==(End+1))
  317.                
  318.         pPlayer:SendBroadcastMessage("Completed.");
  319.         EntryID = 0
  320.         File:close()
  321.         return false;
  322.         end
  323. return;
  324. end
  325.  
  326. print "\n Admin SqlPull loaded \n"
  327.  
  328. RegisterServerHook(16, "Sqlpull")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement