I've been using the bot for a few hours now and I really like it, but I don't know how to write my own class and would be grateful if someone would make me a rotation for a frost mage.
This is what I have, just modified a little of what I could think of.
Code:
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 "Mage"; } //This is the name displayed in SPQR's Class selection DropdownList
}
internal enum Spells : int //This is a convenient list of all spells used by our combat routine
{ //you can have search on wowhead.com for spell name, and get the id in url
FrostfireBolt = 44614,
FrostNova = 122,
FireBlast = 2136,
Polymorph = 118,
Counterspell = 2139,
IceLance = 30455,
ColdSnap = 11958,
Frostjaw = 102051,
IncantersWard = 1463,
MirrorImage = 55342,
ArcanePower = 12042,
IcyVeins = 12472,
Combustion = 11129,
TemporalShield = 115610,
IceBarrier = 11426,
Magebomb = 125430,
PyroBlast = 11366,
InfernoBlast = 108853,
ArcaneBarrage = 44425,
ArcaneMissiles = 5143,
ArcaneBlast = 30451, //
FrostBolt = 116, //
Fireball = 133, //
Evocation = 12051,
}
internal enum Auras : int //This is another convenient list of Auras used in our combat routine
{ //you can have those in wowhead.com (again) and get the id in url
MoltenArmor = 30482,
FrostArmor = 7302,
ArcaneCharge = 36032,
Pyroblast = 48108,
BrainFreeze = 57761,
FingerOfFrost = 44544,
Polymorph = 118,
Frozen = 122,
IceBarrier = 11426,
LivingBomb = 44457,
}
public override void CombatLogic() //This is the DPS / healing coutine, called in loop by SPQR all code here is executed
{
var TARGET = MySPQR.Internals.ObjectManager.Target;
var ME = MySPQR.Internals.ObjectManager.WoWLocalPlayer;
if (TARGET.IsCasting)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Counterspell);
if(ME.HealthPercent < 80)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.IncantersWard);
if (ME.ManaPercent > 50 && TARGET.HealthPercent > 85)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ArcanePower);
if (TARGET.Position.Distance3DFromPlayer < 7)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.FrostNova);
if(ME.HealthPercent <= 60)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.IcyVeins);
if(ME.ManaPercent <= 20)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Evocation);
if(TARGET.HealthPercent >= 75)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Combustion);
if(ME.HealthPercent <= 75)
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.TemporalShield);
if (!ME.HasAurabyId((int)Auras.IceBarrier))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.IceBarrier);
if(!TARGET.HasAurabyId((int)Auras.LivingBomb))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.Magebomb);
if (TARGET.HasAurabyId((int)Auras.Frozen) || ME.HasAurabyId((int)Auras.FingerOfFrost ))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.IceLance);
if(ME.HasAurabyId((int)Auras.BrainFreeze ))
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.FrostfireBolt);
foreach (var aura in ME.AuraList)
{
if (aura.Id == (int)Auras.ArcaneCharge && aura.StackCount > 4)
{
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ArcaneBarrage);
}
}
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.ArcaneBlast);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.FrostBolt);
MySPQR.Internals.ActionBar.CastSpellById((int)Spells.FrostfireBolt);
}
public override void OnLoad() //This is called when the Customclass is loaded in SPQR
{
//Do some stuff like loading settings, display Hello in the SPQR Log...
}
public override void OnClose() //This is called when the Customclass is unloaded in SPQR
{
//Do some stuff like saving settings, display goodbye in SPQR log...
}
public override void OnStart() //This is called once, when you hit CTRL+X to start SPQR combat routine
{
}
public override void OnStop() //This is called once, when you hit CTRL+X to stop SPQR combat routine
{
}
}
}