TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

[NPC/FIX] Animal Blood

Open JasperAppec opened this issue 15 years ago • 3 comments

All the creatures which should give Animal Blood on death to the attacker were using EAI and barely any of them worked. Converted them to SAI and added combat AI. Thanks to Kaelima for noticing a very silly mistake. :P

-- Mammoth Calf SAI
SET @ENTRY := 24613;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_TRAMPLE := 15550;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Mammoth Calf - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,3000,9000,9000,18000,11,@SPELL_TRAMPLE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mammoth Calf - In Combat - Cast Trample");

-- Wooly Mammoth SAI
SET @ENTRY := 24614;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_TRAMPLE := 15550;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wooly Mammoth - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,3000,9000,9000,18000,11,@SPELL_TRAMPLE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Wooly Mammoth - In Combat - Cast Trample");

-- Wooly Rhino Bull SAI
SET @ENTRY := 25489;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_RHINO_CHARE := 50500;
SET @SPELL_THICK_HIDE := 50502;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wooly Rhino Bull - On Death - Cast Animal Blood"),
(@ENTRY,0,1,2,4,0,100,0,0,0,0,0,11,@SPELL_RHINO_CHARE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Wooly Rhino Bull - On Aggro - Cast Rhino Charge"),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,11,@SPELL_THICK_HIDE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wooly Rhino Bull - On Aggro - Cast Thick Hide");

-- Carrion Condor SAI
SET @ENTRY := 26174;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_SWOOP := 5708;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Carrion Condor - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,3000,9000,9000,18000,11,@SPELL_SWOOP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Carrion Condor - In Combat - Cast Swoop");

-- Marsh Caribou SAI
SET @ENTRY := 25680;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_GORE := 32019;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Marsh Caribou - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_GORE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Marsh Caribou - In Combat - Cast Gore");

-- Marsh Fawn SAI
SET @ENTRY := 25829;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_GORE := 32019;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Marsh Fawn - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_GORE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Marsh Fawn - In Combat - Cast Gore");

-- Sand Turtle SAI
SET @ENTRY := 25482;
SET @SPELL_ANIMAL_BLOOD := 46221;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Sand Turtle - On Death - Cast Animal Blood");

-- Tundra Wolf SAI
SET @ENTRY := 25675;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_INFECTED_BITE := 7367;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Tundra Wolf - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,3000,9000,9000,18000,11,@SPELL_INFECTED_BITE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Tundra Wolf - In Combat - Cast Infected Bite");

-- Wooly Mammoth Bull SAI
SET @ENTRY := 25743;
SET @SPELL_THUNDERING_ROAR := 46316;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wooly Mammoth Bull - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,0,0,100,0,3000,9000,9000,18000,11,@SPELL_THUNDERING_ROAR,0,0,0,0,0,2,0,0,0,0,0,0,0,"Wooly Mammoth Bull - In Combat - Cast Thundering Roar"); -- It's a fear spell

-- Wooly Rhino Calf SAI
SET @ENTRY := 25488;
SET @SPELL_ANIMAL_BLOOD := 46221;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wooly Rhino Calf - On Death - Cast Animal Blood");

-- Wooly Rhino Matriarch SAI
SET @ENTRY := 25487;
SET @SPELL_ANIMAL_BLOOD := 46221;
SET @SPELL_THICK_HIDE := 50502;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,11,@SPELL_ANIMAL_BLOOD,2,0,0,0,0,7,0,0,0,0,0,0,0,"Wooly Rhino Matriarch - On Death - Cast Animal Blood"),
(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,11,@SPELL_THICK_HIDE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wooly Rhino Matriarch - On Aggro - Cast Thick Hide");

JasperAppec avatar Sep 14 '11 16:09 JasperAppec

Convert from EventAI?

Expecto avatar Sep 15 '11 00:09 Expecto

All the creatures which should give Animal Blood on death to the attacker were using EAI and barely any of them worked. Converted them to SAI and added combat AI. Thanks to Kaelima for noticing a very silly mistake. :P

Yes. :)

JasperAppec avatar Sep 15 '11 05:09 JasperAppec

I am sorry hasn't noticed the comment =)

Expecto avatar Sep 15 '11 09:09 Expecto