Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Script Generated: 29/06/2011 19:41:15
- // Run this query on your world database
- // UPDATE `creature_template` SET ScriptName='npc_boss_curator' WHERE `entry`=77000;
- #include "ScriptedPch.h"
- struct boss_curatorAI : public ScriptedAI
- {
- boss_curatorAI(Creature *c) : ScriptedAI(c)
- {
- SetCombatMovement(false);
- }
- uint32 spell1_phase1_Timer;
- uint32 spell1_phase2_Timer;
- uint32 phase1_Percent;
- uint32 phase2_Percent;
- uint32 phase;
- bool enraged;
- void EnterCombat(Unit *who)
- {
- }
- void KilledUnit(Unit* victim)
- {
- }
- void JustDied(Unit* Killer)
- {
- }
- void Reset()
- {
- spell1_phase1_Timer = 10000+rand()%5000;
- spell1_phase2_Timer = 10000+rand()%5000;
- phase1_Percent = 100;
- phase2_Percent = 90;
- phase = 0;
- enraged = false;
- }
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
- if ((m_creature->GetHealth() * 100 / m_creature->GetMaxHealth() <= 40) && !enraged)
- {
- enraged = true;
- DoCast(m_creature->getVictim(), 61714);
- m_creature->MonsterYell("hahaha", LANG_UNIVERSAL, NULL);
- }
- if ((m_creature->GetHealth() * 100 / m_creature->GetMaxHealth() <= 100) && phase == 0)
- {
- phase = 1;
- m_creature->MonsterTextEmote("100", NULL, false);
- }
- if ((m_creature->GetHealth() * 100 / m_creature->GetMaxHealth() <= 90) && phase == 1)
- {
- phase = 2;
- m_creature->MonsterYell("90", LANG_UNIVERSAL, NULL);
- }
- if (phase == 1)
- {
- if (spell1_phase1_Timer <= diff)
- {
- DoCast(m_creature->getVictim(), 62632);
- spell1_phase1_Timer = 10000+rand()%5000;
- } else spell1_phase1_Timer -= diff;
- }
- if (phase == 2)
- {
- if (spell1_phase2_Timer <= diff)
- {
- DoCast(m_creature->getVictim(), 7441);
- spell1_phase2_Timer = 10000+rand()%5000;
- } else spell1_phase2_Timer -= diff;
- }
- DoMeleeAttackIfReady();
- }
- };
- CreatureAI* GetAIboss_curator(Creature* pCreature)
- {
- return new boss_curatorAI (pCreature);
- }
- void AddSC_boss_curator()
- {
- Script *newscript;
- newscript = new Script;
- newscript->Name = "npc_boss_curator";
- newscript->GetAI = &GetAIboss_curator;
- newscript->RegisterSelf();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement