Skip to content

Instantly share code, notes, and snippets.

@Dominent
Last active December 14, 2015 07:09
Show Gist options
  • Save Dominent/5048287 to your computer and use it in GitHub Desktop.
Save Dominent/5048287 to your computer and use it in GitHub Desktop.
/***********************************************,
* Creator: Dominent for ac - web
* Creature: Taragaman the Hungerer
* Made because: Eductional purposes.
* A big thanks for: QQrofl, Rochet2, Jameyboor and all other ac webers who helped me and are helping me atm. *
************************************************'
*/
#include "ScriptPCH.h"
enum spells
{
SPELL_FIRE_NOVA = 11970,
SPELL_UPPERCUT = 18072
};
class boss_taragaman_the_hungerer: public CreatureScript
{
public:
boss_taragaman_the_hungerer() : CreatureScript("boss_taragaman_the_hungerer"){}
CreatureAI* GetAI_example(Creature* pCreature) const
{
return new boss_taragaman_the_hungererAI(pCreature);
}
struct boss_taragaman_the_hungererAI : public ScriptedAI
{
boss_taragaman_the_hungererAI(Creature *c) : ScriptedAI(c) {}
uint32 Fire_Nova_Timer;
uint32 Uppercut_Timer;
void Reset()
{
if(!me-> isInCombat()
}
{
Fire_Nova_Timer = urand(8000, 25000);
Uppercut_Timer = urand(5000, 20000);
}
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
if (Fire_Nova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_Fire_Nova);
}
else
Fire_Nova_Timer -= diff;
if (Uppercut_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_Uppercut);
}
else
Uppercut_Timer -= diff;
DoMeleeAttackIfReady();
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment