Skip to content

Instantly share code, notes, and snippets.

@FALL1N1
Created September 22, 2012 14:27
Show Gist options
  • Save FALL1N1/3766320 to your computer and use it in GitHub Desktop.
Save FALL1N1/3766320 to your computer and use it in GitHub Desktop.
blabla
-- Fix [Q]{A/H} Conjurer Luminrath ID: 10306
SET @Luminrath := 19580; -- The required npc to be summoned to thank the player, give credit and despawn /without cape/
SET @Capeless := 19544; -- The combat version
-- SET @Mantle := 34142; -- The required spell that triggers the event below to summon the npc to give credit, just for info
SET @Credit := 19548;
SET @Event := 12609;
-- Remove the required spell since it is supposed to send a event and cannot be casted on target, this is the reason it bugged all everything /core issue/, I remove it and in order to obtain the credit this spell needs to be cast anyway, so it is a proper* hack fix, if you think about it.
UPDATE `quest_template` SET `RequiredSpellCast1`=0 WHERE `Id`=10306;
-- Makes the specific spell that already have the call event defined summon Luminrath
DELETE FROM `event_scripts` WHERE `id`=@Event;
INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`x`,`y`,`z`,`o`) VALUES
(@Event,0,10,@Luminrath,25000,2192.744873,2340.836182,90.353905,4.682819);
-- Add SAI for Luminrath /with cape/
UPDATE `creature_template` SET `maxlevel`=68,`minlevel`=68,`unit_class`=2,`AIName`= 'SmartAI' WHERE `entry`= @Luminrath;
DELETE FROM `creature_ai_scripts` WHERE creature_id = @Luminrath;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Luminrath;
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
(@Luminrath,0,0,1,54,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - On creature summoned - Switch /set/ faction'),
(@Luminrath,0,1,2,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - Linked with event 0 - Say text 0'),
(@Luminrath,0,2,3,61,0,100,0,0,0,0,0,1,1,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - Linked with event 1 - Say text 1'),
(@Luminrath,0,3,0,61,0,100,0,0,0,0,0,33,@Credit,0,0,0,0,0,21,20,0,0,0,0,0,0,'Conjurer Luminrath - Linked with event 2 - Call credit to player');
-- Add SAI for Luminrath /without cape/
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= @Capeless;
DELETE FROM `creature_ai_scripts` WHERE creature_id = @Capeless;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Capeless;
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
(@Capeless,0,0,0,0,0,100,0,0,2500,1000,7500,11,9532,0,0,0,0,0,2,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Lightening bolt'),
(@Capeless,0,1,0,0,0,100,0,0,5000,15000,30000,11,36110,0,0,0,0,0,2,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Summon Dancing Swords'),
(@Capeless,0,2,0,0,0,100,0,0,10000,5000,15000,11,36109,0,0,0,0,0,1,0,0,0,0,0,0,0,'Conjurer Luminrath - IC - Cast Blink');
-- Luminrath's text
DELETE FROM `creature_text` WHERE `entry`=@Luminrath;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@Luminrath,0,0,'I can\'t possibly go out without my cloak. I hope it\'s in here...',12,0,100,1,0,0,'Luminrath gratitude'),
(@Luminrath,1,0,'There it is! I could\'ve sworn it wasn\'t here last time I checked...',12,0,100,1,0,0,'Luminrath gratitude');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment