From 6f8600b885a1c740eff18377e0e02af244d9b859 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 30 Nov 2015 20:16:21 -0500 Subject: [PATCH] Draft versions of bot command spell scripts (may still be tweaked based on actual command implementation) --- .../_blank_spells.sql | 135 +++++++++++ .../bind_affinity_spells.sql | 78 +++++++ .../charm_spells.sql | 73 ++++++ .../bot_command_spell_scripts/cure_spells.sql | 193 +++++++++++++++ .../depart_spells.sql | 61 +++++ .../escape_spells.sql | 45 ++++ .../bot_command_spell_scripts/grow_spells.sql | 39 ++++ .../invisibility_spells.sql | 151 ++++++++++++ .../levitation_spells.sql | 94 ++++++++ .../bot_command_spell_scripts/lull_spells.sql | 86 +++++++ .../mesmerize_spells.sql | 76 ++++++ .../movement_speed_spells.sql | 74 ++++++ .../resistance_spells.sql | 221 ++++++++++++++++++ .../resurrect_spells.sql | 71 ++++++ .../bot_command_spell_scripts/rune_spells.sql | 40 ++++ .../shrink_spells.sql | 49 ++++ .../water_breathing_spells.sql | 84 +++++++ 17 files changed, 1570 insertions(+) create mode 100644 utils/scripts/bot_command_spell_scripts/_blank_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/bind_affinity_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/charm_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/cure_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/depart_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/escape_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/grow_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/invisibility_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/levitation_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/lull_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/movement_speed_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/resistance_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/resurrect_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/rune_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/shrink_spells.sql create mode 100644 utils/scripts/bot_command_spell_scripts/water_breathing_spells.sql diff --git a/utils/scripts/bot_command_spell_scripts/_blank_spells.sql b/utils/scripts/bot_command_spell_scripts/_blank_spells.sql new file mode 100644 index 000000000..2250c7fa4 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/_blank_spells.sql @@ -0,0 +1,135 @@ +SELECT +-- base + 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 + +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 diff --git a/utils/scripts/bot_command_spell_scripts/bind_affinity_spells.sql b/utils/scripts/bot_command_spell_scripts/bind_affinity_spells.sql new file mode 100644 index 000000000..a48b3318b --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/bind_affinity_spells.sql @@ -0,0 +1,78 @@ +SELECT +-- base + 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 + +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') diff --git a/utils/scripts/bot_command_spell_scripts/charm_spells.sql b/utils/scripts/bot_command_spell_scripts/charm_spells.sql new file mode 100644 index 000000000..f2c5e82b8 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/charm_spells.sql @@ -0,0 +1,73 @@ +SELECT +-- base + 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 +-- extra + `ResistDiff` resist_diff, + `max1` max_target_level +-- extra + +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') diff --git a/utils/scripts/bot_command_spell_scripts/cure_spells.sql b/utils/scripts/bot_command_spell_scripts/cure_spells.sql new file mode 100644 index 000000000..75ef1d25c --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/cure_spells.sql @@ -0,0 +1,193 @@ +SELECT +-- base + 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 +-- extra + ( + (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 + +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') diff --git a/utils/scripts/bot_command_spell_scripts/depart_spells.sql b/utils/scripts/bot_command_spell_scripts/depart_spells.sql new file mode 100644 index 000000000..205ba27f1 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/depart_spells.sql @@ -0,0 +1,61 @@ +SELECT +-- base + 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 +-- extra + CONCAT('"', `teleport_zone`, '"') short_name, + CONCAT('"', IFNULL((SELECT `long_name` FROM `zone` WHERE `short_name` = `teleport_zone` LIMIT 1), 'Unreachable Destination'), '"') long_name +-- extra + +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 diff --git a/utils/scripts/bot_command_spell_scripts/escape_spells.sql b/utils/scripts/bot_command_spell_scripts/escape_spells.sql new file mode 100644 index 000000000..4e08ddeb0 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/escape_spells.sql @@ -0,0 +1,45 @@ +SELECT +-- base + 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 + +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 diff --git a/utils/scripts/bot_command_spell_scripts/grow_spells.sql b/utils/scripts/bot_command_spell_scripts/grow_spells.sql new file mode 100644 index 000000000..4dbca1a06 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/grow_spells.sql @@ -0,0 +1,39 @@ +SELECT +-- base + 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 + +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 diff --git a/utils/scripts/bot_command_spell_scripts/invisibility_spells.sql b/utils/scripts/bot_command_spell_scripts/invisibility_spells.sql new file mode 100644 index 000000000..8545cab30 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/invisibility_spells.sql @@ -0,0 +1,151 @@ +SELECT +-- base + 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 +-- extra + 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 + +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') diff --git a/utils/scripts/bot_command_spell_scripts/levitation_spells.sql b/utils/scripts/bot_command_spell_scripts/levitation_spells.sql new file mode 100644 index 000000000..2193c75b7 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/levitation_spells.sql @@ -0,0 +1,94 @@ +SELECT +-- base + 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 + +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') diff --git a/utils/scripts/bot_command_spell_scripts/lull_spells.sql b/utils/scripts/bot_command_spell_scripts/lull_spells.sql new file mode 100644 index 000000000..2d0989b85 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/lull_spells.sql @@ -0,0 +1,86 @@ +-- needs criteria refinement + +SELECT +-- base + 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 + +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 diff --git a/utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql b/utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql new file mode 100644 index 000000000..a23d62af6 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/mesmerize_spells.sql @@ -0,0 +1,76 @@ +-- needs criteria refinement + +SELECT +-- base + 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 +-- extra + `ResistDiff` resist_diff, + `max1` max_target_level +-- extra + +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') diff --git a/utils/scripts/bot_command_spell_scripts/movement_speed_spells.sql b/utils/scripts/bot_command_spell_scripts/movement_speed_spells.sql new file mode 100644 index 000000000..aaabf2fa2 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/movement_speed_spells.sql @@ -0,0 +1,74 @@ +SELECT +-- base + 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 +-- extra + `effect_base_value2` base_speed +-- extra + +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') diff --git a/utils/scripts/bot_command_spell_scripts/resistance_spells.sql b/utils/scripts/bot_command_spell_scripts/resistance_spells.sql new file mode 100644 index 000000000..0cda671e7 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/resistance_spells.sql @@ -0,0 +1,221 @@ +SELECT +-- base + 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 +-- extra + ( + (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 + +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') diff --git a/utils/scripts/bot_command_spell_scripts/resurrect_spells.sql b/utils/scripts/bot_command_spell_scripts/resurrect_spells.sql new file mode 100644 index 000000000..ac5903727 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/resurrect_spells.sql @@ -0,0 +1,71 @@ +SELECT +-- base + 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 +-- extra + `effect_base_value1` percent +-- extra + +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 diff --git a/utils/scripts/bot_command_spell_scripts/rune_spells.sql b/utils/scripts/bot_command_spell_scripts/rune_spells.sql new file mode 100644 index 000000000..30ebee130 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/rune_spells.sql @@ -0,0 +1,40 @@ +SELECT +-- base + 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 +-- extra + `max1` max_absorbtion +-- extra + +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 diff --git a/utils/scripts/bot_command_spell_scripts/shrink_spells.sql b/utils/scripts/bot_command_spell_scripts/shrink_spells.sql new file mode 100644 index 000000000..26ee84883 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/shrink_spells.sql @@ -0,0 +1,49 @@ +SELECT +-- base + 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 + +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 diff --git a/utils/scripts/bot_command_spell_scripts/water_breathing_spells.sql b/utils/scripts/bot_command_spell_scripts/water_breathing_spells.sql new file mode 100644 index 000000000..b6f815429 --- /dev/null +++ b/utils/scripts/bot_command_spell_scripts/water_breathing_spells.sql @@ -0,0 +1,84 @@ +SELECT +-- base + 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 + +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')