mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-07 10:23:53 +00:00
Draft versions of bot command spell scripts (may still be tweaked based on actual command implementation)
This commit is contained in:
parent
3135c92340
commit
6f8600b885
135
utils/scripts/bot_command_spell_scripts/_blank_spells.sql
Normal file
135
utils/scripts/bot_command_spell_scripts/_blank_spells.sql
Normal file
@ -0,0 +1,135 @@
|
||||
SELECT
|
||||
-- base <begin>
|
||||
CASE
|
||||
WHEN `targettype` = '1' AND `CastRestriction` = '0' THEN 'TargetOptional'
|
||||
WHEN `targettype` = '3' AND `CastRestriction` = '0' THEN 'GroupV1'
|
||||
WHEN `targettype` = '4' AND `CastRestriction` = '0' THEN 'AECaster'
|
||||
WHEN `targettype` = '5' AND `CastRestriction` = '0' THEN 'Single'
|
||||
WHEN `targettype` = '5' AND `CastRestriction` = '150' THEN 'Animal'
|
||||
WHEN `targettype` = '6' AND `CastRestriction` = '0' THEN 'Self'
|
||||
WHEN `targettype` = '8' AND `CastRestriction` = '0' THEN 'AETarget'
|
||||
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` = '13' AND `CastRestriction` = '0' THEN 'Tap'
|
||||
WHEN `targettype` = '14' AND `CastRestriction` = '0' THEN 'Pet'
|
||||
WHEN `targettype` = '15' AND `CastRestriction` = '0' THEN 'Corpse'
|
||||
WHEN `targettype` = '16' AND `CastRestriction` = '0' THEN 'Plant'
|
||||
WHEN `targettype` = '17' AND `CastRestriction` = '0' THEN 'Giant'
|
||||
WHEN `targettype` = '18' AND `CastRestriction` = '0' THEN 'Dragon'
|
||||
WHEN `targettype` = '34' AND `CastRestriction` = '0' THEN 'LDoNChest_Cursed'
|
||||
WHEN `targettype` = '38' AND `CastRestriction` = '0' THEN 'SummonedPet'
|
||||
WHEN `targettype` = '39' AND `CastRestriction` = '0' THEN 'GroupNoPets' -- V1 or V2?
|
||||
WHEN `targettype` = '40' AND `CastRestriction` = '0' THEN 'AEBard'
|
||||
WHEN `targettype` = '41' AND `CastRestriction` = '0' THEN 'GroupV2'
|
||||
WHEN `targettype` = '42' AND `CastRestriction` = '0' THEN 'Directional'
|
||||
WHEN `targettype` = '43' AND `CastRestriction` = '0' THEN 'GroupClientAndPet'
|
||||
WHEN `targettype` = '44' AND `CastRestriction` = '0' THEN 'Beam'
|
||||
WHEN `targettype` = '45' AND `CastRestriction` = '0' THEN 'Ring'
|
||||
WHEN `targettype` = '46' AND `CastRestriction` = '0' THEN 'TargetsTarget'
|
||||
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
|
||||
-- base <end>
|
||||
|
||||
FROM (
|
||||
SELECT 'WARRIOR' caster_class, `classes1` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes1` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'CLERIC' caster_class, `classes2` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes2` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'PALADIN' caster_class, `classes3` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes3` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'RANGER' caster_class, `classes4` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes4` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'SHADOWKNIGHT' caster_class, `classes5` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes5` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'DRUID' caster_class, `classes6` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes6` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'MONK' caster_class, `classes7` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes7` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'BARD' caster_class, `classes8` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes8` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'ROGUE' caster_class, `classes9` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes9` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'SHAMAN' caster_class, `classes10` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes10` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'NECROMANCER' caster_class, `classes11` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes11` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'WIZARD' caster_class, `classes12` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes12` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'MAGICIAN' caster_class, `classes13` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes13` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'ENCHANTER' caster_class, `classes14` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes14` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'BEASTLORD' caster_class, `classes15` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes15` NOT IN ('254', '255')
|
||||
UNION ALL
|
||||
SELECT 'BERSERKER' caster_class, `classes16` spell_level,
|
||||
`spells_new`.*
|
||||
FROM `spells_new`
|
||||
WHERE `classes16` NOT IN ('254', '255')
|
||||
) 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', 'Summoned', 'Pet', 'Plant', 'TargetsTarget', 'Single', 'Self', 'GroupV1', 'GroupV2', 'GroupNoPets', 'AECaster', 'AETarget', 'Corpse'),
|
||||
zone_type,
|
||||
FIELD(caster_class, 'WARRIOR', 'CLERIC', 'PALADIN', 'RANGER', 'SHADOWKNIGHT', 'DRUID', 'MONK', 'BARD', 'ROGUE', 'SHAMAN', 'NECROMANCER', 'WIZARD', 'MAGICIAN', 'ENCHANTER', 'BEASTLORD', 'BERSERKER'),
|
||||
spell_level,
|
||||
spell_id,
|
||||
spell_name
|
||||
@ -0,0 +1,78 @@
|
||||
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')
|
||||
73
utils/scripts/bot_command_spell_scripts/charm_spells.sql
Normal file
73
utils/scripts/bot_command_spell_scripts/charm_spells.sql
Normal file
@ -0,0 +1,73 @@
|
||||
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')
|
||||
193
utils/scripts/bot_command_spell_scripts/cure_spells.sql
Normal file
193
utils/scripts/bot_command_spell_scripts/cure_spells.sql
Normal file
@ -0,0 +1,193 @@
|
||||
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')
|
||||
61
utils/scripts/bot_command_spell_scripts/depart_spells.sql
Normal file
61
utils/scripts/bot_command_spell_scripts/depart_spells.sql
Normal file
@ -0,0 +1,61 @@
|
||||
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
|
||||
45
utils/scripts/bot_command_spell_scripts/escape_spells.sql
Normal file
45
utils/scripts/bot_command_spell_scripts/escape_spells.sql
Normal file
@ -0,0 +1,45 @@
|
||||
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
|
||||
39
utils/scripts/bot_command_spell_scripts/grow_spells.sql
Normal file
39
utils/scripts/bot_command_spell_scripts/grow_spells.sql
Normal file
@ -0,0 +1,39 @@
|
||||
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
|
||||
151
utils/scripts/bot_command_spell_scripts/invisibility_spells.sql
Normal file
151
utils/scripts/bot_command_spell_scripts/invisibility_spells.sql
Normal file
@ -0,0 +1,151 @@
|
||||
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')
|
||||
@ -0,0 +1,94 @@
|
||||
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')
|
||||
86
utils/scripts/bot_command_spell_scripts/lull_spells.sql
Normal file
86
utils/scripts/bot_command_spell_scripts/lull_spells.sql
Normal file
@ -0,0 +1,86 @@
|
||||
-- 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
|
||||
76
utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql
Normal file
76
utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql
Normal file
@ -0,0 +1,76 @@
|
||||
-- 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')
|
||||
@ -0,0 +1,74 @@
|
||||
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')
|
||||
221
utils/scripts/bot_command_spell_scripts/resistance_spells.sql
Normal file
221
utils/scripts/bot_command_spell_scripts/resistance_spells.sql
Normal file
@ -0,0 +1,221 @@
|
||||
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')
|
||||
71
utils/scripts/bot_command_spell_scripts/resurrect_spells.sql
Normal file
71
utils/scripts/bot_command_spell_scripts/resurrect_spells.sql
Normal file
@ -0,0 +1,71 @@
|
||||
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
|
||||
40
utils/scripts/bot_command_spell_scripts/rune_spells.sql
Normal file
40
utils/scripts/bot_command_spell_scripts/rune_spells.sql
Normal file
@ -0,0 +1,40 @@
|
||||
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
|
||||
49
utils/scripts/bot_command_spell_scripts/shrink_spells.sql
Normal file
49
utils/scripts/bot_command_spell_scripts/shrink_spells.sql
Normal file
@ -0,0 +1,49 @@
|
||||
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
|
||||
@ -0,0 +1,84 @@
|
||||
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')
|
||||
Loading…
x
Reference in New Issue
Block a user