Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * CustomClass for TheNoobBot
- * Credit : Rival, Geesus, Enelya, Marstor, Vesper, Neo2003
- * Thanks you !
- */
- using System;
- using System.IO;
- using System.Threading;
- using System.Windows.Forms;
- using nManager.Helpful;
- using nManager.Wow.Class;
- using nManager.Wow.Enums;
- using nManager.Wow.Helpers;
- using nManager.Wow.ObjectManager;
- using Keybindings = nManager.Wow.Enums.Keybindings;
- using Timer = nManager.Helpful.Timer;
- public class Main : ICustomClass
- {
- internal static float range = 3.5f;
- internal static bool loop = true;
- public float Range
- {
- get { return range; }
- set { range = value; }
- }
- public void Initialize()
- {
- try
- {
- Logging.WriteFight("Loading combat system.");
- switch (ObjectManager.Me.WowClass)
- {
- #region Paladin Specialisation checking
- case WoWClass.Paladin:
- var Retribution_Spell = new Spell("Templar's Verdict");
- var Protection_Spell = new Spell("Avenger's Shield");
- var Holy_Spell = new Spell("Holy Shock");
- if (Retribution_Spell.KnownSpell)
- {
- Logging.WriteFight("Loading Paladin Retribution class...");
- new Paladin_Retribution();
- break;
- }
- else if (Protection_Spell.KnownSpell)
- {
- Logging.WriteFight("Loading Paladin Protection class...");
- new Paladin_Protection();
- break;
- }
- else if (Holy_Spell.KnownSpell)
- {
- Logging.WriteFight("Loading Paladin Holy class...");
- new Paladin_Holy();
- break;
- }
- else
- {
- Logging.WriteFight("No specialisation detected.");
- Logging.WriteFight("Loading Paladin Retribution class...");
- new Paladin_Retribution();
- break;
- }
- #endregion
- default:
- Dispose();
- break;
- }
- }
- catch { }
- Logging.WriteFight("Combat system stopped.");
- }
- public void Dispose()
- {
- Logging.WriteFight("Combat system stopped.");
- loop = false;
- }
- public void ShowConfiguration()
- {
- Directory.CreateDirectory(Application.StartupPath + "\\CustomClasses\\Settings\\");
- switch (ObjectManager.Me.WowClass)
- {
- #region Paladin Specialisation checking
- case WoWClass.Paladin:
- var Retribution_Spell = new Spell("Templar's Verdict");
- var Protection_Spell = new Spell("Avenger's Shield");
- var Holy_Spell = new Spell("Holy Shock");
- if (Retribution_Spell.KnownSpell)
- {
- string CurrentSettingsFile = Application.StartupPath + "\\CustomClasses\\Settings\\Paladin_Retribution.xml";
- Paladin_Retribution.PaladinRetributionSettings CurrentSetting;
- CurrentSetting = new Paladin_Retribution.PaladinRetributionSettings();
- if (System.IO.File.Exists(CurrentSettingsFile))
- {
- CurrentSetting = Settings.Load<Paladin_Retribution.PaladinRetributionSettings>(CurrentSettingsFile);
- }
- CurrentSetting.ToForm();
- CurrentSetting.Save(CurrentSettingsFile);
- }
- else if (Holy_Spell.KnownSpell)
- {
- string CurrentSettingsFile = Application.StartupPath + "\\CustomClasses\\Settings\\Paladin_Holy.xml";
- Paladin_Holy.PaladinHolySettings CurrentSetting;
- CurrentSetting = new Paladin_Holy.PaladinHolySettings();
- if (System.IO.File.Exists(CurrentSettingsFile))
- {
- CurrentSetting = Settings.Load<Paladin_Holy.PaladinHolySettings>(CurrentSettingsFile);
- }
- CurrentSetting.ToForm();
- CurrentSetting.Save(CurrentSettingsFile);
- }
- else
- {
- System.Windows.Forms.MessageBox.Show("Your specification haven't be found, loading Paladin Retribution Settings");
- string CurrentSettingsFile = Application.StartupPath + "\\CustomClasses\\Settings\\Paladin_Retribution.xml";
- Paladin_Retribution.PaladinRetributionSettings CurrentSetting;
- CurrentSetting = new Paladin_Retribution.PaladinRetributionSettings();
- if (System.IO.File.Exists(CurrentSettingsFile))
- {
- CurrentSetting = Settings.Load<Paladin_Retribution.PaladinRetributionSettings>(CurrentSettingsFile);
- }
- CurrentSetting.ToForm();
- CurrentSetting.Save(CurrentSettingsFile);
- }
- break;
- #endregion
- }
- }
- }
- #region Paladin
- public class Paladin_Holy
- {
- [Serializable]
- public class PaladinHolySettings : nManager.Helpful.Settings
- {
- public bool UseDivineProtection = true;
- public PaladinHolySettings()
- {
- ConfigWinForm(new System.Drawing.Point(400, 400), "Paladin Holy Settings");
- AddControlInWinForm("Use Divine Protection", "UseDivineProtection", "Protection Cycle");
- }
- }
- #region Professions & Racial
- private readonly Spell Arcane_Torrent = new Spell("Arcane Torrent");
- private readonly Spell Lifeblood = new Spell("Lifeblood");
- private readonly Spell Stoneform = new Spell("Stoneform");
- private readonly Spell Tailoring = new Spell("Tailoring");
- private readonly Spell Leatherworking = new Spell("Leatherworking");
- private readonly Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- private readonly Spell War_Stomp = new Spell("War Stomp");
- private readonly Spell Berserking = new Spell("Berserking");
- #endregion
- #region Paladin Seals & Buffs
- private readonly Spell SealOfTheRighteousness = new Spell("Seal of Righteousness");
- private readonly Spell SealOfTruth = new Spell("Seal of Truth");
- private readonly Spell SealOfInsight = new Spell("Seal of Insight");
- private readonly Spell SealOfJustice = new Spell("Seal of Justice");
- private readonly Spell BlessingOfKings = new Spell("Blessing of Kings");
- #endregion
- #region Offensive Spell
- private readonly Spell HammerOfJustice = new Spell("Hammer of Justice");
- private readonly Spell HammerOfWrath = new Spell("Hammer of Wrath");
- private readonly Spell HolyShock = new Spell("Holy Shock");
- private readonly Spell Denounce = new Spell("Denounce");
- #endregion
- #region Offensive Cooldown
- private readonly Spell HolyAvenger = new Spell("HolyAvenger");
- private readonly Spell AvengingWrath = new Spell("Avenging Wrath");
- private readonly Spell DivineFavor = new Spell("Divine Favor");
- #endregion
- #region Defensive Cooldown
- private readonly Spell DevotionAura = new Spell("Devotion Aura");
- private readonly Spell DivineProtection = new Spell("Divine Protection");
- private readonly Spell DivineShield = new Spell("Divine Shield");
- private readonly Spell HandOfProtection = new Spell("Hand of Protection");
- #endregion
- #region Healing Spell
- private readonly Spell DivinePlea = new Spell("Divine Plea");
- private readonly Spell DivineLight = new Spell("Divine Light");
- private readonly Spell HolyRadiance = new Spell("Holy Radiance");
- private readonly Spell FlashOfLight = new Spell("Flash of Light");
- private readonly Spell HolyLight = new Spell("Holy Light");
- private readonly Spell LayOnHands = new Spell("Lay on Hands");
- private readonly Spell WordOfGlory = new Spell("Word of Glory");
- private readonly Spell GlyphOfHarshWords = new Spell("Glyph of Harsh Words");
- #endregion
- public Paladin_Holy()
- {
- Main.range = 20f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- try
- {
- if (!ObjectManager.Me.IsMounted)
- {
- Patrolling();
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && HolyShock.IsDistanceGood)
- {
- Pull();
- lastTarget = ObjectManager.Me.Target;
- }
- Combat();
- }
- }
- }
- catch
- {
- }
- Thread.Sleep(50);
- }
- }
- private void Pull()
- {
- if (HolyShock.KnownSpell && HolyShock.IsDistanceGood && HolyShock.IsSpellUsable)
- {
- HolyShock.Launch();
- return;
- }
- }
- private void Combat()
- {
- DPS_Cycle();
- Heal();
- DPS_Burst();
- }
- private void Patrolling()
- {
- if (!ObjectManager.Me.IsMounted)
- {
- Seal();
- Blessing();
- }
- }
- private void Seal()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- if (SealOfInsight.KnownSpell)
- {
- if (!SealOfInsight.HaveBuff && SealOfInsight.IsSpellUsable)
- {
- SealOfInsight.Launch();
- }
- }
- else if (SealOfTruth.KnownSpell)
- {
- if (!SealOfTruth.HaveBuff && SealOfTruth.IsSpellUsable)
- {
- SealOfTruth.Launch();
- }
- }
- else if (SealOfTheRighteousness.KnownSpell)
- if (!SealOfTheRighteousness.HaveBuff && SealOfTheRighteousness.IsSpellUsable)
- {
- {
- SealOfTheRighteousness.Launch();
- }
- }
- }
- private void Blessing()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- if (BlessingOfKings.KnownSpell && !BlessingOfKings.HaveBuff && BlessingOfKings.IsSpellUsable)
- {
- BlessingOfKings.Launch();
- }
- }
- private void Heal()
- {
- if (ObjectManager.Me.HealthPercent < 95 && !Fight.InFight && ObjectManager.GetNumberAttackPlayer() == 0)
- {
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- MovementManager.StopMove();
- return;
- }
- }
- if (DivineShield.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 5 && !ObjectManager.Me.HaveBuff(25771) && DivineShield.IsSpellUsable)
- {
- DivineShield.Launch();
- return;
- }
- if (LayOnHands.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 20 && !ObjectManager.Me.HaveBuff(25771) && LayOnHands.IsSpellUsable)
- {
- LayOnHands.Launch();
- return;
- }
- if (ObjectManager.Me.BarTwoPercentage < 10)
- {
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable)
- Arcane_Torrent.Launch();
- if (DivinePlea.KnownSpell && DivinePlea.IsSpellUsable)
- {
- DivinePlea.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent < 50)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable && (!GlyphOfHarshWords.KnownSpell /* || cast on me */))
- WordOfGlory.Launch();
- if (DivineLight.KnownSpell && DivineLight.IsSpellUsable)
- {
- DivineLight.Launch();
- return;
- }
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- if (HolyLight.KnownSpell && HolyLight.IsSpellUsable)
- {
- HolyLight.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent >= 0 && ObjectManager.Me.HealthPercent < 30)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable && (!GlyphOfHarshWords.KnownSpell /* || cast on me */))
- WordOfGlory.Launch();
- if (DivineProtection.KnownSpell && DivineProtection.IsSpellUsable)
- DivineProtection.Launch();
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- if (HolyLight.KnownSpell && HolyLight.IsSpellUsable)
- {
- HolyLight.Launch();
- return;
- }
- if (DivineLight.KnownSpell && DivineLight.IsSpellUsable)
- {
- DivineLight.Launch();
- return;
- }
- }
- }
- private void DPS_Burst()
- {
- if (DivineFavor.KnownSpell && DivineFavor.IsSpellUsable)
- {
- if (AvengingWrath.KnownSpell && AvengingWrath.IsSpellUsable)
- {
- AvengingWrath.Launch();
- }
- if (Lifeblood.KnownSpell && Lifeblood.IsSpellUsable)
- {
- Lifeblood.Launch();
- }
- if (HolyAvenger.KnownSpell && HolyAvenger.IsSpellUsable)
- {
- HolyAvenger.Launch();
- }
- DivineFavor.Launch();
- return;
- }
- else if (Lifeblood.KnownSpell && Lifeblood.IsSpellUsable)
- {
- Lifeblood.Launch();
- return;
- }
- }
- private void DPS_Cycle()
- {
- if (HolyShock.KnownSpell && HolyShock.IsDistanceGood && HolyShock.IsSpellUsable)
- {
- HolyShock.Launch();
- return;
- }
- if (HammerOfWrath.KnownSpell && HammerOfWrath.IsDistanceGood && HammerOfWrath.IsSpellUsable)
- {
- HammerOfWrath.Launch();
- return;
- }
- if (GlyphOfHarshWords.KnownSpell && WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable && ObjectManager.Me.HolyPower >= 3)
- {
- WordOfGlory.Launch();
- return;
- }
- if (HammerOfJustice.KnownSpell && HammerOfJustice.IsDistanceGood && HammerOfJustice.IsSpellUsable)
- {
- HammerOfJustice.Launch();
- return;
- }
- if (Denounce.KnownSpell && Denounce.IsDistanceGood && Denounce.IsSpellUsable)
- {
- Denounce.Launch();
- return;
- }
- }
- }
- public class Paladin_Protection
- {
- #region Professions & Racial
- private readonly Spell Arcane_Torrent = new Spell("Arcane Torrent");
- private readonly Spell Lifeblood = new Spell("Lifeblood");
- private readonly Spell Stoneform = new Spell("Stoneform");
- private readonly Spell Tailoring = new Spell("Tailoring");
- private readonly Spell Leatherworking = new Spell("Leatherworking");
- private readonly Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- private readonly Spell War_Stomp = new Spell("War Stomp");
- private readonly Spell Berserking = new Spell("Berserking");
- #endregion
- #region Paladin Seals & Buffs
- private readonly Spell SealOfTheRighteousness = new Spell("Seal of Righteousness");
- private readonly Spell SealOfTruth = new Spell("Seal of Truth");
- private readonly Spell SealOfInsight = new Spell("Seal of Insight");
- private readonly Spell BlessingOfMight = new Spell("Blessing of Might");
- private readonly Spell BlessingOfKings = new Spell("Blessing of Kings");
- #endregion
- #region Offensive Spell
- private readonly Spell HammerOfTheRighteous = new Spell("Hammer of the Righteous"); // 115798 = Weakened Blows
- private readonly Spell ShieldOfTheRighteous = new Spell("Shield of the Righteous");
- private readonly Spell AvengersShield = new Spell("Avenger's Shield");
- private readonly Spell CrusaderStrike = new Spell("Crusader Strike");
- private readonly Spell Consecration = new Spell("Consecration");
- private readonly Spell HolyWrath = new Spell("Holy Wrath");
- private readonly Spell Judgment = new Spell("Judgment");
- private readonly Spell HammerOfJustice = new Spell("Hammer of Justice");
- private readonly Spell HammerOfWrath = new Spell("Hammer of Wrath");
- #endregion
- #region Offensive Cooldown
- private readonly Spell HolyAvenger = new Spell("Holy Avenger");
- private readonly Spell AvengingWrath = new Spell("Avenging Wrath");
- #endregion
- #region Defensive Cooldown
- Timer OnCD = new Timer(0);
- private readonly Spell GuardianOfAncientKings = new Spell("Guardian of Ancient Kings");
- private readonly Spell HolyShield = new Spell("Holy Shield");
- private readonly Spell ArdentDefender = new Spell("Ardent Defender");
- private readonly Spell SacredShield = new Spell("Sacred Shield");
- private readonly Spell HandOfPurity = new Spell("Hand Of Purity");
- private readonly Spell DevotionAura = new Spell("Devotion Aura");
- private readonly Spell DivineProtection = new Spell("Divine Protection");
- private readonly Spell DivineShield = new Spell("Divine Shield");
- private readonly Spell HandOfProtection = new Spell("Hand of Protection");
- #endregion
- #region Healing Spell
- private readonly Spell FlashOfLight = new Spell("Flash of Light");
- private readonly Spell LayOnHands = new Spell("Lay on Hands");
- private readonly Spell WordOfGlory = new Spell("Word of Glory");
- #endregion
- public Paladin_Protection()
- {
- Main.range = 3.6f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- try
- {
- if (!ObjectManager.Me.IsMounted)
- {
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && Judgment.IsDistanceGood)
- {
- Pull();
- lastTarget = ObjectManager.Me.Target;
- }
- Combat();
- Seal();
- Blessing();
- }
- else
- {
- Patrolling();
- }
- }
- }
- catch
- {
- }
- Thread.Sleep(150);
- }
- }
- private void Pull()
- {
- DPS_Burst();
- if (Judgment.KnownSpell && Judgment.IsDistanceGood && Judgment.IsSpellUsable)
- {
- Judgment.Launch();
- Thread.Sleep(1000);
- }
- if (AvengersShield.KnownSpell && AvengersShield.IsDistanceGood && AvengersShield.IsSpellUsable)
- {
- AvengersShield.Launch();
- }
- }
- private void Combat()
- {
- if (OnCD.IsReady)
- Defense_Cycle();
- DPS_Cycle();
- Heal();
- DPS_Burst();
- }
- private void Patrolling()
- {
- if (!ObjectManager.Me.IsMounted)
- {
- Seal();
- Blessing();
- Heal();
- }
- }
- private void Seal()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- if (SealOfTruth.KnownSpell && ObjectManager.GetNumberAttackPlayer() <= 7)
- {
- if (!SealOfTruth.HaveBuff && SealOfTruth.IsSpellUsable)
- SealOfTruth.Launch();
- }
- else if (SealOfTheRighteousness.KnownSpell)
- {
- if (!SealOfTheRighteousness.HaveBuff && SealOfTheRighteousness.IsSpellUsable)
- SealOfTheRighteousness.Launch();
- }
- }
- private void Blessing()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- else if (BlessingOfMight.KnownSpell)
- {
- if (!BlessingOfMight.HaveBuff && BlessingOfMight.IsSpellUsable)
- BlessingOfMight.Launch();
- }
- else if (BlessingOfKings.KnownSpell)
- {
- if (!BlessingOfKings.HaveBuff && BlessingOfKings.IsSpellUsable)
- BlessingOfKings.Launch();
- }
- }
- private void Heal()
- {
- if (ObjectManager.Me.HealthPercent < 95 && !Fight.InFight && ObjectManager.GetNumberAttackPlayer() == 0)
- {
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- MovementManager.StopMove();
- return;
- }
- }
- if (DivineShield.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 5 && !ObjectManager.Me.HaveBuff(25771) && DivineShield.IsSpellUsable)
- {
- DivineShield.Launch();
- return;
- }
- if (LayOnHands.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 20 && !ObjectManager.Me.HaveBuff(25771) && LayOnHands.IsSpellUsable)
- {
- LayOnHands.Launch();
- return;
- }
- if (ObjectManager.Me.BarTwoPercentage < 10)
- {
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable)
- {
- Arcane_Torrent.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent < 50)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable)
- WordOfGlory.Launch();
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent >= 0 && ObjectManager.Me.HealthPercent < 30)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable)
- WordOfGlory.Launch();
- if (DivineProtection.KnownSpell && DivineProtection.IsSpellUsable)
- DivineProtection.Launch();
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- }
- }
- private void DPS_Burst()
- {
- if (HolyAvenger.KnownSpell && HolyAvenger.IsSpellUsable)
- {
- HolyAvenger.Launch();
- if (AvengingWrath.KnownSpell && AvengingWrath.IsSpellUsable)
- {
- AvengingWrath.Launch();
- return;
- }
- }
- else if (AvengingWrath.KnownSpell && AvengingWrath.IsSpellUsable)
- {
- AvengingWrath.Launch();
- return;
- }
- }
- private void Defense_Cycle()
- {
- if (SacredShield.KnownSpell && SacredShield.IsSpellUsable && !SacredShield.HaveBuff)
- {
- SacredShield.Launch();
- OnCD = new Timer(0);
- }
- else if (HolyShield.KnownSpell && HolyShield.IsSpellUsable)
- {
- HolyShield.Launch();
- OnCD = new Timer(1000 * 10);
- return;
- }
- else if (HandOfPurity.KnownSpell && HandOfPurity.IsSpellUsable && !HandOfPurity.HaveBuff)
- {
- HandOfPurity.Launch();
- OnCD = new Timer(1000 * 6);
- }
- else if (HammerOfJustice.KnownSpell && HammerOfJustice.IsSpellUsable)
- {
- HammerOfJustice.Launch();
- OnCD = new Timer(1000 * 6);
- return;
- }
- else if (DivineShield.KnownSpell && DivineShield.IsSpellUsable && !ObjectManager.Me.HaveBuff(25771))
- {
- DivineShield.Launch();
- OnCD = new Timer(1000 * 8);
- return;
- }
- else if (DivineProtection.KnownSpell && DivineProtection.IsSpellUsable)
- {
- DivineProtection.Launch();
- OnCD = new Timer(1000 * 10);
- return;
- }
- else if (DevotionAura.KnownSpell && DevotionAura.IsSpellUsable)
- {
- DevotionAura.Launch();
- OnCD = new Timer(1000 * 6);
- return;
- }
- else if (GuardianOfAncientKings.KnownSpell && GuardianOfAncientKings.IsSpellUsable)
- {
- GuardianOfAncientKings.Launch();
- OnCD = new Timer(1000 * 12);
- return;
- }
- else if (ArdentDefender.KnownSpell && ArdentDefender.IsSpellUsable)
- {
- ArdentDefender.Launch();
- OnCD = new Timer(1000 * 10);
- return;
- }
- else if (LayOnHands.KnownSpell && LayOnHands.IsSpellUsable && !ObjectManager.Me.HaveBuff(25771))
- {
- LayOnHands.Launch();
- OnCD = new Timer(1000 * 5);
- return;
- }
- else if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable)
- {
- WordOfGlory.Launch();
- OnCD = new Timer(1000 * 5);
- return;
- }
- else if (HandOfProtection.KnownSpell && HandOfProtection.IsSpellUsable && !ObjectManager.Me.HaveBuff(25771))
- {
- HandOfProtection.Launch();
- OnCD = new Timer(1000 * 8);
- return;
- }
- }
- private void DPS_Cycle()
- {
- if (ShieldOfTheRighteous.KnownSpell && ShieldOfTheRighteous.IsSpellUsable && ShieldOfTheRighteous.IsDistanceGood && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- ShieldOfTheRighteous.Launch();
- return;
- }
- if ((ObjectManager.GetNumberAttackPlayer() >= 3 || !ObjectManager.Target.HaveBuff(115798)) && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- if (HammerOfTheRighteous.KnownSpell && HammerOfTheRighteous.IsDistanceGood && HammerOfTheRighteous.IsSpellUsable)
- {
- HammerOfTheRighteous.Launch();
- return;
- }
- }
- else
- {
- if (CrusaderStrike.KnownSpell && CrusaderStrike.IsDistanceGood && CrusaderStrike.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- CrusaderStrike.Launch();
- return;
- }
- }
- if (AvengersShield.KnownSpell && AvengersShield.IsDistanceGood && AvengersShield.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- AvengersShield.Launch();
- return;
- }
- if (HammerOfWrath.KnownSpell && HammerOfWrath.IsDistanceGood && HammerOfWrath.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- HammerOfWrath.Launch();
- return;
- }
- if (Judgment.KnownSpell && Judgment.IsDistanceGood && Judgment.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- Judgment.Launch();
- return;
- }
- if (Consecration.KnownSpell && Consecration.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3)
- {
- // Consecration.Launch(); // If the glyph is activated, it's a huge loss of time to have this .Launch() here "2-3 sec" without doing anything.
- SpellManager.CastSpellByIDAndPosition(26573, ObjectManager.Target.Position);
- return;
- }
- if (HolyWrath.KnownSpell && HolyWrath.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174) && ObjectManager.Me.HolyPower < 3 && !Judgment.IsSpellUsable && !CrusaderStrike.IsSpellUsable && !Consecration.IsSpellUsable)
- {
- HolyWrath.Launch();
- return;
- }
- }
- }
- public class Paladin_Retribution
- {
- [Serializable]
- public class PaladinRetributionSettings : nManager.Helpful.Settings
- {
- /* Professions & Racials */
- public bool UseArcaneTorrent = true;
- public bool UseLifeblood = true;
- public bool UseStoneform = true;
- public bool UseGiftoftheNaaru = true;
- public bool UseWarStomp = true;
- public bool UseBerserking = true;
- /* Paladin Seals & Buffs */
- public bool UseSealOfTheRighteousness = true;
- public bool UseSealOfTruth = true;
- public bool UseSealOfJustice = false;
- public bool UseBlessingOfMight = true;
- public bool UseBlessingOfKings = true;
- /* Offensive Spell */
- public bool UseTemplarsVerdict = true;
- public bool UseDivineStorm = true;
- public bool UseExorcism = true;
- public bool UseHammerOfWrath = true;
- public bool UseCrusaderStrike = true;
- public bool UseHammerOfTheRighteous = true;
- public bool UseJudgment = true;
- public bool UseHammerOfJustice = true;
- /* Offensive Cooldown */
- public bool UseInquisition = true;
- public bool UseGuardianOfAncientKings = true;
- public bool UseHolyAvenger = true;
- public bool UseAvengingWrath = true;
- /* Defensive Cooldown */
- public bool UseDivineProtection = true;
- public bool UseDevotionAura = true;
- public bool UseSacredShield = true;
- public bool UseDivineShield = true;
- public bool UseHandOfProtection = false;
- /* Healing Spell */
- public bool UseFlashOfLight = true;
- public bool UseLayOnHands = true;
- public bool UseWordOfGlory = true;
- private PaladinRetributionSettings()
- {
- ConfigWinForm(new System.Drawing.Point(400, 400), "Paladin Retribution Settings");
- /* Professions & Racials */
- AddControlInWinForm("Use Arcane Torrent", "UseArcaneTorrent", "Professions & Racials");
- AddControlInWinForm("Use Lifeblood", "UseLifeblood", "Professions & Racials");
- AddControlInWinForm("Use Stoneform", "UseStoneform", "Professions & Racials");
- AddControlInWinForm("Use Gift of the Naaru", "UseGiftoftheNaaru", "Professions & Racials");
- AddControlInWinForm("Use War Stomp", "UseWarStomp", "Professions & Racials");
- AddControlInWinForm("Use Berserking", "UseBerserking", "Professions & Racials");
- /* Paladin Seals & Buffs */
- AddControlInWinForm("Use Seal of the Righteousness", "UseSealOfTheRighteousness", "Paladin Seals & Buffs");
- AddControlInWinForm("Use Seal of Truth", "UseSealOfTruth", "Paladin Seals & Buffs");
- AddControlInWinForm("Use Seal of Justice", "UseSealOfJustice", "Paladin Seals & Buffs");
- AddControlInWinForm("Use Blessing of Might", "UseBlessingOfMight", "Paladin Seals & Buffs");
- AddControlInWinForm("Use Blessing of Kings", "UseBlessingOfKings", "Paladin Seals & Buffs");
- /* Offensive Spell */
- AddControlInWinForm("Use Templar's Verdict", "UseTemplarsVerdict", "Offensive Spell");
- AddControlInWinForm("Use Divine Storm", "UseDivineStorm", "Offensive Spell");
- AddControlInWinForm("Use Exorcism", "UseExorcism", "Offensive Spell");
- AddControlInWinForm("Use Hammer of Wrath", "UseHammerOfWrath", "Offensive Spell");
- AddControlInWinForm("Use Crusader Strike", "UseCrusaderStrike", "Offensive Spell");
- AddControlInWinForm("Use Hammer of the Righteous", "UseHammerOfTheRighteous", "Offensive Spell");
- AddControlInWinForm("Use Judgment", "UseJudgment", "Offensive Spell");
- AddControlInWinForm("Use Hammer of Justice", "UseHammerOfJustice", "Offensive Spell");
- /* Offensive Cooldown */
- AddControlInWinForm("Use Inquisition", "UseInquisition", "Offensive Cooldown");
- AddControlInWinForm("Use Guardian of Ancient Kings", "UseGuardianOfAncientKings", "Offensive Cooldown");
- AddControlInWinForm("Use Holy Avenger", "UseHolyAvenger", "Offensive Cooldown");
- AddControlInWinForm("Use Avenging Wrath", "UseAvengingWrath", "Offensive Cooldown");
- /* Defensive Cooldown */
- AddControlInWinForm("Use Divine Protection", "UseDivineProtection", "Offensive Cooldown");
- AddControlInWinForm("Use Devotion Aura", "UseDevotionAura", "Offensive Cooldown");
- AddControlInWinForm("Use Sacred Shield", "UseSacredShield", "Offensive Cooldown");
- AddControlInWinForm("Use Divine Shield", "UseDivineShield", "Offensive Cooldown");
- AddControlInWinForm("Use Hand of Protection", "UseHandOfProtection", "Offensive Cooldown");
- /* Healing Spell */
- AddControlInWinForm("Use Flash of Light", "UseFlashOfLight", "Healing Spell");
- AddControlInWinForm("Use Lay on Hands", "UseLayOnHands", "Healing Spell");
- AddControlInWinForm("Use Word of Glory", "UseWordOfGlory", "Healing Spell");
- }
- private GetSettings()
- {
- string CurrentSettingsFile = Application.StartupPath + "\\CustomClasses\\Settings\\Paladin_Retribution.xml";
- Paladin_Retribution.PaladinRetributionSettings CurrentSetting;
- CurrentSetting = new Paladin_Retribution.PaladinRetributionSettings();
- if (System.IO.File.Exists(CurrentSettingsFile))
- {
- CurrentSetting = Settings.Load<Paladin_Retribution.PaladinRetributionSettings>(CurrentSettingsFile);
- }
- }
- }
- private readonly Settings mySettings = new PaladinRetributionSettings().GetSettings();
- #region Professions & Racials
- private readonly Spell Arcane_Torrent = new Spell("Arcane Torrent");
- private readonly Spell Lifeblood = new Spell("Lifeblood");
- private readonly Spell Stoneform = new Spell("Stoneform");
- private readonly Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- private readonly Spell War_Stomp = new Spell("War Stomp");
- private readonly Spell Berserking = new Spell("Berserking");
- #endregion
- #region Paladin Seals & Buffs
- private readonly Spell SealOfTheRighteousness = new Spell("Seal of Righteousness");
- private readonly Spell SealOfTruth = new Spell("Seal of Truth");
- private readonly Spell SealOfJustice = new Spell("Seal of Justice");
- private readonly Spell BlessingOfMight = new Spell("Blessing of Might");
- private readonly Spell BlessingOfKings = new Spell("Blessing of Kings");
- #endregion
- #region Offensive Spell
- private readonly Spell TemplarsVerdict = new Spell("Templar's Verdict");
- private readonly Spell BoundlessConviction = new Spell("Boundless Conviction");
- private readonly Spell DivineStorm = new Spell("Divine Storm");
- private readonly Spell Exorcism = new Spell("Exorcism");
- private readonly Spell HammerOfWrath = new Spell("Hammer of Wrath");
- private readonly Spell CrusaderStrike = new Spell("Crusader Strike");
- private readonly Spell HammerOfTheRighteous = new Spell("Hammer of the Righteous");
- private readonly Spell Judgment = new Spell("Judgment");
- private readonly Spell HammerOfJustice = new Spell("Hammer of Justice");
- #endregion
- #region Offensive Cooldown
- private readonly Spell Inquisition = new Spell("Inquisition");
- private Timer InquisitionToUseInPriotiy = new Timer(0);
- private readonly Spell GuardianOfAncientKings = new Spell("Guardian of Ancient Kings");
- private Timer BurstTime = new Timer(0);
- private readonly Spell HolyAvenger = new Spell("Holy Avenger");
- private readonly Spell AvengingWrath = new Spell("Avenging Wrath");
- #endregion
- #region Defensive Cooldown
- private readonly Spell DivineProtection = new Spell("Divine Protection");
- private readonly Spell DevotionAura = new Spell("Devotion Aura");
- private readonly Spell SacredShield = new Spell("Sacred Shield");
- private readonly Spell DivineShield = new Spell("Divine Shield");
- private readonly Spell HandOfProtection = new Spell("Hand of Protection");
- #endregion
- #region Healing Spell
- private readonly Spell FlashOfLight = new Spell("Flash of Light");
- private readonly Spell LayOnHands = new Spell("Lay on Hands");
- private readonly Spell WordOfGlory = new Spell("Word of Glory");
- #endregion
- public Paladin_Retribution()
- {
- Main.range = 3.6f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- try
- {
- if (!ObjectManager.Me.IsMounted)
- {
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && (Judgment.IsDistanceGood || Exorcism.IsDistanceGood))
- {
- Pull();
- lastTarget = ObjectManager.Me.Target;
- }
- Combat();
- Seal();
- Blessing();
- }
- else
- {
- Patrolling();
- }
- }
- }
- catch
- {
- }
- Thread.Sleep(150);
- }
- }
- private void Pull()
- {
- if (Exorcism.KnownSpell && Exorcism.IsDistanceGood && Exorcism.IsSpellUsable && PaladinRetributionSettings.UseExorcism)
- {
- Exorcism.Launch();
- }
- else if (Judgment.KnownSpell && Judgment.IsDistanceGood && Judgment.IsSpellUsable)
- {
- Judgment.Launch();
- }
- }
- private void Combat()
- {
- DPS_Cycle();
- DPS_Burst();
- DPS_Cycle();
- Heal();
- DPS_Cycle();
- }
- private void Patrolling()
- {
- if (!ObjectManager.Me.IsMounted)
- {
- Seal();
- Blessing();
- Heal();
- }
- }
- private void Seal()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- if (SealOfTruth.KnownSpell && ObjectManager.GetNumberAttackPlayer() <= 7)
- {
- if (!SealOfTruth.HaveBuff && SealOfTruth.IsSpellUsable)
- SealOfTruth.Launch();
- }
- else if (SealOfTheRighteousness.KnownSpell)
- {
- if (!SealOfTheRighteousness.HaveBuff && SealOfTheRighteousness.IsSpellUsable)
- SealOfTheRighteousness.Launch();
- }
- }
- private void Blessing()
- {
- if (ObjectManager.Me.IsMounted)
- return;
- else if (BlessingOfMight.KnownSpell)
- {
- if (!BlessingOfMight.HaveBuff && BlessingOfMight.IsSpellUsable)
- BlessingOfMight.Launch();
- }
- else if (BlessingOfKings.KnownSpell)
- {
- if (!BlessingOfKings.HaveBuff && BlessingOfKings.IsSpellUsable)
- BlessingOfKings.Launch();
- }
- }
- private void Heal()
- {
- if (ObjectManager.Me.HealthPercent < 95 && !Fight.InFight && ObjectManager.GetNumberAttackPlayer() == 0)
- {
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- MovementManager.StopMove();
- return;
- }
- }
- if (DivineShield.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 5 && !ObjectManager.Me.HaveBuff(25771) && DivineShield.IsSpellUsable)
- {
- DivineShield.Launch();
- return;
- }
- if (LayOnHands.KnownSpell && ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent <= 20 && !ObjectManager.Me.HaveBuff(25771) && LayOnHands.IsSpellUsable)
- {
- LayOnHands.Launch();
- return;
- }
- if (ObjectManager.Me.BarTwoPercentage < 10)
- {
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable)
- {
- Arcane_Torrent.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent > 0 && ObjectManager.Me.HealthPercent < 50)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable)
- WordOfGlory.Launch();
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- }
- if (ObjectManager.Me.HealthPercent >= 0 && ObjectManager.Me.HealthPercent < 30)
- {
- if (WordOfGlory.KnownSpell && WordOfGlory.IsSpellUsable)
- WordOfGlory.Launch();
- if (DivineProtection.KnownSpell && DivineProtection.IsSpellUsable)
- DivineProtection.Launch();
- if (FlashOfLight.KnownSpell && FlashOfLight.IsSpellUsable)
- {
- FlashOfLight.Launch();
- return;
- }
- }
- }
- private void DPS_Burst()
- {
- if (!GuardianOfAncientKings.KnownSpell || GuardianOfAncientKings.HaveBuff || !GuardianOfAncientKings.IsSpellUsable)
- {
- if ((!GuardianOfAncientKings.KnownSpell || BurstTime.IsReady) && AvengingWrath.KnownSpell && AvengingWrath.IsSpellUsable && (!HolyAvenger.KnownSpell || HolyAvenger.IsSpellUsable))
- {
- AvengingWrath.Launch();
- if ((!Inquisition.HaveBuff || InquisitionToUseInPriotiy.IsReady) && Inquisition.KnownSpell && Inquisition.IsSpellUsable && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- Inquisition.Launch();
- InquisitionToUseInPriotiy = new Timer(1000 * (10 * 3 - 6));
- }
- if (HolyAvenger.KnownSpell && HolyAvenger.IsSpellUsable)
- HolyAvenger.Launch();
- return;
- }
- else if ((!GuardianOfAncientKings.KnownSpell || BurstTime.IsReady) && HolyAvenger.KnownSpell && HolyAvenger.IsSpellUsable)
- {
- HolyAvenger.Launch();
- if ((!Inquisition.HaveBuff || InquisitionToUseInPriotiy.IsReady) && Inquisition.KnownSpell && Inquisition.IsSpellUsable && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- Inquisition.Launch();
- InquisitionToUseInPriotiy = new Timer(1000 * (10 * 3 - 6));
- }
- if (AvengingWrath.KnownSpell && AvengingWrath.IsSpellUsable)
- AvengingWrath.Launch();
- return;
- }
- }
- else
- if (GuardianOfAncientKings.KnownSpell && GuardianOfAncientKings.IsSpellUsable && AvengingWrath.IsSpellUsable && (!HolyAvenger.KnownSpell || HolyAvenger.IsSpellUsable))
- {
- GuardianOfAncientKings.Launch();
- BurstTime = new Timer(1000 * 6.5);
- return;
- }
- }
- private void DPS_Cycle()
- {
- /*if (HammerOfJustice.KnownSpell && HammerOfJustice.IsDistanceGood && HammerOfJustice.IsSpellUsable)
- {
- // TODO : If target can be stun, if not, it will be a pure loss of DPS.
- HammerOfJustice.Launch();
- return;
- }*/
- if (Inquisition.KnownSpell && (!Inquisition.HaveBuff || InquisitionToUseInPriotiy.IsReady) && Inquisition.IsSpellUsable && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- Inquisition.Launch();
- InquisitionToUseInPriotiy = new Timer(1000 * (10 * 3 - 6));
- return;
- }
- else if (ObjectManager.GetNumberAttackPlayer() <= 1 && TemplarsVerdict.KnownSpell && (!Inquisition.KnownSpell || Inquisition.HaveBuff) && TemplarsVerdict.IsSpellUsable && TemplarsVerdict.IsDistanceGood && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower == 5 || (ObjectManager.Me.HolyPower >= 3 && (!BoundlessConviction.KnownSpell || HolyAvenger.HaveBuff))))
- {
- TemplarsVerdict.Launch();
- return;
- }
- else if (ObjectManager.GetNumberAttackPlayer() >= 2 && DivineStorm.KnownSpell && (!Inquisition.KnownSpell || Inquisition.HaveBuff) && DivineStorm.IsSpellUsable && DivineStorm.IsDistanceGood && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower == 5 || (ObjectManager.Me.HolyPower >= 3 && (!BoundlessConviction.KnownSpell || HolyAvenger.HaveBuff))))
- {
- DivineStorm.Launch();
- return;
- }
- else if (HammerOfWrath.KnownSpell && HammerOfWrath.IsDistanceGood && HammerOfWrath.IsSpellUsable)
- {
- HammerOfWrath.Launch();
- return;
- }
- else if (Exorcism.KnownSpell && Exorcism.IsDistanceGood && Exorcism.IsSpellUsable)
- {
- Exorcism.Launch();
- return;
- }
- else if ((ObjectManager.GetNumberAttackPlayer() <= 3 || ObjectManager.Target.HaveBuff(115798)) && CrusaderStrike.KnownSpell && CrusaderStrike.IsDistanceGood && CrusaderStrike.IsSpellUsable)
- {
- CrusaderStrike.Launch();
- return;
- }
- else if ((ObjectManager.GetNumberAttackPlayer() >= 4 || !ObjectManager.Target.HaveBuff(115798)) && HammerOfTheRighteous.KnownSpell && HammerOfTheRighteous.IsDistanceGood && HammerOfTheRighteous.IsSpellUsable && !ObjectManager.Me.HaveBuff(90174))
- {
- HammerOfTheRighteous.Launch();
- return;
- }
- else if (Judgment.KnownSpell && Judgment.IsDistanceGood && Judgment.IsSpellUsable)
- {
- Judgment.Launch();
- return;
- }
- else if (ObjectManager.GetNumberAttackPlayer() <= 1 && TemplarsVerdict.KnownSpell && (!Inquisition.KnownSpell || Inquisition.HaveBuff) && TemplarsVerdict.IsSpellUsable && TemplarsVerdict.IsDistanceGood && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- TemplarsVerdict.Launch();
- return;
- }
- else if (ObjectManager.GetNumberAttackPlayer() >= 2 && DivineStorm.KnownSpell && (!Inquisition.KnownSpell || Inquisition.HaveBuff) && DivineStorm.IsSpellUsable && DivineStorm.IsDistanceGood && (ObjectManager.Me.HaveBuff(90174) || ObjectManager.Me.HolyPower >= 3))
- {
- DivineStorm.Launch();
- return;
- }
- else if (SacredShield.KnownSpell && SacredShield.IsDistanceGood && SacredShield.IsSpellUsable
- && (!Inquisition.KnownSpell || Inquisition.HaveBuff)
- && (!TemplarsVerdict.KnownSpell || TemplarsVerdict.IsSpellUsable)
- && (!Judgment.KnownSpell || Judgment.IsSpellUsable)
- && (!Judgment.KnownSpell || Judgment.IsSpellUsable)
- && (!CrusaderStrike.KnownSpell || CrusaderStrike.IsSpellUsable)
- && (!HammerOfWrath.KnownSpell || HammerOfWrath.IsSpellUsable)
- && (!Exorcism.KnownSpell || Exorcism.IsSpellUsable)
- && (!Exorcism.KnownSpell || Exorcism.IsSpellUsable)
- && (!Exorcism.KnownSpell || Exorcism.IsSpellUsable))
- {
- // Since we have a GCD available and spell to cast, we can use the Sacred Shield. (Loss of DPS if not placed here.)
- SacredShield.Launch();
- return;
- }
- else
- return;
- }
- }
- #endregion
- public class Survival
- {
- #region InitializeSpell
- // Survival Only
- Spell Explosive_Shot = new Spell("Explosive Shot");
- Spell Counterattack = new Spell("Counterattack");
- Spell Black_Arrow = new Spell("Black Arrow");
- // DPS
- Spell Raptor_Strike = new Spell("Raptor Strike");
- Spell Arcane_Shot = new Spell("Arcane Shot");
- Spell Steady_Shot = new Spell("Steady Shot");
- Spell Serpent_Sting = new Spell("Serpent Sting");
- Spell Multi_Shot = new Spell("Multi-Shot");
- Spell Kill_Shot = new Spell("Kill Shot");
- Spell Explosive_Trap = new Spell("Explosive Trap");
- Spell Cobra_Shot = new Spell("Cobra Shot");
- Spell Immolation_Trap = new Spell("Immolation Trap");
- // BUFF & HELPING
- Spell Concussive_Shot = new Spell("Concussive Shot");
- Spell Aspect_of_the_Hawk = new Spell("Aspect of the Hawk");
- Spell Disengage = new Spell("Disengage");
- Spell Hunters_Mark = new Spell("Hunter's Mark");
- Spell Scatter_Shot = new Spell("Scatter Shot"); // 19503
- Spell Feign_Death = new Spell("Feign Death"); // 5384
- Spell Snake_Trap = new Spell("Snake Trap");
- Spell Ice_Trap = new Spell("Ice Trap");
- Spell Freezing_Trap = new Spell("Freezing Trap");
- Spell Trap_Launcher = new Spell("Trap Launcher"); // 77769
- Spell Rapid_Fire = new Spell("Rapid Fire"); // 3045
- Spell Misdirection = new Spell("Misdirection");
- Spell Deterrence = new Spell("Deterrence"); // 19263
- Spell Wing_Clip = new Spell("Wing Clip");
- // PET
- Spell Kill_Command = new Spell("Kill Command");
- Spell Mend_Pet = new Spell("Mend Pet"); // 136
- Spell Revive_Pet = new Spell("Revive Pet"); // 982
- Spell Call_Pet = new Spell("Call Pet 1"); // 883
- // TIMER
- Timer look = new Timer(0);
- Timer fighttimer = new Timer(0);
- Timer petheal = new Timer(0);
- Timer traplaunchertimer = new Timer(0);
- Timer disengagetimer = new Timer(0);
- Timer Serpent_Sting_debuff = new Timer(0);
- Timer mountchill = new Timer(0);
- // Profession & Racials
- Spell Arcane_Torrent = new Spell("Arcane Torrent");
- Spell Lifeblood = new Spell("Lifeblood");
- Spell Stoneform = new Spell("Stoneform");
- Spell Tailoring = new Spell("Tailoring");
- Spell Leatherworking = new Spell("Leatherworking");
- Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- Spell War_Stomp = new Spell("War Stomp");
- Spell Berserking = new Spell("Berserking");
- #endregion InitializeSpell
- public Survival()
- {
- Main.range = 30.0f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- if (!ObjectManager.Me.IsMounted)
- {
- buffoutfight();
- if (!Fight.InFight && look.IsReady)
- {
- look = new Timer(5000);
- Lua.RunMacroText("/targetfriendplayer");
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0 && ObjectManager.Target.GetDistance > Main.range)
- {
- fighttimer = new Timer(60000);
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && ObjectManager.Target.GetDistance <= Main.range)
- {
- pull();
- lastTarget = ObjectManager.Me.Target;
- }
- fight();
- if (!Fight.InFight)
- {
- Logging.WriteFight(" - Target Down - ");
- look = new Timer(5000);
- }
- if (fighttimer.IsReady && ObjectManager.Target.HealthPercent > 90 && ObjectManager.Me.Target > 0 && ObjectManager.GetNumberAttackPlayer() < 2)
- {
- Logging.WriteFight(" - Target Evading - ");
- break;
- }
- }
- }
- if (ObjectManager.Me.IsMounted) mountchill = new Timer(2000);
- Thread.Sleep(350);
- }
- }
- public void pull()
- {
- if (hardmob()) Logging.WriteFight(" - Pull Hard Mob - ");
- if (!hardmob()) Logging.WriteFight(" - Pull Easy Mob - ");
- fighttimer = new Timer(60000);
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- }
- public void buffoutfight()
- {
- if (Fight.InFight || ObjectManager.Me.IsDeadMe) return;
- pet();
- if (!ObjectManager.Me.HaveBuff(79640) &&
- ItemsManager.GetItemCountByIdLUA(58149) == 1)
- {
- Logging.WriteFight("Use Alchi Flask");
- Lua.RunMacroText("/use item:58149");
- }
- if (Aspect_of_the_Hawk.KnownSpell && Aspect_of_the_Hawk.IsSpellUsable &&
- !Aspect_of_the_Hawk.HaveBuff)
- {
- SpellManager.CastSpellByIdLUA(13165);
- // Aspect_of_the_Hawk.Launch();
- }
- }
- public void fight()
- {
- pet();
- selfheal();
- buffinfight();
- if (ObjectManager.GetNumberAttackPlayer() > 1) fighttimer = new Timer(60000);
- if (ObjectManager.GetNumberAttackPlayer() > 2 && Explosive_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Explosive_Trap.KnownSpell && Explosive_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13813, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood &&
- !ObjectManager.Target.IsTargetingMe && ObjectManager.Target.HealthPercent > 70)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Immolation_Trap.KnownSpell && Immolation_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13795, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && !Trap_Launcher.KnownSpell && Arcane_Shot.IsDistanceGood)
- {
- Immolation_Trap.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Hunters_Mark.KnownSpell && Hunters_Mark.IsSpellUsable && Hunters_Mark.IsDistanceGood && !Hunters_Mark.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(1130);
- // Hunters_Mark.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 2 || hardmob()) && Misdirection.KnownSpell && Misdirection.IsSpellUsable)
- {
- Lua.RunMacroText("/cast [@pet] Misdirection");
- Lua.RunMacroText("/cast [@pet] Irreführung");
- Lua.RunMacroText("/cast [@pet] Détournement");
- Lua.RunMacroText("/cast [@pet] ???????????????");
- Lua.RunMacroText("/cast [@pet] Redirección");
- Lua.RunMacroText("/cast [@pet] Redirecionar");
- }
- if (ObjectManager.Me.HaveBuff(56453))
- {
- if (Explosive_Shot.KnownSpell && Explosive_Shot.IsSpellUsable && Explosive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53301);
- // Explosive_Shot.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- return;
- }
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood && !ObjectManager.Target.HaveBuff(1978))
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && Serpent_Sting_debuff.IsReady && Arcane_Shot.IsDistanceGood)
- {
- Serpent_Sting_debuff = new Timer(2500);
- Serpent_Sting.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && !Serpent_Sting_debuff.IsReady)
- {
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- Kill_Shot.Launch();
- }
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) && Snake_Trap.IsSpellUsable && Arcane_Shot.IsDistanceGood && !ObjectManager.Target.GetMove && Trap_Launcher.KnownSpell)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Snake_Trap.KnownSpell && Snake_Trap.IsSpellUsable && Trap_Launcher.HaveBuff)
- {
- SpellManager.CastSpellByIDAndPosition(34600, ObjectManager.Target.Position);
- }
- }
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (ObjectManager.Target.HaveBuff(1978))
- {
- if (Multi_Shot.KnownSpell && Multi_Shot.IsSpellUsable && Multi_Shot.IsDistanceGood && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(2643);
- // Multi_Shot.Launch();
- }
- if (Explosive_Shot.KnownSpell && Explosive_Shot.IsSpellUsable && Explosive_Shot.IsDistanceGood && ObjectManager.Me.BarTwoPercentage > 70)
- {
- SpellManager.CastSpellByIdLUA(53301);
- // Explosive_Shot.Launch();
- }
- if (Black_Arrow.KnownSpell && Black_Arrow.IsSpellUsable && Black_Arrow.IsDistanceGood && !Explosive_Shot.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(3674);
- // Black_Arrow.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood && !Explosive_Shot.IsSpellUsable && !Black_Arrow.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- }
- if (ObjectManager.Me.BarTwoPercentage < 70 && ObjectManager.Target.HaveBuff(1978))
- {
- if (Steady_Shot.KnownSpell && Steady_Shot.IsSpellUsable && Steady_Shot.IsDistanceGood && !Cobra_Shot.KnownSpell)
- {
- SpellManager.CastSpellByIdLUA(56641);
- // Steady_Shot.Launch();
- }
- else if (Cobra_Shot.KnownSpell && Cobra_Shot.IsSpellUsable && Cobra_Shot.IsDistanceGood && ObjectManager.Target.HaveBuff(1978))
- {
- SpellManager.CastSpellByIdLUA(77767);
- // Cobra_Shot.Launch();
- }
- }
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable &&
- ObjectManager.Target.IsCast && ObjectManager.Target.GetDistance < 8)
- {
- Arcane_Torrent.Launch();
- }
- }
- private void pet()
- {
- if (ObjectManager.Me.IsMounted || !mountchill.IsReady) return;
- if ((ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0) &&
- !ObjectManager.Me.IsMounted && !ObjectManager.Me.IsDeadMe)
- {
- Call_Pet.Launch();
- Thread.Sleep(1000);
- if (!ObjectManager.Pet.IsAlive)
- {
- Revive_Pet.Launch();
- Thread.Sleep(1000);
- }
- }
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Fight.InFight) Lua.RunMacroText("/petattack");
- }
- private void buffinfight()
- {
- if (!Fight.InFight) return;
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- Stoneform.KnownSpell && Stoneform.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20594);
- // Stoneform.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- War_Stomp.KnownSpell && War_Stomp.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20549);
- // War_Stomp.Launch();
- }
- if (Berserking.KnownSpell && Berserking.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(1454);
- // Berserking.Launch();
- }
- if (Rapid_Fire.KnownSpell && Rapid_Fire.IsSpellUsable && (hardmob() || ObjectManager.GetNumberAttackPlayer() > 2) && Arcane_Shot.IsDistanceGood)
- {
- Rapid_Fire.Launch();
- }
- }
- private void selfheal()
- {
- if (ObjectManager.Me.HealthPercent < 80 &&
- Lifeblood.KnownSpell && Lifeblood.IsSpellUsable)
- {
- Lifeblood.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 80 &&
- Gift_of_the_Naaru.KnownSpell && Gift_of_the_Naaru.IsSpellUsable)
- {
- Gift_of_the_Naaru.Launch();
- }
- if (Disengage.KnownSpell && Disengage.IsSpellUsable && Disengage.IsDistanceGood &&
- ObjectManager.Target.HealthPercent > 30 && ObjectManager.Target.GetDistance < 5)
- {
- disengagetimer = new Timer(2000);
- while (ObjectManager.Target.GetDistance < 5 && !disengagetimer.IsReady)
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- SpellManager.CastSpellByIdLUA(781);
- // Disengage.Launch();
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- return;
- }
- if (ObjectManager.Target.GetDistance < 10 && ((Disengage.KnownSpell && !Disengage.IsSpellUsable) || !Disengage.KnownSpell))
- {
- disengagetimer = new Timer(5000);
- while (ObjectManager.Target.GetDistance < 10 || !disengagetimer.IsReady)
- {
- if (!Fight.InFight) return;
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "S");
- Thread.Sleep(100);
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- if (Counterattack.KnownSpell && Counterattack.IsSpellUsable && Counterattack.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(19306);
- // Counterattack.Launch();
- }
- if (Raptor_Strike.KnownSpell && Raptor_Strike.IsSpellUsable && Raptor_Strike.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(2973);
- // Raptor_Strike.Launch();
- }
- if (Kill_Command.KnownSpell && Kill_Command.IsSpellUsable && Kill_Command.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(34026);
- // Kill_Command.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Explosive_Shot.KnownSpell && Explosive_Shot.IsSpellUsable && Explosive_Shot.IsDistanceGood && ObjectManager.Me.BarTwoPercentage > 70)
- {
- SpellManager.CastSpellByIdLUA(53301);
- // Explosive_Shot.Launch();
- }
- if (Black_Arrow.KnownSpell && Black_Arrow.IsSpellUsable && Black_Arrow.IsDistanceGood && !Explosive_Shot.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(3674);
- // Black_Arrow.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable)
- {
- Feign_Death.Launch();
- Thread.Sleep(3000);
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (Scatter_Shot.KnownSpell && Scatter_Shot.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- Scatter_Shot.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 30 && ObjectManager.Target.IsTargetingMe)
- {
- if (!Feign_Death.IsSpellUsable && !Scatter_Shot.IsSpellUsable && Deterrence.KnownSpell && Deterrence.KnownSpell)
- {
- Deterrence.Launch();
- }
- }
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "{SPACE}");
- }
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 15 && ObjectManager.Pet.Health > 10)
- {
- Feign_Death.Launch();
- Thread.Sleep(3000);
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 15 && (ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0))
- {
- Feign_Death.Launch();
- Lua.RunMacroText("/cleartarget");
- Thread.Sleep(30000);
- }
- }
- public bool hardmob()
- {
- if (((ObjectManager.Target.MaxHealth * 100) / ObjectManager.Me.MaxHealth) > 110)
- {
- return true;
- }
- return false;
- }
- }
- public class Marks
- {
- #region InitializeSpell
- // Marks Only
- Spell Aimed_Shot = new Spell("Aimed Shot");
- Spell Silencing_Shot = new Spell("Silencing Shot");
- Spell Readiness = new Spell("Readiness");
- Spell Chimera_Shot = new Spell("Chimera Shot");
- // DPS
- Spell Raptor_Strike = new Spell("Raptor Strike");
- Spell Arcane_Shot = new Spell("Arcane Shot");
- Spell Steady_Shot = new Spell("Steady Shot");
- Spell Serpent_Sting = new Spell("Serpent Sting");
- Spell Multi_Shot = new Spell("Multi-Shot");
- Spell Kill_Shot = new Spell("Kill Shot");
- Spell Explosive_Trap = new Spell("Explosive Trap");
- Spell Cobra_Shot = new Spell("Cobra Shot");
- Spell Immolation_Trap = new Spell("Immolation Trap");
- // BUFF & HELPING
- Spell Concussive_Shot = new Spell("Concussive Shot");
- Spell Aspect_of_the_Hawk = new Spell("Aspect of the Hawk");
- Spell Disengage = new Spell("Disengage");
- Spell Hunters_Mark = new Spell("Hunter's Mark");
- Spell Scatter_Shot = new Spell("Scatter Shot"); // 19503
- Spell Feign_Death = new Spell("Feign Death"); // 5384
- Spell Snake_Trap = new Spell("Snake Trap");
- Spell Ice_Trap = new Spell("Ice Trap");
- Spell Freezing_Trap = new Spell("Freezing Trap");
- Spell Trap_Launcher = new Spell("Trap Launcher"); // 77769
- Spell Rapid_Fire = new Spell("Rapid Fire"); // 3045
- Spell Misdirection = new Spell("Misdirection");
- Spell Deterrence = new Spell("Deterrence"); // 19263
- Spell Wing_Clip = new Spell("Wing Clip");
- // PET
- Spell Kill_Command = new Spell("Kill Command");
- Spell Mend_Pet = new Spell("Mend Pet"); // 136
- Spell Revive_Pet = new Spell("Revive Pet"); // 982
- Spell Call_Pet = new Spell("Call Pet 1"); // 883
- // TIMER
- Timer look = new Timer(0);
- Timer fighttimer = new Timer(0);
- Timer petheal = new Timer(0);
- Timer traplaunchertimer = new Timer(0);
- Timer disengagetimer = new Timer(0);
- Timer Serpent_Sting_debuff = new Timer(0);
- Timer mountchill = new Timer(0);
- // Profession & Racials
- Spell Arcane_Torrent = new Spell("Arcane Torrent");
- Spell Lifeblood = new Spell("Lifeblood");
- Spell Stoneform = new Spell("Stoneform");
- Spell Tailoring = new Spell("Tailoring");
- Spell Leatherworking = new Spell("Leatherworking");
- Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- Spell War_Stomp = new Spell("War Stomp");
- Spell Berserking = new Spell("Berserking");
- #endregion InitializeSpell
- public Marks()
- {
- Main.range = 30.0f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- if (!ObjectManager.Me.IsMounted)
- {
- buffoutfight();
- if (!Fight.InFight && look.IsReady)
- {
- look = new Timer(5000);
- Lua.RunMacroText("/targetfriendplayer");
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0 && ObjectManager.Target.GetDistance > Main.range)
- {
- fighttimer = new Timer(60000);
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && ObjectManager.Target.GetDistance <= Main.range)
- {
- pull();
- lastTarget = ObjectManager.Me.Target;
- }
- fight();
- if (!Fight.InFight)
- {
- Logging.WriteFight(" - Target Down - ");
- look = new Timer(5000);
- }
- if (fighttimer.IsReady && ObjectManager.Target.HealthPercent > 90 && ObjectManager.Me.Target > 0 && ObjectManager.GetNumberAttackPlayer() < 2)
- {
- Logging.WriteFight(" - Target Evading - ");
- break;
- }
- }
- }
- if (ObjectManager.Me.IsMounted) mountchill = new Timer(2000);
- Thread.Sleep(350);
- }
- }
- public void pull()
- {
- if (hardmob()) Logging.WriteFight(" - Pull Hard Mob - ");
- if (!hardmob()) Logging.WriteFight(" - Pull Easy Mob - ");
- fighttimer = new Timer(60000);
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- }
- public void buffoutfight()
- {
- if (Fight.InFight || ObjectManager.Me.IsDeadMe) return;
- pet();
- if (!ObjectManager.Me.HaveBuff(79640) &&
- ItemsManager.GetItemCountByIdLUA(58149) == 1)
- {
- Logging.WriteFight("Use Alchi Flask");
- Lua.RunMacroText("/use item:58149");
- }
- if (Aspect_of_the_Hawk.KnownSpell && Aspect_of_the_Hawk.IsSpellUsable &&
- !Aspect_of_the_Hawk.HaveBuff)
- {
- SpellManager.CastSpellByIdLUA(13165);
- // Aspect_of_the_Hawk.Launch();
- }
- }
- public void fight()
- {
- pet();
- selfheal();
- buffinfight();
- if (ObjectManager.GetNumberAttackPlayer() > 1) fighttimer = new Timer(60000);
- if (ObjectManager.GetNumberAttackPlayer() > 2 && Explosive_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- traplaunchertimer = new Timer(1000);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Explosive_Trap.KnownSpell && Explosive_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13813, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood &&
- !ObjectManager.Target.IsTargetingMe && ObjectManager.Target.HealthPercent > 70)
- {
- traplaunchertimer = new Timer(1000);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Immolation_Trap.KnownSpell && Immolation_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13795, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && !Trap_Launcher.KnownSpell && Arcane_Shot.IsDistanceGood)
- {
- Immolation_Trap.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Hunters_Mark.KnownSpell && Hunters_Mark.IsSpellUsable && Hunters_Mark.IsDistanceGood && !Hunters_Mark.TargetHaveBuff && !Chimera_Shot.KnownSpell)
- {
- SpellManager.CastSpellByIdLUA(1130);
- // Hunters_Mark.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 2 || hardmob()) && Misdirection.KnownSpell && Misdirection.IsSpellUsable)
- {
- Lua.RunMacroText("/cast [@pet] Misdirection");
- Lua.RunMacroText("/cast [@pet] Irreführung");
- Lua.RunMacroText("/cast [@pet] Détournement");
- Lua.RunMacroText("/cast [@pet] ???????????????");
- Lua.RunMacroText("/cast [@pet] Redirección");
- Lua.RunMacroText("/cast [@pet] Redirecionar");
- }
- if (ObjectManager.Me.HaveBuff(82926) && Aimed_Shot.IsSpellUsable && Aimed_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(19434);
- // Aimed_Shot.Launch();
- }
- if (ObjectManager.Me.HaveBuff(82897))
- {
- Kill_Command.Launch();
- }
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood && !ObjectManager.Target.HaveBuff(1978))
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && Serpent_Sting_debuff.IsReady && Arcane_Shot.IsDistanceGood)
- {
- Serpent_Sting_debuff = new Timer(2000);
- Serpent_Sting.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && !Serpent_Sting_debuff.IsReady)
- {
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- Kill_Shot.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- Kill_Command.Launch();
- }
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) && Snake_Trap.IsSpellUsable && Arcane_Shot.IsDistanceGood && !ObjectManager.Target.GetMove && Trap_Launcher.KnownSpell && look.IsReady)
- {
- traplaunchertimer = new Timer(1000);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Snake_Trap.KnownSpell && Snake_Trap.IsSpellUsable && Trap_Launcher.HaveBuff)
- {
- SpellManager.CastSpellByIDAndPosition(34600, ObjectManager.Target.Position);
- }
- }
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (Scatter_Shot.KnownSpell && Scatter_Shot.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 2)
- {
- Scatter_Shot.Launch();
- }
- if (ObjectManager.Me.BarTwoPercentage > 44 && ObjectManager.Target.HaveBuff(1978))
- {
- if (Multi_Shot.KnownSpell && Multi_Shot.IsSpellUsable && Multi_Shot.IsDistanceGood && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(2643);
- // Multi_Shot.Launch();
- }
- if (Chimera_Shot.KnownSpell && Chimera_Shot.IsSpellUsable && Chimera_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53209);
- // Chimera_Shot.Launch();
- }
- if (Aimed_Shot.KnownSpell && Aimed_Shot.IsSpellUsable && Aimed_Shot.IsDistanceGood && !Chimera_Shot.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(19434);
- // Aimed_Shot.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood && !Chimera_Shot.IsSpellUsable && !Aimed_Shot.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- }
- if (ObjectManager.Me.BarTwoPercentage < 50 && ObjectManager.Target.HaveBuff(1978))
- {
- if (Steady_Shot.KnownSpell && Steady_Shot.IsSpellUsable && Steady_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(56641);
- // Steady_Shot.Launch();
- }
- }
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable &&
- ObjectManager.Target.IsCast && ObjectManager.Target.GetDistance < 8)
- {
- Arcane_Torrent.Launch();
- }
- if (Silencing_Shot.KnownSpell && Silencing_Shot.IsSpellUsable && Silencing_Shot.IsDistanceGood &&
- ObjectManager.Target.IsCast)
- {
- Silencing_Shot.Launch();
- }
- }
- private void pet()
- {
- if (ObjectManager.Me.IsMounted || !mountchill.IsReady) return;
- if ((ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0) &&
- !ObjectManager.Me.IsMounted && !ObjectManager.Me.IsDeadMe)
- {
- Call_Pet.Launch();
- Thread.Sleep(1000);
- if (!ObjectManager.Pet.IsAlive)
- {
- Revive_Pet.Launch();
- Thread.Sleep(1000);
- }
- }
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Fight.InFight) Lua.RunMacroText("/petattack");
- }
- private void buffinfight()
- {
- if (!Fight.InFight) return;
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- Stoneform.KnownSpell && Stoneform.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20594);
- // Stoneform.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- War_Stomp.KnownSpell && War_Stomp.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20549);
- // War_Stomp.Launch();
- }
- if (Berserking.KnownSpell && Berserking.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(1454);
- // Berserking.Launch();
- }
- if (Rapid_Fire.KnownSpell && Rapid_Fire.IsSpellUsable && (hardmob() || ObjectManager.GetNumberAttackPlayer() > 2) && Arcane_Shot.IsDistanceGood)
- {
- Rapid_Fire.Launch();
- }
- if (Readiness.KnownSpell && Readiness.IsSpellUsable && (hardmob() || ObjectManager.GetNumberAttackPlayer() > 2) && Arcane_Shot.IsDistanceGood &&
- !Rapid_Fire.IsSpellUsable && !Chimera_Shot.IsSpellUsable)
- {
- Readiness.Launch();
- }
- }
- private void selfheal()
- {
- if (ObjectManager.Me.HealthPercent < 80 &&
- Lifeblood.KnownSpell && Lifeblood.IsSpellUsable)
- {
- Lifeblood.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 80 &&
- Gift_of_the_Naaru.KnownSpell && Gift_of_the_Naaru.IsSpellUsable)
- {
- Gift_of_the_Naaru.Launch();
- }
- if (Disengage.KnownSpell && Disengage.IsSpellUsable && Disengage.IsDistanceGood &&
- ObjectManager.Target.HealthPercent > 30 && ObjectManager.Target.GetDistance < 5)
- {
- disengagetimer = new Timer(2000);
- while (ObjectManager.Target.GetDistance < 5 && !disengagetimer.IsReady)
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- SpellManager.CastSpellByIdLUA(781);
- // Disengage.Launch();
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- return;
- }
- if (ObjectManager.Target.GetDistance < 10 && ((Disengage.KnownSpell && !Disengage.IsSpellUsable) || !Disengage.KnownSpell))
- {
- disengagetimer = new Timer(5000);
- while (ObjectManager.Target.GetDistance < 10 || !disengagetimer.IsReady)
- {
- if (!Fight.InFight) return;
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "S");
- Thread.Sleep(100);
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- if (ObjectManager.Me.HaveBuff(82926) && Aimed_Shot.IsSpellUsable && Aimed_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(19434);
- // Aimed_Shot.Launch();
- }
- if (Raptor_Strike.KnownSpell && Raptor_Strike.IsSpellUsable && Raptor_Strike.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(2973);
- // Raptor_Strike.Launch();
- }
- if (Kill_Command.KnownSpell && Kill_Command.IsSpellUsable && Kill_Command.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(34026);
- // Kill_Command.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Chimera_Shot.KnownSpell && Chimera_Shot.IsSpellUsable && Chimera_Shot.IsDistanceGood && ObjectManager.Me.BarTwoPercentage > 70)
- {
- SpellManager.CastSpellByIdLUA(53209);
- // Chimera_Shot.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood && !Chimera_Shot.IsSpellUsable && ObjectManager.Me.BarTwoPercentage > 70)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable)
- {
- Feign_Death.Launch();
- Thread.Sleep(3000);
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (Scatter_Shot.KnownSpell && Scatter_Shot.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- Scatter_Shot.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 30 && ObjectManager.Target.IsTargetingMe)
- {
- if (!Feign_Death.IsSpellUsable && !Scatter_Shot.IsSpellUsable && Deterrence.KnownSpell && Deterrence.KnownSpell)
- {
- Deterrence.Launch();
- }
- }
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "{SPACE}");
- }
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 30 && ObjectManager.Pet.Health > 10)
- {
- Feign_Death.Launch();
- Thread.Sleep(2500);
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 15 && (ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0))
- {
- Feign_Death.Launch();
- Lua.RunMacroText("/cleartarget");
- Thread.Sleep(30000);
- }
- }
- public bool hardmob()
- {
- if (((ObjectManager.Target.MaxHealth * 100) / ObjectManager.Me.MaxHealth) > 110)
- {
- return true;
- }
- return false;
- }
- }
- public class BeastMaster
- {
- #region InitializeSpell
- // Beast Mastery only
- Spell Beastial_Wrath = new Spell("Beastial Wrath");
- Spell Focus_Fire = new Spell("Focus Fire");
- Spell Intimidation = new Spell("Intimidation");
- // Beast master with a Spirit Beast only
- Spell Spirit_Mend = new Spell("Spirit Mend");
- // DPS
- Spell Raptor_Strike = new Spell("Raptor Strike");
- Spell Arcane_Shot = new Spell("Arcane Shot");
- Spell Steady_Shot = new Spell("Steady Shot");
- Spell Serpent_Sting = new Spell("Serpent Sting");
- Spell Multi_Shot = new Spell("Multi-Shot");
- Spell Kill_Shot = new Spell("Kill Shot");
- Spell Explosive_Trap = new Spell("Explosive Trap");
- Spell Cobra_Shot = new Spell("Cobra Shot");
- Spell Immolation_Trap = new Spell("Immolation Trap");
- // BUFF & HELPING
- Spell Concussive_Shot = new Spell("Concussive Shot");
- Spell Aspect_of_the_Hawk = new Spell("Aspect of the Hawk");
- Spell Disengage = new Spell("Disengage");
- Spell Hunters_Mark = new Spell("Hunter's Mark");
- Spell Scatter_Shot = new Spell("Scatter Shot"); // 19503
- Spell Feign_Death = new Spell("Feign Death"); // 5384
- Spell Snake_Trap = new Spell("Snake Trap");
- Spell Ice_Trap = new Spell("Ice Trap");
- Spell Freezing_Trap = new Spell("Freezing Trap");
- Spell Trap_Launcher = new Spell("Trap Launcher"); // 77769
- Spell Rapid_Fire = new Spell("Rapid Fire"); // 3045
- Spell Misdirection = new Spell("Misdirection");
- Spell Deterrence = new Spell("Deterrence"); // 19263
- Spell Wing_Clip = new Spell("Wing Clip");
- // PET
- Spell Kill_Command = new Spell("Kill Command");
- Spell Mend_Pet = new Spell("Mend Pet"); // 136
- Spell Revive_Pet = new Spell("Revive Pet"); // 982
- Spell Call_Pet = new Spell("Call Pet 1"); // 883
- // TIMER
- Timer look = new Timer(0);
- Timer fighttimer = new Timer(0);
- Timer petheal = new Timer(0);
- Timer traplaunchertimer = new Timer(0);
- Timer disengagetimer = new Timer(0);
- Timer Serpent_Sting_debuff = new Timer(0);
- Timer mountchill = new Timer(0);
- // Profession & Racials
- Spell Arcane_Torrent = new Spell("Arcane Torrent");
- Spell Lifeblood = new Spell("Lifeblood");
- Spell Stoneform = new Spell("Stoneform");
- Spell Tailoring = new Spell("Tailoring");
- Spell Leatherworking = new Spell("Leatherworking");
- Spell Gift_of_the_Naaru = new Spell("Gift of the Naaru");
- Spell War_Stomp = new Spell("War Stomp");
- Spell Berserking = new Spell("Berserking");
- #endregion InitializeSpell
- public BeastMaster()
- {
- Main.range = 30.0f;
- UInt64 lastTarget = 0;
- while (Main.loop)
- {
- if (!ObjectManager.Me.IsMounted)
- {
- buffoutfight();
- if (!Fight.InFight && look.IsReady)
- {
- look = new Timer(5000);
- Lua.RunMacroText("/targetfriendplayer");
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0 && ObjectManager.Target.GetDistance > Main.range)
- {
- fighttimer = new Timer(60000);
- }
- if (Fight.InFight && ObjectManager.Me.Target > 0)
- {
- if (ObjectManager.Me.Target != lastTarget && ObjectManager.Target.GetDistance <= Main.range)
- {
- pull();
- lastTarget = ObjectManager.Me.Target;
- }
- fight();
- if (!Fight.InFight)
- {
- Logging.WriteFight(" - Target Down - ");
- look = new Timer(5000);
- }
- if (fighttimer.IsReady && ObjectManager.Target.HealthPercent > 90 && ObjectManager.Me.Target > 0 && ObjectManager.GetNumberAttackPlayer() < 2)
- {
- Logging.WriteFight(" - Target Evading - ");
- break;
- }
- }
- }
- if (ObjectManager.Me.IsMounted) mountchill = new Timer(2000);
- Thread.Sleep(350);
- }
- }
- public void pull()
- {
- if (hardmob())
- Logging.WriteFight(" - Pull Hard Mob - ");
- else
- Logging.WriteFight(" - Pull Easy Mob - ");
- fighttimer = new Timer(60000);
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- }
- public void buffoutfight()
- {
- if (Fight.InFight || ObjectManager.Me.IsDeadMe) return;
- pet();
- if (!ObjectManager.Me.HaveBuff(79640) &&
- ItemsManager.GetItemCountByIdLUA(58149) == 1)
- {
- Logging.WriteFight("Use Alchi Flask");
- Lua.RunMacroText("/use item:58149");
- }
- if (Aspect_of_the_Hawk.KnownSpell && Aspect_of_the_Hawk.IsSpellUsable &&
- !Aspect_of_the_Hawk.HaveBuff)
- {
- SpellManager.CastSpellByIdLUA(13165);
- // Aspect_of_the_Hawk.Launch();
- }
- }
- public void fight()
- {
- pet();
- selfheal();
- buffinfight();
- if (ObjectManager.GetNumberAttackPlayer() > 1) fighttimer = new Timer(60000);
- if (ObjectManager.GetNumberAttackPlayer() > 2 && Explosive_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Explosive_Trap.KnownSpell && Explosive_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13813, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && Trap_Launcher.IsSpellUsable && Arcane_Shot.IsDistanceGood &&
- !ObjectManager.Target.IsTargetingMe && ObjectManager.Target.HealthPercent > 70)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Immolation_Trap.KnownSpell && Immolation_Trap.IsSpellUsable)
- {
- SpellManager.CastSpellByIDAndPosition(13795, ObjectManager.Target.Position);
- }
- }
- }
- if (ObjectManager.GetNumberAttackPlayer() < 2 && Immolation_Trap.IsSpellUsable && !Trap_Launcher.KnownSpell && Arcane_Shot.IsDistanceGood)
- {
- Immolation_Trap.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Hunters_Mark.KnownSpell && Hunters_Mark.IsSpellUsable && Hunters_Mark.IsDistanceGood && !Hunters_Mark.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(1130);
- // Hunters_Mark.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 2 || hardmob()) && Misdirection.KnownSpell && Misdirection.IsSpellUsable)
- {
- Lua.RunMacroText("/cast [@pet] Misdirection");
- Lua.RunMacroText("/cast [@pet] Irreführung");
- Lua.RunMacroText("/cast [@pet] Détournement");
- Lua.RunMacroText("/cast [@pet] ???????????????");
- Lua.RunMacroText("/cast [@pet] Redirección");
- Lua.RunMacroText("/cast [@pet] Redirecionar");
- }
- if (Focus_Fire.KnownSpell && Focus_Fire.IsSpellUsable && ObjectManager.Pet.BuffStack(19615) == 5) // Frenzy Effect
- {
- SpellManager.CastSpellByIdLUA(82692);
- // Focus_Fire.Launch();
- }
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood && !ObjectManager.Target.HaveBuff(1978))
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && Serpent_Sting_debuff.IsReady && Arcane_Shot.IsDistanceGood)
- {
- Serpent_Sting_debuff = new Timer(2500);
- Serpent_Sting.Launch();
- }
- if (!ObjectManager.Target.HaveBuff(1978) && !Serpent_Sting_debuff.IsReady)
- {
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- Kill_Shot.Launch();
- }
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) && Snake_Trap.IsSpellUsable && Arcane_Shot.IsDistanceGood && !ObjectManager.Target.GetMove && Trap_Launcher.KnownSpell)
- {
- traplaunchertimer = new Timer(1100);
- Trap_Launcher.Launch();
- while (!traplaunchertimer.IsReady)
- {
- if (Snake_Trap.KnownSpell && Snake_Trap.IsSpellUsable && Trap_Launcher.HaveBuff)
- {
- SpellManager.CastSpellByIDAndPosition(34600, ObjectManager.Target.Position);
- }
- }
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (ObjectManager.Target.HaveBuff(1978))
- {
- if (Multi_Shot.KnownSpell && Multi_Shot.IsSpellUsable && Multi_Shot.IsDistanceGood && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(2643);
- // Multi_Shot.Launch();
- }
- if (Kill_Command.KnownSpell && Kill_Command.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(34026);
- // Kill_Command.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- }
- if (ObjectManager.Me.BarTwoPercentage < 70 && ObjectManager.Target.HaveBuff(1978))
- {
- if (Steady_Shot.KnownSpell && Steady_Shot.IsSpellUsable && Steady_Shot.IsDistanceGood && !Cobra_Shot.KnownSpell)
- {
- SpellManager.CastSpellByIdLUA(56641);
- // Steady_Shot.Launch();
- }
- else if (Cobra_Shot.KnownSpell && Cobra_Shot.IsSpellUsable && Cobra_Shot.IsDistanceGood && ObjectManager.Target.HaveBuff(1978))
- {
- SpellManager.CastSpellByIdLUA(77767);
- // Cobra_Shot.Launch();
- }
- }
- if (Arcane_Torrent.KnownSpell && Arcane_Torrent.IsSpellUsable &&
- ObjectManager.Target.IsCast && ObjectManager.Target.GetDistance < 8)
- {
- Arcane_Torrent.Launch();
- }
- }
- private void pet()
- {
- if (ObjectManager.Me.IsMounted || !mountchill.IsReady) return;
- if ((ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0) &&
- !ObjectManager.Me.IsMounted && !ObjectManager.Me.IsDeadMe)
- {
- Call_Pet.Launch();
- Thread.Sleep(1000);
- if (!ObjectManager.Pet.IsAlive)
- {
- Revive_Pet.Launch();
- Thread.Sleep(1000);
- }
- }
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Fight.InFight) Lua.RunMacroText("/petattack");
- }
- private void buffinfight()
- {
- if (!Fight.InFight) return;
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- Intimidation.KnownSpell && Intimidation.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(19577);
- // Intimidation.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- Stoneform.KnownSpell && Stoneform.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20594);
- // Stoneform.Launch();
- }
- if ((ObjectManager.GetNumberAttackPlayer() > 1 || hardmob()) &&
- ObjectManager.Me.HealthPercent < 65 &&
- ObjectManager.Target.GetDistance < 5 &&
- War_Stomp.KnownSpell && War_Stomp.IsSpellUsable)
- {
- SpellManager.CastSpellByIdLUA(20549);
- // War_Stomp.Launch();
- }
- if (Berserking.KnownSpell && Berserking.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(1454);
- // Berserking.Launch();
- }
- if (Rapid_Fire.KnownSpell && Rapid_Fire.IsSpellUsable && (hardmob() || ObjectManager.GetNumberAttackPlayer() > 2) && Arcane_Shot.IsDistanceGood)
- {
- Rapid_Fire.Launch();
- }
- }
- private void selfheal()
- {
- if (ObjectManager.Me.HealthPercent < 80 &&
- Lifeblood.KnownSpell && Lifeblood.IsSpellUsable)
- {
- Lifeblood.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 80 &&
- Gift_of_the_Naaru.KnownSpell && Gift_of_the_Naaru.IsSpellUsable)
- {
- Gift_of_the_Naaru.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 80 &&
- Spirit_Mend.KnownSpell && Spirit_Mend.IsSpellUsable)
- {
- Lua.RunMacroText("/target " + ObjectManager.Me.Name);
- SpellManager.CastSpellByIdLUA(90361);
- Lua.RunMacroText("/targetlasttarget");
- }
- if (Disengage.KnownSpell && Disengage.IsSpellUsable && Disengage.IsDistanceGood &&
- ObjectManager.Target.HealthPercent > 30 && ObjectManager.Target.GetDistance < 5)
- {
- disengagetimer = new Timer(2000);
- while (ObjectManager.Target.GetDistance < 5 && !disengagetimer.IsReady)
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- SpellManager.CastSpellByIdLUA(781);
- // Disengage.Launch();
- if (Concussive_Shot.KnownSpell && Concussive_Shot.IsSpellUsable && Concussive_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(5116);
- // Concussive_Shot.Launch();
- }
- return;
- }
- if (ObjectManager.Target.GetDistance < 10 && ((Disengage.KnownSpell && !Disengage.IsSpellUsable) || !Disengage.KnownSpell))
- {
- disengagetimer = new Timer(5000);
- while (ObjectManager.Target.GetDistance < 10 || !disengagetimer.IsReady)
- {
- if (!Fight.InFight) return;
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "S");
- Thread.Sleep(100);
- if (Mend_Pet.KnownSpell && Mend_Pet.IsSpellUsable && petheal.IsReady &&
- ObjectManager.Pet.Health > 0 && ObjectManager.Pet.HealthPercent < 70)
- {
- petheal = new Timer(9000);
- Mend_Pet.Launch();
- }
- if (Kill_Command.KnownSpell && Kill_Command.IsSpellUsable && Kill_Command.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(34026);
- // Kill_Command.Launch();
- }
- if (Wing_Clip.KnownSpell && Wing_Clip.IsSpellUsable && Wing_Clip.IsDistanceGood && !Wing_Clip.TargetHaveBuff)
- {
- SpellManager.CastSpellByIdLUA(2974);
- // Wing_Clip.Launch();
- }
- if (Raptor_Strike.KnownSpell && Raptor_Strike.IsSpellUsable && Raptor_Strike.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(2973);
- // Raptor_Strike.Launch();
- }
- if (Kill_Shot.KnownSpell && Kill_Shot.IsSpellUsable && Kill_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(53351);
- // Kill_Shot.Launch();
- }
- if (Arcane_Shot.KnownSpell && Arcane_Shot.IsSpellUsable && Arcane_Shot.IsDistanceGood)
- {
- SpellManager.CastSpellByIdLUA(3044);
- // Arcane_Shot.Launch();
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable)
- {
- Feign_Death.Launch();
- Thread.Sleep(3000);
- }
- if (Freezing_Trap.KnownSpell && Freezing_Trap.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- SpellManager.CastSpellByIdLUA(1499);
- // Freezing_Trap.Launch();
- }
- if (Scatter_Shot.KnownSpell && Scatter_Shot.IsSpellUsable && ObjectManager.GetNumberAttackPlayer() > 1)
- {
- Scatter_Shot.Launch();
- }
- if (ObjectManager.Me.HealthPercent < 30 && ObjectManager.Target.IsTargetingMe)
- {
- if (!Feign_Death.IsSpellUsable && !Scatter_Shot.IsSpellUsable && Deterrence.KnownSpell && Deterrence.KnownSpell)
- {
- Deterrence.Launch();
- }
- }
- Keyboard.DownKey(nManager.Wow.Memory.WowProcess.MainWindowHandle, "{SPACE}");
- }
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 15 && ObjectManager.Pet.Health > 10)
- {
- Feign_Death.Launch();
- Thread.Sleep(3000);
- }
- if (Feign_Death.KnownSpell && Feign_Death.IsSpellUsable && ObjectManager.Me.HealthPercent < 15 && (ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0))
- {
- Feign_Death.Launch();
- Lua.RunMacroText("/cleartarget");
- Thread.Sleep(30000);
- }
- }
- public bool hardmob()
- {
- if (((ObjectManager.Target.MaxHealth * 100) / ObjectManager.Me.MaxHealth) > 130)
- {
- return true;
- }
- return false;
- }
- }
- #endregion
Add Comment
Please, Sign In to add comment