// Main Code public partial class PRModule : IPlugin { //my delcares string WhichManaGem; bool UseFireWard; bool UseFrostWard; public enum RoutineStates { CombatPrep, //Speaks for itself Pulling, //Speaks for itself Combat //The actual killing } public enum CombatPrepStates //apparently checking health is not needed { CheckingBuffs, //I'm going to have this here anyway because of waltz's current buff implementation Buffing, //May just make this part of the CheckingBuffs. CheckingManaGem, //Speaks for itself PreCombatWards //I'll implement it if I have to. Do any pre-combat fire/frost wards on fire/frost damage dealers } public enum PullingStates { Advancing, //Get close if the mob wandered out of range for some reason. If it did, your pull range is probably too high Casting //the actual pulling } public enum SingleTargetCombat { Nuking, //our good 'ole spec-optimized nukes. PreFlee, //Mana-shield, snares, etc, while running from mobs SwapToDoubleTargetCombat //Escalate to doubletarget combat if a mob aggros, essentially just start the CC } public enum DoubleTargetCombat { Nuking, //Will be same as singletarget nuking, because it's really the same CrowdControl, //Snare mobs if possible, get away, sheep lower priority mob SwapToMultiTargetCobmat, //Switch to multi target combat if needed, not sure how well it'd work mostly because there's a good chance you'll be lowhp with adds. Flee? PreFlee //same as above } public enum MultiTargetCombat { AoENuking, //Fancy blizzarding, blast waving, etc. should really be a frostie for this... EmergencyCrowdControl, //snares and flares to get away if needed, probably be merged with preflee PreFlee //same as above } public enum BuffStates //kinda like sub-substates for buffing. It'll do my own downtime if I need to. { CheckMana, //..... CheckBuffs, //I repeat, ..... CastBuffs //Spec-optimized buffing. } private RoutineStates CombatPrep() { if (!Requiem.Character.IsInCombat && Requiem.Character.ManaPercent <= 75) { ManaUp(); } } private CombatPrepStates CheckingBuffs() { if (!Requiem.Character.Buff("Arcane Intellect")) { NeedArcInt = true; } if (!Requiem.Character.Buff("Ice Armor") && !Requiem.Character.Buff("Frost Armor") && !Requiem.Character.Buff("Molten Armor")) { NeedArmorSpell = true; // //Here would be where we decide what armor I should use //unfortunately Requiem seems to be missing something for "do I have spell X" // } if (Requiem.Character.TargetList.Unit(0).Mana > 0 || UseFireWard || UseFrostWard) { NeedDampen = true; } } private CombatPrepStates Buffing() { if (NeedArcInt) { Requiem.Character.Cast("Arcane Intellect", Requiem.Character.GUID); } if (NeedArmorSpell) { if (!Requiem.Character.Cast("Molten Armor")) { if (!Requiem.Character.Cast("Ice Armor")) { if (!Requiem.Character.Cast("Frost Armor")) { } } } } if (NeedDampen) { Requiem.Character.Cast("Dampen Magaic", Requiem.Character.GUID); } } private CombatPrepStates CheckingManaGem() { if (!Requiem.Inventory.GetItem("Mana Agate") && !Requiem.Inventory.GetItem("Mana Jade") && !Requiem.Inventory.GetItem("Mana Citrine") && !Requiem.Inventory.GetItem("Mana Ruby") && !Requiem.Inventory.GetItem("Mana Emerald")) { if (!Requiem.Character.Cast("Conjure Mana Emerald")) { if (!Requiem.Character.Cast("Conjure Mana Ruby")) { if (!Requiem.Character.Cast("Conjure Mana Citrine")) { if (!Requiem.Character.Cast("Conjure Mana Jade")) { if (!Requiem.Character.Cast("Conjure Mana Agate")) { } } } } } } } private CombatPrepStates PreCombatWards() { if (UseFireWard) { Requiem.Character.Cast("Fire Ward", Requiem.Character.GUID); } if (UseFrostWard) { Requiem.Character.Cast("Frost Ward", Requiem.Character.GUID); } } private RoutineStates Pulling() { } private RoutineStates Combat() { } private void ManaUp() { if (!Requiem.Inventory.ItemCount(Requiem.Inventory.BestDrink) < 6) { if (Requiem.Character.Cast("Conjure Water")) { } } Requiem.Inventory.Use(Requiem.Inventory.BestDrink); if (Requiem.Character.ManaPercent < 75) { do { } while (Requiem.Character.Buff("Drink").IsValid); } } // This function is called every frame. public void Pulse() { } // This function is executed when the plugin is loaded. public void OnLoad() { } // This function is executed when the plugin is unloaded. public void OnUnload() { } }