Advertisement
Rochet2

Untitled

Dec 8th, 2011
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "ScriptPCH.h"
  2.  
  3. #define SPELL_RENEGADE_STRENGTH                     91010
  4. #define SPELL_EMPOWERS_THE_CASTER_WITH_DARK_MIGHT   70674
  5.  
  6.  
  7. class Boss_npc : public CreatureScript
  8. {
  9.     public:
  10.     Boss_npc() : CreatureScript("Immortal_dude") {}
  11.  
  12.     struct Immortal_dudeAI : public ScriptedAI
  13.     {
  14.         Immortal_dudeAI(Creature * pCreature) : ScriptedAI(pCreature)
  15.         {}
  16.  
  17.         uint32 FrostTimer;
  18.  
  19.         void Reset()
  20.         {
  21.             FrostTimer = 10000;
  22.         }
  23.  
  24.         void UpdateAI(const uint32 diff)
  25.         {
  26.             if(FrostTimer <= diff)
  27.             {
  28.                 DoCast(me, SPELL_RENEGADE_STRENGTH, true);
  29.                 DoCast(me, SPELL_EMPOWERS_THE_CASTER_WITH_DARK_MIGHT, true);
  30.                 // FrostTimer = 10000; // Want to repeat?
  31.             }  
  32.             else
  33.                 FrostTimer -= diff;
  34.  
  35.             DoMeleeAttackIfReady();
  36.         }
  37.  
  38.         void OnEnterCombat(Unit* who)
  39.         {
  40.             me->MonsterSay("Die Mortals!", LANG_UNIVERSAL, me->GetGUID());
  41.         }
  42.        
  43.         void OnKilledTarget(Unit* who)
  44.         {      
  45.             DoCast(me, SPELL_RENEGADE_STRENGTH, true);
  46.             DoCast(me, SPELL_EMPOWERS_THE_CASTER_WITH_DARK_MIGHT, true);
  47.         }
  48.  
  49.         void OnDied(Unit* Killer)
  50.         {
  51.                 me->MonsterSay("I will return...", LANG_UNIVERSAL, me->GetGUID());
  52.         }
  53.     };
  54. };
  55.  
  56. void AddSC_Boss_npc()
  57. {
  58.     new Boss_npc;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement