public static void Rest() { while (ObjectManager.Me.HealthPercentage < 80 && ObjectManager.Me.ManaPercentage < 80) { Thread.Sleep(300); Console.WriteLine("Rest"); if (ObjectManager.Me.HealthPercentage < 30) { BotUtils.CastSpell(SharmenSpells.HEALING_SURGE); Thread.Sleep(1500); } if (ObjectManager.Me.Combat || BotUtils.getMobsWithBeef().Count > 0) { break; } } }
public static void Combat() { int a = 0; while (BotUtils.getMobsWithBeef().Count > 0) { //Console.Clear(); List <WowUnit> sortedBeefMobs = BotUtils.getMobsWithBeef().OrderBy(unit => unit.HealthPercentage).ToList(); if (sortedBeefMobs.Count == 0) { break; } WowUnit lowestHPEnemy = sortedBeefMobs[0]; WorldUtils.TargetUnit(lowestHPEnemy); BotUtils.StopMovement(); BotUtils.LookAtUnit(lowestHPEnemy); //BotUtils.AttackUnit(lowestHPEnemy); // Spell if (ObjectManager.Me.HealthPercentage < 30) { BotUtils.CastSpell(SharmenSpells.WAR_STOMP); Thread.Sleep(100); BotUtils.CastSpell(SharmenSpells.HEALING_SURGE); Thread.Sleep(500); } else { if (ObjectManager.Me.Mana > 14) // 2 heals { if (!BotUtils.IsOnCooldown(SharmenSpells.PRIMAL_STRIKE)) { BotUtils.CastSpell(SharmenSpells.PRIMAL_STRIKE); Thread.Sleep(200); } else { if (lowestHPEnemy.HealthPercentage > 35) { BotUtils.CastSpell(SharmenSpells.LIGHTNING_BOLT); Thread.Sleep(1800); } else { BotUtils.CastSpell(SharmenSpells.EARTH_SHOCK); } } } } if (!lootUnits.Contains(lowestHPEnemy)) { Console.WriteLine("Added New Enemy To Loot: " + lowestHPEnemy.Name); lootUnits.Enqueue(lowestHPEnemy); } Thread.Sleep(200); } }