Advertisement
WIXXZI

Fun & Games fix

Mar 3rd, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. SET @TheOcular := 29747;
  2. SET @Script := @TheOcular * 100;
  3. SET @OcularShell := 29790;
  4. SET @CreditSpell := 55288;
  5. SET @DeathlyStare := 55269;
  6. SET @Transform := 55162;
  7. SET @Detection := 18950;
  8.  
  9. -- Update templates to prevent falling
  10. UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=@TheOcular;
  11. UPDATE `creature_template` SET `InhabitType`=4,`unit_flags`=unit_flags|0x00000200|0x02000000 WHERE `entry`=@OcularShell; -- the movement disable flag should be replaced by movement flag root when it gets supported by SAI or if it does
  12.  
  13. -- Add SAI support for The Ocular
  14. DELETE FROM `smart_scripts` WHERE `entryorguid`=@TheOcular AND `source_type`=0;
  15. DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script AND `source_type`=9;
  16. 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
  17. (@TheOcular,0,0,1,25,0,100,1,0,0,0,0,75,@Transform,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - On spawn/reset - Add aura transform'),
  18. (@TheOcular,0,1,0,61,0,100,1,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - Linked with previous event - Set root state on'),
  19. (@TheOcular,0,2,0,25,0,100,0,0,0,0,0,8,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - On spawn/reset - Set react state defensive'),
  20. (@TheOcular,0,3,4,8,0,100,1,30740,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - On hit by item spell - Set react state aggressive (once per reset)'),
  21. (@TheOcular,0,4,0,61,0,100,0,0,0,0,0,11,55269,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ocular - Linked with previous event - Cast spell on invoker to set in combat'),
  22. (@TheOcular,0,5,0,0,0,100,0,1500,1500,4000,5000,11,55269,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ocular - IC - Cast Deathly Stare every 3 secs'),
  23. (@TheOcular,0,6,7,6,0,100,0,0,0,0,0,11,@CreditSpell,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - On death - Cast The Ocular On Death'),
  24. (@TheOcular,0,7,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - Linked with previous event - Start actionlsit'),
  25. (@Script,9,0,0,0,0,100,0,2000,2000,0,0,47,0,0,0,0,0,0,10,152166,@OcularShell,0,0,0,0,0,'Ocular - Action 0 - Set unseen on shell'),
  26. (@Script,9,1,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - Action 1 - Set unseen on self'),
  27. (@Script,9,2,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,10,152166,@OcularShell,0,0,0,0,0,'Ocular - Action 2 - Despawn shell'),
  28. (@Script,9,3,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ocular - Action 3 - Despawn self');
  29.  
  30. -- Creature_template_addon data
  31. DELETE FROM `creature_template_addon` WHERE `entry` IN (@TheOcular,@OcularShell);
  32. INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
  33. (@TheOcular,0,0,0,1,0, '18950'),
  34. (@OcularShell,0,0,0,1,0, '18950');
  35.  
  36. -- Conditions
  37. DELETE FROM `conditions` WHERE `SourceEntry`=@CreditSpell AND `SourceTypeOrReferenceId`=13;
  38. INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
  39. (13,1,@CreditSpell,0,1,32,0,144,0,0,0,0,'', 'Death of Ocular can hit only players'),
  40. (13,1,@CreditSpell,0,1,9,0,12892,0,0,0,0,'', 'It''s all fun and games (H) must be taken'),
  41. (13,1,@CreditSpell,0,1,28,0,12892,0,0,1,0,'', 'It''s all fun and games (H) must not have objectives completed'),
  42. (13,1,@CreditSpell,0,2,32,0,144,0,0,0,0,'', 'Death of Ocular can hit only players'),
  43. (13,1,@CreditSpell,0,2,9,0,12887,0,0,0,0,'', 'It''s all fun and games (A) must be taken'),
  44. (13,1,@CreditSpell,0,2,28,0,12887,0,0,1,0,'', 'It''s all fun and games (A) must not have objectives completed');
  45.  
  46. -- Insert spell_script names
  47. DELETE FROM `spell_script_names` WHERE `spell_id`=@CreditSpell;
  48. INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
  49. (@CreditSpell, 'spell_q12892_12887_ocular_death');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement