TrinityCore/TrinityCore — Issue #4286: 4XX Chief Hawkwind SAI For Quest 24861 "Last Rites, First Rites"
Author: malcrom
Created: 2011-12-12 14:59:46+00:00
State: open

```SQL
-- Chief Hawkwind SAI For Quest 24861 "Last Rites, First Rites" 4XX
SET @ENTRY := 2981; -- NPC entry
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
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,19,0,100,0,24861,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Chief Hawkwind - On Quest 24861 Accept - Run Script'),
(@ENTRY*100,0,0,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Chief Hawkwind - Script - say 0'),
(@ENTRY*100,0,0,0,0,0,100,0,6000,6000,6000,6000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Chief Hawkwind - Script - say 1'),
(@ENTRY*100,0,0,0,0,0,100,0,8000,8000,8000,8000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Chief Hawkwind - Script - say 2'),
(@ENTRY*100,0,0,0,0,0,100,0,7000,7000,7000,7000,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Chief Hawkwind - Script - say 3');
-- NPC talk text insert from sniff
DELETE FROM `creature_text` WHERE `entry` IN (2981) AND `groupid` IN (0,1,2,3);
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(2981,0,0, 'Earth Mother, into your arms we give one of our own. She is Unaya Hawkwind, my mother, and Greatmother to us all; the wisest of our tribe.',12,0,100,1,0,0, 'Chief Hawkwind'), -- 18/11/2011 10:17:56 PM
(2981,0,1, 'May her spirit fly to you swiftly; may the winds carry her gently, and the grass whisper her name.',12,0,100,1,0,0, 'Chief Hawkwind'), -- 18/11/2011 10:18:03 PM
(2981,0,2, 'Watch over her as she has watched over us; let her look down on us with joy, through the eternal gaze of An''she and Mu''sha, until we too join her in death.',12,0,100,1,0,0, 'Chief Hawkwind'), -- 18/11/2011 10:18:11 PM
(2981,0,3, 'For we are all born of you, and shall all return to you.',12,0,100,1,0,0, 'Chief Hawkwind'); -- 18/11/2011 10:18:18 PM
-- Gossip Menu insert from sniff
DELETE FROM `gossip_menu` WHERE `entry`=11006 AND `text_id`=15309;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (11006,15309);
-- Creature Gossip_menu_id Update from sniff
UPDATE `creature_template` SET `gossip_menu_id`=11006 WHERE `entry`=2981;
-- Insert npc_text from sniff
DELETE FROM `npc_text` WHERE `ID` IN (15309);
INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES
(15309,1,'We must not let our grief weaken us. Our people will stand strong against the invaders.','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1);
```