Advertisement
tok124

sql for items

Nov 12th, 2017
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SET @name = "V.I.P";
  2. SELECT
  3. class,
  4. subclass,
  5. CASE allowableclass
  6.     WHEN 1 THEN
  7.     CASE inventorytype
  8.         WHEN 1 THEN CONCAT(@name, " Warrior ", "Head")
  9.         WHEN 3 THEN CONCAT(@name, " Warrior ", "Shoulder")
  10.         WHEN 5 THEN CONCAT(@name, " Warrior ", "Chest")
  11.         WHEN 6 THEN CONCAT(@name, " Warrior ", "Waist")
  12.         WHEN 7 THEN CONCAT(@name, " Warrior ", "Legs")
  13.         WHEN 8 THEN CONCAT(@name, " Warrior ", "Feet")
  14.         WHEN 9 THEN CONCAT(@name, " Warrior ", "Wrist")
  15.         WHEN 10 THEN CONCAT(@name, " Warrior ", "Gloves")
  16.         WHEN 20 THEN CONCAT(@name, " Warrior ", "Chest")
  17.     END
  18.        
  19.     WHEN 2 THEN
  20.     CASE inventorytype
  21.         WHEN 1 THEN CONCAT(@name, " Paladin ", "Head")
  22.         WHEN 3 THEN CONCAT(@name, " Paladin ", "Shoulder")
  23.         WHEN 5 THEN CONCAT(@name, " Paladin ", "Chest")
  24.         WHEN 6 THEN CONCAT(@name, " Paladin ", "Waist")
  25.         WHEN 7 THEN CONCAT(@name, " Paladin ", "Legs")
  26.         WHEN 8 THEN CONCAT(@name, " Paladin ", "Feet")
  27.         WHEN 9 THEN CONCAT(@name, " Paladin ", "Wrist")
  28.         WHEN 10 THEN CONCAT(@name, " Paladin ", "Gloves")
  29.         WHEN 20 THEN CONCAT(@name, " Paladin ", "Chest")
  30.     END
  31.    
  32.     WHEN 4 THEN
  33.     CASE inventorytype
  34.         WHEN 1 THEN CONCAT(@name, " Hunter ", "Head")
  35.         WHEN 3 THEN CONCAT(@name, " Hunter ", "Shoulder")
  36.         WHEN 5 THEN CONCAT(@name, " Hunter ", "Chest")
  37.         WHEN 6 THEN CONCAT(@name, " Hunter ", "Waist")
  38.         WHEN 7 THEN CONCAT(@name, " Hunter ", "Legs")
  39.         WHEN 8 THEN CONCAT(@name, " Hunter ", "Feet")
  40.         WHEN 9 THEN CONCAT(@name, " Hunter ", "Wrist")
  41.         WHEN 10 THEN CONCAT(@name, " Hunter ", "Gloves")
  42.         WHEN 20 THEN CONCAT(@name, " Hunter ", "Chest")
  43.     END
  44.        
  45.     WHEN 8 THEN
  46.     CASE inventorytype
  47.         WHEN 1 THEN CONCAT(@name, " Rogue ", "Head")
  48.         WHEN 3 THEN CONCAT(@name, " Rogue ", "Shoulder")
  49.         WHEN 5 THEN CONCAT(@name, " Rogue ", "Chest")
  50.         WHEN 6 THEN CONCAT(@name, " Rogue ", "Waist")
  51.         WHEN 7 THEN CONCAT(@name, " Rogue ", "Legs")
  52.         WHEN 8 THEN CONCAT(@name, " Rogue ", "Feet")
  53.         WHEN 9 THEN CONCAT(@name, " Rogue ", "Wrist")
  54.         WHEN 10 THEN CONCAT(@name, " Rogue ", "Gloves")
  55.         WHEN 20 THEN CONCAT(@name, " Rogue ", "Chest")
  56.     END
  57.        
  58.     WHEN 16 THEN
  59.     CASE inventorytype
  60.         WHEN 1 THEN CONCAT(@name, " Priest ", "Head")
  61.         WHEN 3 THEN CONCAT(@name, " Priest ", "Shoulder")
  62.         WHEN 5 THEN CONCAT(@name, " Priest ", "Chest")
  63.         WHEN 6 THEN CONCAT(@name, " Priest ", "Waist")
  64.         WHEN 7 THEN CONCAT(@name, " Priest ", "Legs")
  65.         WHEN 8 THEN CONCAT(@name, " Priest ", "Feet")
  66.         WHEN 9 THEN CONCAT(@name, " Priest ", "Wrist")
  67.         WHEN 10 THEN CONCAT(@name, " Priest ", "Gloves")
  68.         WHEN 20 THEN CONCAT(@name, " Priest ", "Chest")
  69.     END
  70.        
  71.     WHEN 64 THEN
  72.     CASE inventorytype
  73.         WHEN 1 THEN CONCAT(@name, " Shaman ", "Head")
  74.         WHEN 3 THEN CONCAT(@name, " Shaman ", "Shoulder")
  75.         WHEN 5 THEN CONCAT(@name, " Shaman ", "Chest")
  76.         WHEN 6 THEN CONCAT(@name, " Shaman ", "Waist")
  77.         WHEN 7 THEN CONCAT(@name, " Shaman ", "Legs")
  78.         WHEN 8 THEN CONCAT(@name, " Shaman ", "Feet")
  79.         WHEN 9 THEN CONCAT(@name, " Shaman ", "Wrist")
  80.         WHEN 10 THEN CONCAT(@name, " Shaman ", "Gloves")
  81.         WHEN 20 THEN CONCAT(@name, " Shaman ", "Chest")
  82.     END
  83.        
  84.     WHEN 128 THEN
  85.     CASE inventorytype
  86.         WHEN 1 THEN CONCAT(@name, " Mage ", "Head")
  87.         WHEN 3 THEN CONCAT(@name, " Mage ", "Shoulder")
  88.         WHEN 5 THEN CONCAT(@name, " Mage ", "Chest")
  89.         WHEN 6 THEN CONCAT(@name, " Mage ", "Waist")
  90.         WHEN 7 THEN CONCAT(@name, " Mage ", "Legs")
  91.         WHEN 8 THEN CONCAT(@name, " Mage ", "Feet")
  92.         WHEN 9 THEN CONCAT(@name, " Mage ", "Wrist")
  93.         WHEN 10 THEN CONCAT(@name, " Mage ", "Gloves")
  94.         WHEN 20 THEN CONCAT(@name, " Mage ", "Chest")
  95.     END
  96.        
  97.     WHEN 256 THEN
  98.     CASE inventorytype
  99.         WHEN 1 THEN CONCAT(@name, " Warlock ", "Head")
  100.         WHEN 3 THEN CONCAT(@name, " Warlock ", "Shoulder")
  101.         WHEN 5 THEN CONCAT(@name, " Warlock ", "Chest")
  102.         WHEN 6 THEN CONCAT(@name, " Warlock ", "Waist")
  103.         WHEN 7 THEN CONCAT(@name, " Warlock ", "Legs")
  104.         WHEN 8 THEN CONCAT(@name, " Warlock ", "Feet")
  105.         WHEN 9 THEN CONCAT(@name, " Warlock ", "Wrist")
  106.         WHEN 10 THEN CONCAT(@name, " Warlock ", "Gloves")
  107.         WHEN 20 THEN CONCAT(@name, " Warlock ", "Chest")
  108.     END
  109.        
  110.     WHEN 1024 THEN
  111.     CASE inventorytype
  112.         WHEN 1 THEN CONCAT(@name, " Druid ", "Head")
  113.         WHEN 3 THEN CONCAT(@name, " Druid ", "Shoulder")
  114.         WHEN 5 THEN CONCAT(@name, " Druid ", "Chest")
  115.         WHEN 6 THEN CONCAT(@name, " Druid ", "Waist")
  116.         WHEN 7 THEN CONCAT(@name, " Druid ", "Legs")
  117.         WHEN 8 THEN CONCAT(@name, " Druid ", "Feet")
  118.         WHEN 9 THEN CONCAT(@name, " Druid ", "Wrist")
  119.         WHEN 10 THEN CONCAT(@name, " Druid ", "Gloves")
  120.         WHEN 20 THEN CONCAT(@name, " Druid ", "Chest")
  121.     END
  122. END AS name,
  123. 5 AS quality,
  124. allowableclass,
  125. inventorytype,
  126. displayid,
  127. 255 AS itemlevel,
  128. 255 AS requiredlevel,
  129. 10 AS StatsCount,
  130. 10000 AS armor,
  131. 1 AS bonding,
  132. 1 AS socketColor_1,
  133. 2 AS socketColor_2,
  134. 4 AS socketColor_3,
  135. "VIP Instance Item" AS description
  136. FROM item_template WHERE itemset IN (669,679,670,672,684,668,671,677,675) ORDER BY allowableclass;
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement