Trinitycore: DB/Creature: Add scripts to some creatures

Created on 31 Mar 2021  路  2Comments  路  Source: TrinityCore/TrinityCore

-- Harbinger of Horror
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32278;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32278);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(32278, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 11, 18100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Harbinger of Horror - On Aggro - Cast 'Frost Armor (Self)'"),
(32278, 0, 1, 0, 0, 0, 100, 0, 0, 6000, 6000, 10000, 0, 11, 61747, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Harbinger of Horror - In Combat - Cast 'Frostbolt'"),
(32278, 0, 2, 0, 0, 0, 100, 0, 6000, 10000, 16000, 24000, 0, 11, 18099, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Harbinger of Horror - In Combat - Cast 'Chill Nova'"),
(32278, 0, 3, 0, 0, 0, 100, 0, 10000, 20000, 20000, 40000, 0, 11, 12096, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Harbinger of Horror - In Combat - Cast 'Fear'"),
(32278, 0, 4, 0, 9, 0, 100, 0, 12000, 15000, 18000, 25000, 0, 11, 60924, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Harbinger of Horror - In Combat - Cast 'Lich Slap'");

-- Fallen Spiderlord
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31780;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31780);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(31780, 0, 0, 0, 0, 0, 100, 0, 5000, 11000, 10000, 15000, 0, 11, 50284, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Fallen Spiderlord - In Combat - Cast 'Blinding Swarm'"),
(31780, 0, 1, 0, 0, 0, 100, 0, 1000, 2000, 2000, 7000, 0, 11, 60802, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Fallen Spiderlord - In Combat - Cast 'Mandible Crush'");

-- Cruel Overseer
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31853;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31853);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(31853, 0, 0, 0, 0, 0, 100, 0, 8000, 10000, 14000, 18000, 0, 11, 6253, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Cruel Overseer - In Combat - Cast 'Blackhand'"),
(31853, 0, 1, 0, 0, 0, 100, 0, 1000, 2000, 2000, 7000, 0, 11, 49639, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Cruel Overseer - In Combat - Cast 'Crush'");

-- Scourge Death Knight
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32486;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32486);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(32486, 0, 0, 0, 0, 0, 100, 0, 7000, 9000, 9000, 11000, 0, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Scourge Death Knight - In Combat - Cast 'Cleave'"),
(32486, 0, 1, 0, 0, 0, 100, 0, 8000, 10000, 14000, 18000, 0, 11, 22644, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Scourge Death Knight - In Combat - Cast 'Blood Leech'"),
(32486, 0, 2, 0, 0, 0, 100, 0, 16600, 17300, 28500, 34000, 0, 11, 55209, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Scourge Death Knight - In Combat - Cast 'Death Coil'");

-- Glacial Bonelord
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 31754;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31754);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(31754, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 3000, 7000, 0, 11, 39171, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Glacial Bonelord - In Combat - Cast 'Mortal Strike'"),
(31754, 0, 1, 0, 0, 0, 100, 0, 4000, 6000, 10000, 12000, 0, 11, 51878, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Glacial Bonelord - In Combat - Cast 'Ice Slash'");

-- Umbral Brute
UPDATE `smart_scripts` SET `target_type` = 2 WHERE `entryorguid` = 30922 AND `id` = 1;
UPDATE `smart_scripts` SET `action_param1` = 10966 WHERE `entryorguid` = 30922 AND `id` = 2;

-- Ravaged Ghoul
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32502;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32502);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(32502, 0, 0, 0, 0, 0, 100, 0, 0, 0, 15000, 25000, 0, 11, 60873, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Ravaged Ghoul - In Combat - Cast 'Festering Bite'"),
(32502, 0, 1, 0, 0, 0, 100, 0, 0, 0, 9000, 16000, 0, 11, 60872, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Ravaged Ghoul - In Combat - Cast 'Ravenous Claw'");

-- Death Knight Master
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29738;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29738);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29738, 0, 0, 0, 1, 0, 100, 0, 1000, 1000, 1800000, 1800000, 0, 11, 50689, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Death Knight Master - In Combat - Cast 'Blood Presence'"),
(29738, 0, 1, 0, 0, 0, 100, 0, 8500, 8500, 21300, 21300, 0, 11, 50688, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Death Knight Master - In Combat - Cast 'Plague Strike'");

-- Morbid Carcass
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29719;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29719);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29719, 0, 0, 0, 9, 0, 100, 1, 8, 40, 0, 0, 0, 11, 50335, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Morbid Carcass - Within 8-40 Range - Cast 'Scourge Hook'"),
(29719, 0, 1, 0, 0, 0, 100, 0, 0, 0, 7000, 9000, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Morbid Carcass - In Combat - Cast 'Cleave'");

-- Rabid Cannibal
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29722;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 29722);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(29722, 0, 0, 0, 0, 0, 100, 0, 6000, 8000, 12000, 15000, 0, 11, 30639, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, "Rabid Cannibal - In Combat - Cast 'Carnivorous Bite'");

Description:

I tested everything ingame on a normal account with a 3k gearscore Death Knight and everything seems fine .

Branch(es):

3.3.5

TC rev. hash/commit: 80f30d5ca94f

TrinityCore rev. 80f30d5ca94f 2021-03-26 13:26:21 +0100 (3.3.5 branch) (Win64, Release, Static)

Operating system:

Windows 10 x64

Comp-Database Feedback-PatchFix Sub-Creature

Most helpful comment

Auras like Frost Armor always\nearly always are used both out of combat and in combat(in combat creature can re-cast it if aura is not active(dispelled, removed)), recently I started to use On Update event for such spells
Please use AND source_type = 0 in UPDATE queries too
Melee spells nearly always should have initial timers


(29719, 0, 0, 0, 9, 0, 100, 1, 8, 40, 0, 0, 0, 11, 50335, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Morbid Carcass - Within 8-40 Range - Cast 'Scourge Hook'"),

"pull to caster" spells usually are used on timers, core will take care of spell range
Ideally event type Range should be used in 20-30 cases but right now we are far from it

All 2 comments

0c3bbf5c65c02ad701a831563ba3da9c624de43e

Auras like Frost Armor always\nearly always are used both out of combat and in combat(in combat creature can re-cast it if aura is not active(dispelled, removed)), recently I started to use On Update event for such spells
Please use AND source_type = 0 in UPDATE queries too
Melee spells nearly always should have initial timers


(29719, 0, 0, 0, 9, 0, 100, 1, 8, 40, 0, 0, 0, 11, 50335, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Morbid Carcass - Within 8-40 Range - Cast 'Scourge Hook'"),

"pull to caster" spells usually are used on timers, core will take care of spell range
Ideally event type Range should be used in 20-30 cases but right now we are far from it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Blasphemous picture Blasphemous  路  3Comments

Tatara902 picture Tatara902  路  3Comments

Jonne733 picture Jonne733  路  3Comments

Rochet2 picture Rochet2  路  3Comments

Teppic1 picture Teppic1  路  3Comments