Originally Posted by
wanted77
Hi Magebot, here is my simple code for fire mage, its nothing fancy but it does the job. Hope it helps:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SPQR;
using MySPQR;
namespace SPQR.Engine
{
class Mage : Engine.FightModule
{
public override string DisplayName
{
get { return "Burn"; }
}
internal enum Spells : int
{
FrostNova = 122,
Counterspell = 2139,
Combustion = 11129,
IceBarrier = 11426,
Bomb = 125430,
Frostnova = 122,
Blast = 2136,
PyroBlast = 11366,
Combo = 11129,
Fireball = 133,
Scorch = 2948,
Time = 108978,
Evo = 12051,
}
internal enum Auras : int
{
Energy = 116257,
Pyro = 48108,
HeatUp = 48107,
Ignite = 12654,
Pyroblast = 48108,
IceBarrier = 11426,
BombAura = 44457,
}
public override void CombatLogic() //begin rotation
{
var TARGET = MySPQR.Internals.ObjectManager.Target;
var ME = MySPQR.Internals.ObjectManager.WoWLocalPlayer;
if (!ME.HasAurabyId((int)Auras.Energy))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Evo); //Evo for spell buff
if (TARGET.IsCasting) /*Check if the target is casting to interup */
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Counterspell);
if (TARGET.Position.Distance3DFromPlayer < 10)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Frostnova); //Enemy close, freeze them
if(!TARGET.HasAurabyId((int)Auras.BombAura))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Bomb); //Bomb
if (ME.HasAurabyId((int)Auras.HeatUp))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Blast); //Heatup for a pyro
if (ME.HasAurabyId((int)Auras.Pyro))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Time); //Alter Time free pyro
if (ME.HasAurabyId((int)Auras.Pyro))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.PyroBlast); //Instant pyro
if (TARGET.HasAurabyId((int)Auras.Ignite))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Combo); //Combustion on ignite dot
if (!ME.HasAurabyId((int)Auras.IceBarrier))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.IceBarrier); //Shield
//MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Scorch); //PVP
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Fireball); //PVE
}
public override void OnLoad()
{
}
public override void OnClose()
{
}
public override void OnStart()
{
}
public override void OnStop()
{
}
}
}