Removed all bot command spell scripts but 'template' query

This commit is contained in:
Uleat 2016-03-08 16:25:05 -05:00
parent 2189569312
commit e2e1298523
16 changed files with 0 additions and 1435 deletions

View File

@ -1,78 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'WIZARD' caster_class, `classes12` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes12` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes13` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` = '14'
AND '25' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY mana_cost DESC,
FIELD(target_type, 'Single'),
spell_level,
FIELD(caster_class, 'CLERIC', 'DRUID', 'SHAMAN', 'NECROMANCER', 'WIZARD', 'MAGICIAN', 'ENCHANTER')

View File

@ -1,73 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '9' AND `CastRestriction` = '0' THEN 'Animal'
WHEN `targettype` = '10' AND `CastRestriction` = '0' THEN 'Undead'
WHEN `targettype` = '11' AND `CastRestriction` = '0' THEN 'Summoned'
WHEN `targettype` = '16' AND `CastRestriction` = '0' THEN 'Plant'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
`ResistDiff` resist_diff,
`max1` max_target_level
-- extra <end>
FROM (
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '22' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '22' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '22' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes13` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '22' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '22' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY resist_diff,
FIELD(target_type, 'Animal', 'Undead', 'Summoned', 'Plant', 'Single'),
max_target_level DESC,
spell_level,
FIELD(caster_class, 'DRUID', 'SHAMAN', 'NECROMANCER', 'MAGICIAN', 'ENCHANTER')

View File

@ -1,193 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
(
(IF(('20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '1', '0')) |
(IF(('35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '2', '0')) |
(IF(('36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '4', '0')) |
(IF(('116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '8', '0')) |
(IF(('369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '16', '0'))
) cure_mask
-- extra <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'PALADIN' caster_class, `classes3` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes3` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'SHADOWKNIGHT' caster_class, `classes5` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes5` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'BARD' caster_class, `classes8` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes8` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` = '1'
-- 6-self, 10-undead, 14-pet, 45-ring
AND `targettype` NOT IN ('6', '10', '14', '45')
AND (
-- 20-blindness, 35-disease, 36-poison, 116-curse, 369-corruption
'20' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '35' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '36' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '116' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '369' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV1', 'GroupV2'),
spell_level DESC,
cure_mask DESC,
FIELD(caster_class, 'CLERIC', 'PALADIN', 'RANGER', 'SHADOWKNIGHT', 'DRUID', 'BARD', 'SHAMAN', 'NECROMANCER', 'BEASTLORD')

View File

@ -1,61 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
CONCAT('"', `teleport_zone`, '"') short_name,
CONCAT('"', IFNULL((SELECT `long_name` FROM `zone` WHERE `short_name` = `teleport_zone` LIMIT 1), 'Unreachable Destination'), '"') long_name
-- extra <end>
FROM (
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `teleport_zone`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '40'
AND (
'83' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '86' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR (
'88' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
AND `teleport_zone` NOT LIKE 'same'
)
)
UNION ALL
SELECT 'WIZARD' caster_class, `classes12` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `teleport_zone`
FROM `spells_new`
WHERE `classes12` NOT IN ('254', '255')
AND `SpellAffectIndex` = '40'
AND (
'83' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '86' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR (
'88' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
AND `teleport_zone` NOT LIKE 'same'
)
)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'GroupV1'),
FIELD(caster_class, 'DRUID', 'WIZARD'),
spell_level,
spell_name

View File

@ -1,45 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '40'
AND '88' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
AND `teleport_zone` LIKE 'same'
UNION ALL
SELECT 'WIZARD' caster_class, `classes12` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes12` NOT IN ('254', '255')
AND `SpellAffectIndex` = '40'
AND '88' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
AND `teleport_zone` LIKE 'same'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'GroupV2'),
FIELD(caster_class, 'DRUID', 'WIZARD'),
spell_level,
spell_name

View File

@ -1,39 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '10'
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '89' -- implementation restricted to `effectid1`
AND `effect_base_value1` > 100 -- implementation restricted to `effect_base_value1`
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single'),
FIELD(caster_class, 'SHAMAN'),
spell_level,
spell_name

View File

@ -1,151 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
CASE
WHEN `effectid1` = '12' THEN 'Living'
WHEN `effectid1` = '13' THEN 'See'
WHEN `effectid1` = '28' THEN 'Undead'
WHEN `effectid1` = '29' THEN 'Animal'
ELSE `effectid1` -- 'UNDEFINED'
END invis_type
-- extra <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'PALADIN' caster_class, `classes3` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes3` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'SHADOWKNIGHT' caster_class, `classes5` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes5` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'WIZARD' caster_class, `classes12` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes12` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes13` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effectid1`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('5', '9')
-- 6-self
AND `targettype` NOT IN ('6')
-- 12-living, 13-see, 28-undead, 29-animal
AND `effectid1` IN ('12', '13', '28', '29') -- implementation restricted to `effectid1`
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(invis_type, 'Animal', 'Undead', 'Living', 'See'),
FIELD(target_type, 'Single', 'GroupV2'),
zone_type,
spell_level DESC,
spell_name,
FIELD(caster_class, 'CLERIC', 'PALADIN', 'RANGER', 'SHADOWKNIGHT', 'DRUID', 'SHAMAN', 'NECROMANCER', 'WIZARD', 'MAGICIAN', 'ENCHANTER', 'BEASTLORD')

View File

@ -1,94 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'WIZARD' caster_class, `classes12` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes12` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '28')
-- 6-self, 43-groupclientandpet
AND `targettype` NOT IN ('6', '43')
AND '57' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV2'),
zone_type,
spell_level DESC,
spell_name,
FIELD(caster_class, 'RANGER', 'DRUID', 'SHAMAN', 'NECROMANCER', 'WIZARD', 'ENCHANTER', 'BEASTLORD')

View File

@ -1,86 +0,0 @@
-- needs criteria refinement
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '8' AND `CastRestriction` = '0' THEN 'AETarget'
WHEN `targettype` = '9' AND `CastRestriction` = '0' THEN 'Animal'
WHEN `targettype` = '10' AND `CastRestriction` = '0' THEN 'Undead'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'PALADIN' caster_class, `classes3` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes3` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'SHADOWKNIGHT' caster_class, `classes5` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes5` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` = '12'
AND '18' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Animal', 'Undead', 'Single', 'AETarget'),
target_type,
zone_type,
FIELD(caster_class, 'CLERIC', 'PALADIN', 'RANGER', 'SHADOWKNIGHT', 'DRUID', 'NECROMANCER', 'ENCHANTER'),
spell_level,
spell_id,
spell_name

View File

@ -1,76 +0,0 @@
-- needs criteria refinement
SELECT
-- base <begin>
CASE
WHEN `targettype` = '4' AND `CastRestriction` = '0' THEN 'AECaster'
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '8' AND `CastRestriction` = '0' THEN 'AETarget'
WHEN `targettype` = '10' AND `CastRestriction` = '0' THEN 'Undead'
WHEN `targettype` = '11' AND `CastRestriction` = '0' THEN 'Summoned'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
`ResistDiff` resist_diff,
`max1` max_target_level
-- extra <end>
FROM (
SELECT 'BARD' caster_class, `classes8` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes8` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('12', '13', '25', '27', '41', '43')
-- 45-ring
AND `targettype` NOT IN ('45')
AND `effectid1` = '31'
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('12', '13', '25', '27', '41', '43')
-- 45-ring
AND `targettype` NOT IN ('45')
AND `effectid1` = '31'
UNION ALL
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes13` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('12', '13', '25', '27', '41', '43')
-- 45-ring
AND `targettype` NOT IN ('45')
AND `effectid1` = '31'
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `ResistDiff`, `max1`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('12', '13', '25', '27', '41', '43')
-- 45-ring
AND `targettype` NOT IN ('45')
AND `effectid1` = '31'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY resist_diff,
FIELD(target_type, 'Undead', 'Summoned', 'Single', 'AECaster', 'AETarget'),
max_target_level DESC,
spell_level DESC,
FIELD(caster_class, 'BARD', 'NECROMANCER', 'MAGICIAN', 'ENCHANTER')

View File

@ -1,74 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
`effect_base_value2` base_speed
-- extra <end>
FROM (
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value2`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('7', '10')
-- 6-self
AND `targettype` NOT IN ('6')
AND `CastRestriction` = '0'
AND `effectdescnum` = '65'
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value2`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('7', '10')
-- 6-self
AND `targettype` NOT IN ('6')
AND `CastRestriction` = '0'
AND `effectdescnum` = '65'
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value2`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('7', '10')
-- 6-self
AND `targettype` NOT IN ('6')
AND `CastRestriction` = '0'
AND `effectdescnum` = '65'
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value2`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('7', '10')
-- 6-self
AND `targettype` NOT IN ('6')
AND `CastRestriction` = '0'
AND `effectdescnum` = '65'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV1', 'GroupV2'),
effect_base_value2 DESC,
spell_level,
FIELD(caster_class, 'RANGER', 'DRUID', 'SHAMAN', 'BEASTLORD')

View File

@ -1,221 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
(
(IF(('46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '1', '0')) |
(IF(('47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '2', '0')) |
(IF(('48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '4', '0')) |
(IF(('49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '8', '0')) |
(IF(('50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '16', '0')) |
(IF(('370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)), '32', '0'))
) resist_type
-- extra <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'PALADIN' caster_class, `classes3` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes3` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'SHADOWKNIGHT' caster_class, `classes5` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes5` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes13` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`,
`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
-- 6-self, 14-pet, 39-groupnopets, 46-targetstarget
AND `targettype` NOT IN ('6', '14', '39', '46')
AND (
'46' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '47' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '48' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '49' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '50' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
OR '370' IN (`effectid1`, `effectid2`, `effectid3`, `effectid4`, `effectid5`, `effectid6`, `effectid7`, `effectid8`, `effectid9`, `effectid10`, `effectid11`, `effectid12`)
)
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV1', 'GroupV2'),
spell_level DESC,
resist_type DESC,
FIELD(caster_class, 'CLERIC', 'PALADIN', 'RANGER', 'SHADOWKNIGHT', 'DRUID', 'SHAMAN', 'NECROMANCER', 'MAGICIAN', 'ENCHANTER', 'BEASTLORD')

View File

@ -1,71 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '4' AND `CastRestriction` = '0' THEN 'AECaster'
WHEN `targettype` = '15' AND `CastRestriction` = '0' THEN 'Corpse'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
`effect_base_value1` percent
-- extra <end>
FROM (
SELECT 'CLERIC' caster_class, `classes2` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value1`
FROM `spells_new`
WHERE `classes2` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('1', '13')
AND `effectid1` = '81'
UNION ALL
SELECT 'PALADIN' caster_class, `classes3` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value1`
FROM `spells_new`
WHERE `classes3` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('1', '13')
AND `effectid1` = '81'
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value1`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('1', '13')
AND `effectid1` = '81'
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value1`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('1', '13')
AND `effectid1` = '81'
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `effect_base_value1`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('1', '13')
AND `effectid1` = '81'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY percent DESC,
FIELD(target_type, 'Corpse', 'AETarget'),
zone_type,
FIELD(caster_class, 'CLERIC', 'PALADIN', 'DRUID', 'SHAMAN', 'NECROMANCER'),
spell_level,
spell_id,
spell_name

View File

@ -1,40 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost,
-- base <end>
-- extra <begin>
`max1` max_absorbtion
-- extra <end>
FROM (
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`, `max1`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` = '2'
AND `effectid1` = '55'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV1', 'GroupV2'),
spell_level DESC,
max1 DESC

View File

@ -1,49 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` = '10'
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '89' -- implementation restricted to `effectid1`
AND `effect_base_value1` < 100 -- implementation restricted to `effect_base_value1`
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` = '10'
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '89' -- implementation restricted to `effectid1`
AND `effect_base_value1` < 100 -- implementation restricted to `effect_base_value1`
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single'),
FIELD(caster_class, 'SHAMAN', 'BEASTLORD'),
spell_level,
spell_name

View File

@ -1,84 +0,0 @@
SELECT
-- base <begin>
CASE
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
ELSE CONCAT(`targettype`, ', ', `CastRestriction`) -- 'UNDEFINED'
END target_type,
CASE
WHEN `zonetype` NOT IN ('-1', '0') THEN `zonetype`
ELSE '0'
END zone_type,
caster_class,
spell_level,
`id` spell_id,
CONCAT('"', `name`, '"') spell_name,
`mana` mana_cost
-- base <end>
FROM (
SELECT 'RANGER' caster_class, `classes4` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes4` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
UNION ALL
SELECT 'DRUID' caster_class, `classes6` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes6` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
UNION ALL
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes10` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
UNION ALL
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes11` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
UNION ALL
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes14` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
UNION ALL
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
`targettype`, `CastRestriction`, `zonetype`, `id`, `name`, `mana`
FROM `spells_new`
WHERE `classes15` NOT IN ('254', '255')
AND `SpellAffectIndex` IN ('2', '14')
-- 6-self
AND `targettype` NOT IN ('6')
AND `effectid1` = '14'
) spells
-- WHERE `name` NOT LIKE '%II'
-- ---
-- WHERE `name` NOT LIKE '%Rk. II%'
-- AND `name` NOT LIKE '%Rk.II%'
-- AND `name` NOT LIKE '%Rk. III%'
-- AND `name` NOT LIKE '%Rk.III%'
ORDER BY FIELD(target_type, 'Single', 'GroupV2'),
spell_level,
spell_name,
FIELD(caster_class, 'RANGER', 'DRUID', 'SHAMAN', 'NECROMANCER', 'ENCHANTER', 'BEASTLORD')