public void ShootDown(WoWUnit Unit) { // Quick and dirty, Try and Error to find out if I could shoot or throw while (!Unit.Dead) { if (SpellManager.HasSpell("Throw") && SpellManager.CanCast("Throw")) { RarekillerSpells.CastSafe("Throw", Unit, true); Logging.WriteDebug("Rarekiller Part Shootdown: Throw"); } if (SpellManager.HasSpell("Shoot") && SpellManager.CanCast("Shoot")) { RarekillerSpells.CastSafe("Shoot", Unit, true); Logging.WriteDebug("Rarekiller Part Shootdown: Shoot"); } if (Rarekiller.Settings.TestShootMob && SpellManager.HasSpell("Lightning Bolt") && SpellManager.CanCast("Lightning Bolt")) { RarekillerSpells.CastSafe("Lightning Bolt", Unit, true); Logging.WriteDebug("Rarekiller Part Shootdown: Lightning Bolt"); } if (SpellManager.HasSpell("Heroic Throw") && SpellManager.CanCast("Heroic Throw")) { RarekillerSpells.CastSafe("Heroic Throw", Unit, true); Logging.WriteDebug("Rarekiller Part Shootdown: Heroic Throw"); } if (SpellManager.HasSpell("Deadly Throw") && SpellManager.CanCast("Deadly Throw")) { RarekillerSpells.CastSafe("Deadly Throw", Unit, true); Logging.WriteDebug("Rarekiller Part Shootdown: Deadly Throw"); } } }
public void ShamanKill(WoWUnit Unit) { if (Me.HealthPercent < 10 && SpellManager.HasSpell("Healing Surge")) { while (Me.HealthPercent < 30 && SpellManager.HasSpell("Healing Surge")) { RarekillerSpells.CastSafe("Healing Surge", Me, true); Thread.Sleep(100); } } if (Me.HealthPercent < 30 && SpellManager.HasSpell("Greater Healing Wave")) { while (Me.HealthPercent < 50 && SpellManager.HasSpell("Greater Healing Wave")) { RarekillerSpells.CastSafe("Greater Healing Wave", Me, true); Thread.Sleep(100); } } // -------- Damage if (SpellManager.HasSpell("Flame Shock") && !SpellManager.Spells["Flame Shock"].Cooldown && !Unit.ActiveAuras.ContainsKey("Flame Shock")) { RarekillerSpells.CastSafe("Flame Shock", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Stormstrike") && !SpellManager.Spells["Stormstrike"].Cooldown) { RarekillerSpells.CastSafe("Stormstrike", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Lava Lash") && !SpellManager.Spells["Lava Lash"].Cooldown) { RarekillerSpells.CastSafe("Lava Lash", Unit, true); Thread.Sleep(100); return; } if (!SpellManager.HasSpell("Lava Lash") && SpellManager.HasSpell("Lava Burst") && !SpellManager.Spells["Lava Burst"].Cooldown) { RarekillerSpells.CastSafe("Lava Burst", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Lightning Bolt") && !SpellManager.Spells["Lightning Bolt"].Cooldown) { RarekillerSpells.CastSafe("Lightning Bolt", Unit, true); Thread.Sleep(100); return; } }
public void HunterKill(WoWUnit Unit) { //Survival Hunter if (SpellManager.HasSpell("Explosive Shot")) { if (SpellManager.HasSpell("Kill Shot") && !SpellManager.Spells["Kill Shot"].Cooldown && Unit.HealthPercent < 20 && !Unit.Dead) { RarekillerSpells.CastSafe("Kill Shot", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Rapid Fire") && !SpellManager.Spells["Rapid Fire"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Rapid Fire", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Serpent Sting") && !SpellManager.Spells["Serpent Sting"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Serpent Sting", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Black Arrow") && !SpellManager.Spells["Black Arrow"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Black Arrow", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Explosive Shot") && !SpellManager.Spells["Explosive Shot"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Explosive Shot", Unit, true); Thread.Sleep(100); } } else { if (SpellManager.HasSpell("Kill Shot") && !SpellManager.Spells["Kill Shot"].Cooldown && Unit.HealthPercent < 20 && !Unit.Dead) { RarekillerSpells.CastSafe("Kill Shot", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Rapid Fire") && !SpellManager.Spells["Rapid Fire"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Rapid Fire", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Arcane Shot") && !SpellManager.Spells["Arcane Shot"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Arcane Shot", Unit, true); Thread.Sleep(100); } } }
public void RogueKill(WoWUnit Unit) { if (SpellManager.HasSpell("Revealing Strike") && !SpellManager.Spells["Revealing Strike"].Cooldown && !Unit.Dead && (Me.ComboPoints > 4)) { RarekillerSpells.CastSafe("Revealing Strike", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Eviscerate") && !SpellManager.Spells["Eviscerate"].Cooldown && !Unit.Dead && (Me.ComboPoints > 4)) { RarekillerSpells.CastSafe("Eviscerate", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Sinister Strike") && !SpellManager.Spells["Sinister Strike"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Sinister Strike", Unit, true); Thread.Sleep(100); return; } }
/// <summary> /// Function to Find and Kill Dormus /// </summary> public void findAndKillDormus() { bool CastSuccess = false; //Testcases --> 51756 = Blutelfenjunge --> 52008 = Resortangestellter --> 50245 = Dormus int IDDormus = 50245; //Testcases --> 6346 = Fear Ward --> 974 = Earthsschild --> Dormus' Rage = 93269 int IDDormusAura = 93269; ObjectManager.Update(); WoWUnit Dormus = ObjectManager.GetObjectsOfType <WoWUnit>().Where(u => u.Entry == IDDormus).OrderBy(u => u.Distance).FirstOrDefault(); #region Move to Dormus Helperpoint while (Me.HasAura(IDDormusAura) && Dormus == null && !Me.Combat && Me.Location.Distance(DormusPoint) > 5 && Me.Location.Distance(DormusPoint) < 500) { WoWMovement.ClickToMove(DormusPoint); Logging.Write(Colors.MediumPurple, "Rarekiller: Dormus not in sight, Swim to Dormus Helper Point"); Thread.Sleep(500); ObjectManager.Update(); Dormus = ObjectManager.GetObjectsOfType <WoWUnit>().Where(u => u.Entry == IDDormus).OrderBy(u => u.Distance).FirstOrDefault(); } #endregion if (Dormus != null) { if (!Dormus.IsDead) { Logging.WriteQuiet(Colors.MediumPurple, "Rarekiller: Find {0}", Dormus.Name); if (Rarekiller.Settings.Alert) { Rarekiller.Alert(); } Dormus.Target(); #region Move to Dormus // ------------- Move to Dormus with Klick to Move ------------------- while (DormusPoint.Distance(Me.Location) > 5 && Me.HasAura(IDDormusAura) && !Dormus.IsDead && !Rarekiller.Settings.ReachedDormusHelperpoint) { WoWMovement.ClickToMove(DormusPoint); Thread.Sleep(100); Logging.Write(Colors.MediumPurple, "Rarekiller: Move out of Water to Helperpoint"); if (Rarekiller.ToonInvalidCombat) { return; } } Logging.Write(Colors.MediumPurple, "Rarekiller: Reached Dormus Helperpoint"); Rarekiller.Settings.ReachedDormusHelperpoint = true; while (Dormus.Location.Distance(Me.Location) > 3 && Me.HasAura(IDDormusAura) && !Dormus.IsDead) { if (Navigator.CanNavigateFully(Me.Location, Dormus.Location)) { Navigator.MoveTo(Dormus.Location); } else { Logging.Write(Colors.MediumPurple, "Rarekiller: Navigation Issue, use Click to Move"); WoWMovement.ClickToMove(Dormus.Location); } Thread.Sleep(100); Logging.Write(Colors.MediumPurple, "Rarekiller: Move to Dormus"); if (Rarekiller.ToonInvalidCombat) { return; } } WoWMovement.MoveStop(); #endregion #region Pull Dormus // ------------- pull Dormus ------------------- Logging.Write(Colors.MediumPurple, "Rarekiller: Distance: {0}", Dormus.Location.Distance(Me.Location)); Dormus.Target(); Dormus.Face(); Thread.Sleep(100); if (!(Rarekiller.Settings.DefaultPull) && SpellManager.HasSpell(Rarekiller.Settings.Pull)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Settings.Pull, Dormus, false); } //CastSuccess = SpellManager.Cast(Rarekiller.Settings.Pull, Dormus); else if (SpellManager.HasSpell(Rarekiller.Spells.FastPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.FastPullspell, Dormus, false); } //CastSuccess = SpellManager.Cast(Rarekiller.Spells.FastPullspell, Dormus); else { Logging.Write(Colors.MediumPurple, "Rarekiller: I have no Pullspell"); } if (!CastSuccess && SpellManager.HasSpell("Shoot")) { CastSuccess = RarekillerSpells.CastSafe("Shoot", Dormus, true); } //CastSuccess = SpellManager.Cast("Shoot", Dormus); if (CastSuccess) { Logging.Write(Colors.MediumPurple, "Rarekiller: successfully pulled Dormus"); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Pull Distance: {0}", Dormus.Location.Distance(Me.Location)); return; } else if (!CastSuccess && Me.Combat) { Logging.Write(Colors.MediumPurple, "Rarekiller: got Aggro"); } else { Logging.Write(Colors.MediumPurple, "Rarekiller: Pull Fails --> next try"); } #endregion } else if (!Blacklist.Contains(Dormus.Guid, Rarekiller.Settings.Flags)) { if (Dormus.CanLoot) { if (!Rarekiller.Loothelper(Dormus)) { return; } } if (!Blacklist.Contains(Dormus.Guid, Rarekiller.Settings.Flags)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but sadly he's dead", Dormus.Name); Blacklist.Add(Dormus.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(Colors.MediumPurple, "Rarekiller: Blacklist Unit for 60 Minutes."); } } } }
public void findAndKillMob() { bool CastSuccess = false; int loothelper = 0; if (Rarekiller.Settings.DeveloperLogs) { Logging.WriteDebug("Rarekiller: Scan for Rare Mob"); } // ----------------- Generate a List with all wanted Rares found in Object Manager --------------------- ObjectManager.Update(); List <WoWUnit> objList = ObjectManager.GetObjectsOfType <WoWUnit>() .Where(o => ( (Rarekiller.Settings.CATA && ((o.Entry == 50057) || // Blazewing Hyjal (o.Entry == 50053) || // Thartuk the Exile Hyjal (o.Entry == 50050) || // Shok'sharak Vashir (o.Entry == 50005) || // Poseidus Vashir (o.Entry == 50052) || // Burgy Blackheart Vashir (o.Entry == 49913) || // Lady La-La Vashir (o.Entry == 50060) || // Terborus Tiefenheim (o.Entry == 50059) || // Golgarok Tiefenheim (o.Entry == 49822) || // Jadefang Tiefenheim (o.Entry == 50065) || // Armagedillo Uldum (o.Entry == 50064) || // Cyrus the Black Uldum (o.Entry == 50085) || // Overlord Sunderfury Twilight Higlands (o.Entry == 50086))) || // Tarvus the Vile Twilight Higlands (Rarekiller.Settings.Aeonaxx && (((o.Entry == 3868) && Rarekiller.Settings.BloodseekerSearch) // Blood Seeker for Aeonaxx )) || // Aeonaxx hostile || (o.Entry == 51236) (Rarekiller.Settings.Poseidus && ((o.Entry == 50005) || // Poseidus (o.Entry == 9999999))) || // Platzhalter (Rarekiller.Settings.TLPD && ((o.Entry == 32491) || // Timelost Protodrake (o.Entry == 32630))) || // Vyragosa (Rarekiller.Settings.WOTLK && ((o.Entry == 32517) || // Loque'nahak (o.Entry == 32495) || // Hildana Deathstealer (o.Entry == 32358) || // Fumblub Gearwind (o.Entry == 32377) || // Perobas the Bloodthirster (o.Entry == 32398) || // King Ping (o.Entry == 32409) || // Crazed Indu'le Survivor (o.Entry == 32422) || // Grocklar (o.Entry == 32438) || // Syreian the Bonecarver (o.Entry == 32471) || // Griegen (o.Entry == 32481) || // Aotona (o.Entry == 32630) || // Vyragosa (o.Entry == 32487) || // Putridus the Ancient (o.Entry == 32501) || // High Thane Jorfus (o.Entry == 32357) || // Old Crystalbark (o.Entry == 32361) || // Icehorn (o.Entry == 32386) || // Vigdis the War Maiden (o.Entry == 32400) || // Tukemuth (o.Entry == 32417) || // Scarlet Highlord Daion (o.Entry == 32429) || // Seething Hate (o.Entry == 32447) || // Zul'drak Sentinel (o.Entry == 32475) || // Terror Spinner (o.Entry == 32485) || // King Krush (o.Entry == 32500))) || // Dirkee (Rarekiller.Settings.BC && ((o.Entry == 18695) || // Ambassador Jerrikar (o.Entry == 18697) || // Chief Engineer Lorthander (o.Entry == 18694) || // Collidus the Warp-Watcher (o.Entry == 18686) || // Doomslayer Jurim (o.Entry == 18678) || // Fulgorge (o.Entry == 18692) || // Hemathion (o.Entry == 18680) || // Marticar (o.Entry == 18690) || // Morcrush (o.Entry == 18685) || // Okrek (o.Entry == 18683) || // Voidhunter Yar (o.Entry == 18682) || // Bog Lurker (o.Entry == 18681) || // Coilfang Emissary (o.Entry == 18689) || // Crippler (o.Entry == 18698) || // Ever-Core the Punisher (o.Entry == 17144) || // Goretooth (o.Entry == 18696) || // Kraator (o.Entry == 18677) || // Mekthorg the Wild (o.Entry == 20932) || // Nuramoc (o.Entry == 18693) || // Speaker Mar'grom (o.Entry == 18679))) || // Vorakem Doomspeaker ((o.Level < Rarekiller.Settings.Level) && Rarekiller.Settings.LowRAR && (o.CreatureRank == Styx.WoWUnitClassificationType.Rare)) || // every single Rare Mob < Level 61 is hunted (Rarekiller.Settings.HUNTbyID && (o.Entry == Convert.ToInt64(Rarekiller.Settings.MobID))) // Hunt special IDs )) .OrderBy(o => o.Distance).ToList(); foreach (WoWUnit o in objList) { if (!o.Dead && !o.IsPet && !Blacklist.Contains(o.Guid)) { Logging.Write(System.Drawing.Color.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}", o.Name, o.Entry); //if ((o.Entry == 51236) && !Me.IsOnTransport) //{ // Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Find {0} ID {1}, but I don't mounted him", o.Name, o.Entry); // Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); // Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); // return; //} //else if (o.Entry == 51236) // return; if (o.Entry != 51236) { if (o.Level > (Me.Level + 4)) { Logging.Write("Rarekiller: His Level is 5 over mine, better not to kill him."); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (o.IsFriendly) { Logging.Write("Rarekiller: Find {0}, but he's friendly", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if ((o.Entry == 32630) && !Rarekiller.Settings.Vyragosa) { Logging.Write("Rarekiller: Config says: don't kill Vyragosa."); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 5 Minutes."); return; } if ((o.Entry == 50057) && !Rarekiller.Settings.Blazewing) { Logging.Write("Rarekiller: Config says: don't kill Blazewing."); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 5 Minutes."); return; } if ((o.Entry == 596) || (o.Entry == 599)) { // ----------------- Distancecheck because of the Spawn Place is Underground Logging.Write("Rarekiller: Don't run wild because of Instance Mobs."); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (((o.Entry == 49822) || (o.Entry == 50086) || (o.Entry == 2744)) && (Me.IsFlying || o.Location.Distance(Me.Location) > 30)) { // ----------------- Distancecheck because of the Spawn Place is Underground Logging.Write("Rarekiller: {0} is more then 20 yd away and Underground", o.Name); Logging.Write(System.Drawing.Color.MediumPurple, "Rarekiller: You have to place me next to him, if you want to hunt this Mob."); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 5 Minutes."); return; } if (Rarekiller.BlacklistMobsList.ContainsKey(Convert.ToInt32(o.Entry))) { Logging.Write("Rarekiller: {0} is Member of the BlacklistedMobs.xml", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 15 Minutes."); return; } if (Rarekiller.Settings.NotKillTameable && o.IsTameable) { return; } if (Rarekiller.inCombat) { Logging.Write("Rarekiller: ... but first I have to finish fighting another one."); return; } if (Me.IsOnTransport) { Logging.Write("Rarekiller: ... but I'm on a Transport."); return; } if ((o.Entry == 3868) && !Rarekiller.Settings.BloodseekerKill) { Rarekiller.Settings.Range = "35"; } // ----------------- Check if hunted Mob is tagged by another Player --------------------- if (Rarekiller.Settings.DontKillTagged) { if (o.TaggedByOther) { WoWMovement.MoveStop(); Logging.Write(System.Drawing.Color.Red, "Rarekiller: {0} is tagged by another player", o.Name); if (Rarekiller.Settings.BlacklistTagged) { Logging.Write("Rarekiller: -- I'm a nice Guy so let him have it"); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist2)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 2 Minutes."); return; } else { Logging.Write("Rarekiller: -- lets take a look who wins :)"); } } while (o.TaggedByOther && !o.Dead) { if (Rarekiller.inCombat) { return; } Thread.Sleep(1000); } if (o.Dead) { Logging.Write("Rarekiller: {0} was killed by another Player", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } } } if (Rarekiller.Settings.Alert) { if (File.Exists(Rarekiller.Settings.SoundfileFoundRare) && (o.Entry != 51236)) { new SoundPlayer(Rarekiller.Settings.SoundfileFoundRare).Play(); } else if (File.Exists(Rarekiller.Soundfile)) { new SoundPlayer(Rarekiller.Soundfile).Play(); } else { Logging.Write(System.Drawing.Color.Red, "Rarekiller: playing Soundfile failes"); } } while (Me.IsCasting) { Thread.Sleep(100); } // ----------------- Move to Mob Part --------------------- if (o.Entry != 51236) { if ((o.Entry == 49822) || (Rarekiller.Settings.GroundMountMode && (!(o.Entry == 50005) || // Poseidus Vashir !(o.Entry == 50052) || // Burgy Blackheart Vashir !(o.Entry == 49913) // Lady La-La Vashir ))) //In Vashir you have to use Flightor ! { ForceGround = true; } else { ForceGround = false; } Logging.Write("Rarekiller Part MoveTo: Move to target"); BlacklistTimer.Reset(); BlacklistTimer.Start(); Place = Me.ZoneId; if (Rarekiller.Settings.GroundMountMode && ((o.Entry == 33687) || (o.Entry == 32630) || (o.Entry == 32491) || (o.Entry == 50057) || (o.Entry == 50005) || (o.Entry == 50052) || (o.Entry == 49913))) { WoWPoint LastLocation = o.Location; while ((o.Location.Distance(Me.Location) > SpellManager.Spells[Rarekiller.Spells.FastPullspell].MaxRange) && !o.TaggedByOther && !o.Dead) { Logging.Write("Rarekiller: Try to hunt flying Mob {0} in Ground Mount Mode, maybe he comes in Range.", o.Name); o.Face(); Thread.Sleep(100); if (o.Location.Distance(Me.Location) > LastLocation.Distance(Me.Location)) { Logging.Write("Rarekiller: {0} is flying away", o.Name); if (!(o.Entry == 50005)) { Blacklist.Add(o.Guid, TimeSpan.FromSeconds(10)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 10 Seconds."); } return; } else { LastLocation = o.Location; } } } else { while (o.Location.Distance(Me.Location) > Convert.ToInt64(Rarekiller.Settings.Range)) { if (Rarekiller.Settings.GroundMountMode || ForceGround) { Navigator.MoveTo(o.Location); } else { Flightor.MoveTo(o.Location); } Thread.Sleep(100); if (BlacklistTimer.Elapsed.TotalSeconds > 20 && FirstTry) { Logging.Write(System.Drawing.Color.Red, "Rarekiller Part Rarekiller: Can't reach Mob {0} so try to dismount and walk", o.Name); WoWMovement.MoveStop(); Thread.Sleep(1000); //Descend to Land WoWMovement.Move(WoWMovement.MovementDirection.Descend); Thread.Sleep(2000); WoWMovement.MoveStop(); //Walk some Meters to avoid standing on a Tent WoWMovement.Move(WoWMovement.MovementDirection.StrafeLeft); Thread.Sleep(500); WoWMovement.MoveStop(); Thread.Sleep(1000); //Dismount if (Me.Auras.ContainsKey("Flight Form")) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted) { Lua.DoString("Dismount()"); } Thread.Sleep(300); ForceGround = true; FirstTry = false; BlacklistTimer.Reset(); BlacklistTimer.Start(); } if (Rarekiller.Settings.BlacklistCheck && !FirstTry && (BlacklistTimer.Elapsed.TotalSeconds > (Convert.ToInt32(Rarekiller.Settings.BlacklistTime)))) { Logging.Write(System.Drawing.Color.Red, "Rarekiller Part MoveTo: Can't reach Mob {0}, Blacklist and Move on", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 5 Minutes."); BlacklistTimer.Reset(); WoWMovement.MoveStop(); return; } if (Rarekiller.Settings.ZoneSave && (Me.ZoneId != Place)) { Logging.Write(System.Drawing.Color.Red, "Rarekiller Part MoveTo: Left Zone while move to {0} is not allowed", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 5 Minutes."); BlacklistTimer.Reset(); WoWMovement.MoveStop(); return; } } BlacklistTimer.Reset(); WoWMovement.MoveStop(); } // ----------------- another Check if hunted Mob is tagged by another Player --------------------- o.Target(); if (Rarekiller.Settings.DontKillTagged) { if (o.TaggedByOther) { Logging.Write(System.Drawing.Color.Red, "Rarekiller: {0} is tagged by another player", o.Name); if (Rarekiller.Settings.BlacklistTagged) { Logging.Write("Rarekiller: -- I'm a nice Guy so let him have it"); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist2)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 2 Minutes."); return; } else { Logging.Write("Rarekiller: -- lets take a look who wins :)"); } } while (o.TaggedByOther && !o.Dead) { if (Rarekiller.inCombat) { return; } Thread.Sleep(1000); } if (o.Dead) { Logging.Write("Rarekiller: {0} was killed by another Player", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } } if (Rarekiller.Settings.ScreenRarekiller && Rarekiller.Settings.ScreenFound) { Lua.DoString("TakeScreenshot()"); Thread.Sleep(300); Logging.WriteDebug("Rarekiller Part Rarekiller: Take Screenshot before Pull"); } Logging.WriteDebug("Rarekiller: Pull at Mob Location: {0} / {1} / {2}", Convert.ToString(o.X), Convert.ToString(o.Y), Convert.ToString(o.Z)); Logging.WriteDebug("Rarekiller: ... my Location: {0} / {1} / {2}", Convert.ToString(Me.X), Convert.ToString(Me.Y), Convert.ToString(Me.Z)); Logging.Write("Rarekiller: Target is Flying - {0}", o.IsFlying); // move closer again if (Rarekiller.Settings.GroundMountMode && ((o.Entry == 33687) || (o.Entry == 32630) || (o.Entry == 32491) || (o.Entry == 50057) || (o.Entry == 50005) || (o.Entry == 50052) || (o.Entry == 49913))) { o.Face(); } else { while (o.Location.Distance(Me.Location) > Convert.ToInt64(Rarekiller.Settings.Range)) { if (Rarekiller.Settings.GroundMountMode || ForceGround) { Navigator.MoveTo(o.Location); } else { Flightor.MoveTo(o.Location); } Thread.Sleep(100); } } //----------------- Dismount ----------------------- if (Me.IsFlying && !((o.Entry == 33687) || (o.Entry == 32630) || (o.Entry == 32491) || (o.Entry == 50057) || (o.Entry == 50005) || (o.Entry == 50052) || (o.Entry == 49913) || (o.Entry == 29753) || (o.Entry == 3868) || o.IsFlying)) { //Descend to Land WoWMovement.Move(WoWMovement.MovementDirection.Descend); Thread.Sleep(1000); if (Me.IsFlying && !Rarekiller.inCombat) { Thread.Sleep(1000); } WoWMovement.MoveStop(); //Dismount if (Me.Auras.ContainsKey("Flight Form")) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted) { Lua.DoString("Dismount()"); } Thread.Sleep(150); } } else { o.Target(); } // ----------------- Pull Part -------------------- ForceGround = false; FirstTry = true; if (!Me.Mounted && ((Me.Class == WoWClass.Hunter) || (Me.Class == WoWClass.Warlock))) { Lua.DoString(string.Format("RunMacroText(\"/petpassive\")"), 0); } if ((o.Entry == 3868) && !Rarekiller.Settings.BloodseekerKill) { while (!o.Dead) { WoWMovement.MoveStop(); o.Target(); o.Face(); Thread.Sleep(1000); } return; } if (!(Rarekiller.Settings.DefaultPull) && SpellManager.HasSpell(Rarekiller.Settings.Pull)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Settings.Pull, o, false); } else if (SpellManager.HasSpell(Rarekiller.Spells.FastPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.FastPullspell, o, false); } else if ((o.Entry != 32630) && (o.Entry != 32491) && (o.Entry != 33687) && (o.Entry != 50057) && SpellManager.HasSpell(Rarekiller.Spells.LowPullspell)) { if (Me.Auras.ContainsKey("Flight Form") && (o.Entry != 51236)) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted && (o.Entry != 51236)) { Lua.DoString("Dismount()"); } Thread.Sleep(150); WoWMovement.MoveStop(); CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.LowPullspell, o, true); if (o.Entry == 51236) { Lua.DoString("StartAttack()"); } } else { Logging.Write(System.Drawing.Color.Red, "Rarekiller: I have no valid Pullspell - set Range to 3 for next try"); Rarekiller.Settings.Range = "3"; return; } if (CastSuccess) { Logging.Write("Rarekiller: Successfully pulled {0}", o.Name); } else { Logging.Write("Rarekiller: Pull fails - set Range to 3 for next try", o.Name); Rarekiller.Settings.Range = "3"; } if (!Me.Mounted && ((Me.Class == WoWClass.Hunter) || (Me.Class == WoWClass.Warlock))) { Lua.DoString(string.Format("RunMacroText(\"/petdefensive\")"), 0); } Thread.Sleep(100); WoWMovement.MoveStop(); Logging.WriteDebug("Rarekiller: Use Quick Slowfall: {0} Mob: {1}", Me.IsFalling, o.Name); if (Me.IsFalling && Rarekiller.Settings.UseSlowfall && ((o.Entry == 29753) || (o.Entry == 3868) || (o.Entry == 32491) || (o.Entry == 32630) || (o.Entry == 33687))) { Thread.Sleep(200); Rarekiller.Slowfall.HelpFalling(); } if (Me.CurrentTarget != o) { o.Target(); } o.Face(); return; } else if (o.Dead) { if (o.CanLoot) { // ----------------- Loot Helper for all killed Rare Mobs --------------------- Logging.Write("Rarekiller: Found lootable corpse, move to him"); // ----------------- Move to Corpse ------------------- if (Rarekiller.Settings.GroundMountMode && (!(o.Entry == 50005) || // Poseidus Vashir !(o.Entry == 50052) || // Burgy Blackheart Vashir !(o.Entry == 49913) // Lady La-La Vashir )) //In Vashir you have to use Flightor ! { ForceGround = true; } else { ForceGround = false; } Logging.Write("Rarekiller Part MoveTo: Move to target"); while (o.Location.Distance(Me.Location) > 5) { if (Rarekiller.Settings.GroundMountMode || ForceGround) { Navigator.MoveTo(o.Location); } else { Flightor.MoveTo(o.Location); } Thread.Sleep(100); if (Rarekiller.inCombat) { return; } } WoWMovement.MoveStop(); if (Me.Auras.ContainsKey("Flight Form")) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted) { Lua.DoString("Dismount()"); } if (Rarekiller.Settings.ScreenRarekiller && Rarekiller.Settings.ScreenSuccess) { Lua.DoString("TakeScreenshot()"); Thread.Sleep(500); Logging.WriteDebug("Rarekiller Part Rarekiller: Take Screenshot successfully killed {0}", o.Name); } while (loothelper < 3) { Thread.Sleep(500); WoWMovement.MoveStop(); o.Interact(); Thread.Sleep(2000); Lua.DoString("RunMacroText(\"/click StaticPopup1Button1\");"); Thread.Sleep(4000); if (!o.CanLoot) { Logging.Write("Rarekiller: successfully looted"); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } else { Logging.Write("Rarekiller: Loot failed, try again"); loothelper = loothelper + 1; } Logging.Write("Rarekiller: Loot failed 3 Times"); } } if (!Blacklist.Contains(o.Guid)) { Logging.Write("Rarekiller: Find {0}, but sadly he's dead", o.Name); Blacklist.Add(o.Guid, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.Write(System.Drawing.Color.DarkOrange, "Rarekiller: Blacklist Mob for 60 Minutes."); } } } }
public void MageKill(WoWUnit Unit) { //Frostmage: if (SpellManager.HasSpell("Frost Specialization")) { if (SpellManager.HasSpell("Frostfire Bolt") && !SpellManager.Spells["Frostfire Bolt"].Cooldown && Me.ActiveAuras.ContainsKey("Brain Freeze")) { RarekillerSpells.CastSafe("Frostfire Bolt", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Frostbolt") && !SpellManager.Spells["Frostbolt"].Cooldown) { RarekillerSpells.CastSafe("Frostbolt", Unit, true); Thread.Sleep(100); return; } } //Arcane Mage if (SpellManager.HasSpell("Arcane Specialization")) { if (SpellManager.HasSpell("Arcane Missiles") && !SpellManager.Spells["Arcane Missiles"].Cooldown && Me.ActiveAuras["Arcane Blast"].StackCount > 3 && Me.ActiveAuras.ContainsKey("Arcane Missiles")) { RarekillerSpells.CastSafe("Arcane Missiles", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Arcane Barrage") && !SpellManager.Spells["Arcane Barrage"].Cooldown && Me.ActiveAuras["Arcane Blast"].StackCount > 3) { RarekillerSpells.CastSafe("Arcane Barrage", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Arcane Blast") && !SpellManager.Spells["Arcane Blast"].Cooldown) { RarekillerSpells.CastSafe("Arcane Blast", Unit, true); Thread.Sleep(100); return; } } //FireMage if (SpellManager.HasSpell("Fire Specialization")) { if (SpellManager.HasSpell("Combustion") && !SpellManager.Spells["Combustion"].Cooldown && Unit.ActiveAuras.ContainsKey("Living Bomb") && !Unit.ActiveAuras.ContainsKey("Pyroblast") && !Unit.ActiveAuras.ContainsKey("Ignite")) { RarekillerSpells.CastSafe("Combustion", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Living Bomb") && !SpellManager.Spells["Living Bomb"].Cooldown && !Unit.ActiveAuras.ContainsKey("Living Bomb")) { RarekillerSpells.CastSafe("Living Bomb", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Pyroblast") && !SpellManager.Spells["Pyroblast"].Cooldown && Me.ActiveAuras.ContainsKey("Hot Streak")) { RarekillerSpells.CastSafe("Pyroblast", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Flame Orb") && !SpellManager.Spells["Flame Orb"].Cooldown) { RarekillerSpells.CastSafe("Flame Orb", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Fireball") && !SpellManager.Spells["Fireball"].Cooldown) { RarekillerSpells.CastSafe("Fireball", Unit, true); Thread.Sleep(100); } } }
/// <summary> /// Function to Find and Kill Mobs /// </summary> public void findAndKillMob(WoWUnit Enemy) { bool CastSuccess = false; if (!Enemy.IsDead) { #region don't kill if // Don't kill Pandaria Rares with Low Health if ((Enemy.Entry == 50828 || Enemy.Entry == 50836 || Enemy.Entry == 50840 || Enemy.Entry == 50823 || Enemy.Entry == 50831 || Enemy.Entry == 50830 || Enemy.Entry == 50832 || Enemy.Entry == 50750 || Enemy.Entry == 50768 || Enemy.Entry == 50772 || Enemy.Entry == 50766 || Enemy.Entry == 50769 || Enemy.Entry == 50780 || Enemy.Entry == 50776 || Enemy.Entry == 50739 || Enemy.Entry == 50749 || Enemy.Entry == 50734 || Enemy.Entry == 50364 || Enemy.Entry == 50363 || Enemy.Entry == 50733 || Enemy.Entry == 50388 || Enemy.Entry == 50341 || Enemy.Entry == 50349 || Enemy.Entry == 50340 || Enemy.Entry == 50347 || Enemy.Entry == 50338 || Enemy.Entry == 50344 || Enemy.Entry == 50339 || Enemy.Entry == 50354 || Enemy.Entry == 50351 || Enemy.Entry == 50355 || Enemy.Entry == 50356 || Enemy.Entry == 50350 || Enemy.Entry == 50352 || Enemy.Entry == 50359 || Enemy.Entry == 50821 || Enemy.Entry == 50817 || Enemy.Entry == 50822 || Enemy.Entry == 50816 || Enemy.Entry == 50811 || Enemy.Entry == 50808 || Enemy.Entry == 50820 || Enemy.Entry == 50787 || Enemy.Entry == 50806 || Enemy.Entry == 50789 || Enemy.Entry == 50805 || Enemy.Entry == 50783 || Enemy.Entry == 50782 || Enemy.Entry == 50791 || Enemy.Entry == 51059 || Enemy.Entry == 50334 || Enemy.Entry == 51078 || Enemy.Entry == 50331 || Enemy.Entry == 50332 || Enemy.Entry == 50333 || Enemy.Entry == 50336) && Me.HealthPercent < 80) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}, but don't Kill Pandaria Mob with Health < 80%", Enemy.Name, Enemy.Entry); return; } if (Rarekiller.Settings.NotKillTameable && Enemy.IsTameable) // ... I want to tame him :) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}, but kill tameable", Enemy.Name, Enemy.Entry); return; } #endregion Logging.WriteQuiet(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}", Enemy.Name, Enemy.Entry); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Mob Location: {0} / {1} / {2}", Convert.ToString(Enemy.X), Convert.ToString(Enemy.Y), Convert.ToString(Enemy.Z)); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: Find {0} ID {1}')", Enemy.Name, Enemy.Entry); } #region don't kill if ... if (Rarekiller.Settings.PullCounter >= Rarekiller.Settings.MaxPullCounter) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but I pulled him now {1} Times", Enemy.Name, Rarekiller.Settings.PullCounter); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 15 Minutes, MoP Rares will be deactivated"); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: I pulled now {0} times, blacklist')", Rarekiller.Settings.PullCounter); } Rarekiller.Settings.PullCounter = 0; Rarekiller.Settings.GuidCurrentPull = 0; Rarekiller.Settings.BlacklistCounter++; Rarekiller.Settings.DeactivateMoPRare(Enemy); return; } // Don't kill Pandaria Rares with Level < 90 if ((Enemy.Entry == 50828 || Enemy.Entry == 50836 || Enemy.Entry == 50840 || Enemy.Entry == 50823 || Enemy.Entry == 50831 || Enemy.Entry == 50830 || Enemy.Entry == 50832 || Enemy.Entry == 50750 || Enemy.Entry == 50768 || Enemy.Entry == 50772 || Enemy.Entry == 50766 || Enemy.Entry == 50769 || Enemy.Entry == 50780 || Enemy.Entry == 50776 || Enemy.Entry == 50739 || Enemy.Entry == 50749 || Enemy.Entry == 50734 || Enemy.Entry == 50364 || Enemy.Entry == 50363 || Enemy.Entry == 50733 || Enemy.Entry == 50388 || Enemy.Entry == 50341 || Enemy.Entry == 50349 || Enemy.Entry == 50340 || Enemy.Entry == 50347 || Enemy.Entry == 50338 || Enemy.Entry == 50344 || Enemy.Entry == 50339 || Enemy.Entry == 50354 || Enemy.Entry == 50351 || Enemy.Entry == 50355 || Enemy.Entry == 50356 || Enemy.Entry == 50350 || Enemy.Entry == 50352 || Enemy.Entry == 50359 || Enemy.Entry == 50821 || Enemy.Entry == 50817 || Enemy.Entry == 50822 || Enemy.Entry == 50816 || Enemy.Entry == 50811 || Enemy.Entry == 50808 || Enemy.Entry == 50820 || Enemy.Entry == 50787 || Enemy.Entry == 50806 || Enemy.Entry == 50789 || Enemy.Entry == 50805 || Enemy.Entry == 50783 || Enemy.Entry == 50782 || Enemy.Entry == 50791 || Enemy.Entry == 51059 || Enemy.Entry == 50334 || Enemy.Entry == 51078 || Enemy.Entry == 50331 || Enemy.Entry == 50332 || Enemy.Entry == 50333 || Enemy.Entry == 50336) && Me.Level < 90) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but my level is to Low to kill him", Enemy.Name); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: My Level is to low')", Enemy.Name); } return; } if (Enemy.TaggedByOther && !Rarekiller.TaggedMobsList.ContainsKey(Convert.ToInt32(Enemy.Entry))) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but he's tagged by another Player", Enemy.Name); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is tagged')", Enemy.Name); } return; } //if not known ID of Inhouse Pandaria Rare --> don't kill if (!(Enemy.Entry == 50817 || Enemy.Entry == 50768 || Enemy.Entry == 50836 || Enemy.Entry == 50782 || Enemy.Entry == 50331 || Enemy.Entry == 51078 || Enemy.Entry == 50822 || Enemy.Entry == 50831 || Enemy.Entry == 50832 || Enemy.Entry == 50769)) { if (Me.IsFlying && Me.IsOutdoors && Enemy.IsIndoors) { Logging.Write(Colors.MediumPurple, "Rarekiller: Mob is Indoors and I fly Outdoors, so blacklist him to prevent Problems"); Logging.Write(Colors.MediumPurple, "Rarekiller: You have to place me next to the Spawnpoint, if you want me to hunt this Mob."); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is Indoors')", Enemy.Name); } return; } } if (Enemy.Level > (Me.Level + 4)) // ... 4 Levels higher them me { Logging.Write(Colors.MediumPurple, "Rarekiller: His Level is 5 over mine, better not to kill him."); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (Enemy.IsFriendly) // ... is Friendly { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but he's friendly", Enemy.Name); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is friendly')", Enemy.Name); } return; } if ((Enemy.Entry == 32630) && !Rarekiller.Settings.Vyragosa) // ... my Settings say don't kill Vyragosa { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Config says: don't kill Vyragosa."); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: don't kill NPC')", Enemy.Name); } return; } if ((Enemy.Entry == 50057) && !Rarekiller.Settings.Blazewing) // ... my Settings say don't kill Blazewing { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Config says: don't kill Blazewing."); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: don't kill NPC')", Enemy.Name); } return; } if ((Enemy.Entry == 596) || (Enemy.Entry == 599) || Me.IsInInstance) { // ... Instance Mobs, don't run wild in Instances Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Don't run wild because of RareMobs in Instances."); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (Rarekiller.BlacklistMobsList.ContainsKey(Convert.ToInt32(Enemy.Entry))) // ... Mob is Blacklisted in Rarekiller/config/BlacklistedMobs.xml { Logging.Write(Colors.MediumPurple, "Rarekiller: {0} is Member of the BlacklistedMobs.xml", Enemy.Name); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 15 Minutes."); return; } if (Rarekiller.DontInteract) { return; } #endregion if (Rarekiller.Settings.Alert) { Rarekiller.Alert(); } #region fly to Helperpoint for some Pandaria Rares if (Me.IsFlying && (Enemy.Entry == 50817 || Enemy.Entry == 50768 || Enemy.Entry == 50836 || Enemy.Entry == 50782 || Enemy.Entry == 50331 || Enemy.Entry == 51078 || Enemy.Entry == 50822 || Enemy.Entry == 50831 || Enemy.Entry == 50832 || Enemy.Entry == 50769 || Enemy.Entry == 50749 || Enemy.Entry == 50334 || Enemy.Entry == 50347 || Enemy.Entry == 50811 || Enemy.Entry == 50821 || Enemy.Entry == 50808 || Enemy.Entry == 50820)) { WoWPoint Helperpoint = Enemy.Location; if (Enemy.Entry == 50817) { Helperpoint = LandingPoint50817; } if (Enemy.Entry == 50768) { Helperpoint = LandingPoint50768; } if (Enemy.Entry == 50836) { Helperpoint = LandingPoint50836; } if (Enemy.Entry == 50782) { Helperpoint = LandingPoint50782; } if (Enemy.Entry == 50831) { Helperpoint = LandingPoint50831; } if (Enemy.Entry == 50832) { Helperpoint = LandingPoint50832; } if (Enemy.Entry == 50769) { Helperpoint = LandingPoint50769; } if (Enemy.Entry == 50822) { Helperpoint = LandingPoint50822; } if (Enemy.Entry == 50331) { Helperpoint = LandingPoint50331; } if (Enemy.Entry == 51078) { Helperpoint = LandingPoint51078; } if (Enemy.Entry == 50749) { Helperpoint = LandingPoint50749; } if (Enemy.Entry == 50334) { Helperpoint = LandingPoint50334; } if (Enemy.Entry == 50347) { Helperpoint = LandingPoint50347; } if (Enemy.Entry == 50811) { Helperpoint = LandingPoint50811; } if (Enemy.Entry == 50821) { Helperpoint = LandingPoint50821; } if (Enemy.Entry == 50808) { Helperpoint = LandingPoint50808; } if (Enemy.Entry == 50820) { Helperpoint = LandingPoint50820; } if (!Rarekiller.MoveTo(Helperpoint, Enemy, 5, false)) { return; } Rarekiller.Dismount(); } #endregion #region Check PullRange string UsedPullRange = Rarekiller.Settings.Range; // Range to 27 because of Inhouse Pandaria Mob if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell) && ( Enemy.Entry == 50836 || Enemy.Entry == 50782 || Enemy.Entry == 50331 || Enemy.Entry == 51078 || Enemy.Entry == 50822 || Enemy.Entry == 50831 || Enemy.Entry == 50832 || Enemy.Entry == 50768 || Enemy.Entry == 50749 || Enemy.Entry == 50334 || Enemy.Entry == 50347 || Enemy.Entry == 50811 || Enemy.Entry == 50821 || Enemy.Entry == 50808 || Enemy.Entry == 50820)) { UsedPullRange = "27"; Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to 27 because of Inhouse Pandaria Rare"); } // Range to 3 for other Pandaria Mobs //else if (o.Entry == 50828 || o.Entry == 50836 || o.Entry == 50840 || o.Entry == 50823 || //o.Entry == 50831 || o.Entry == 50830 || o.Entry == 50832 || o.Entry == 50750 || //o.Entry == 50768 || o.Entry == 50772 || o.Entry == 50766 || o.Entry == 50769 || //o.Entry == 50780 || o.Entry == 50776 || o.Entry == 50739 || o.Entry == 50749 || //o.Entry == 50734 || o.Entry == 50364 || o.Entry == 50363 || o.Entry == 50733 || //o.Entry == 50388 || o.Entry == 50341 || o.Entry == 50349 || o.Entry == 50340 || //o.Entry == 50347 || o.Entry == 50338 || o.Entry == 50344 || o.Entry == 50339 || //o.Entry == 50354 || o.Entry == 50351 || o.Entry == 50355 || o.Entry == 50356 || //o.Entry == 50350 || o.Entry == 50352 || o.Entry == 50359 || o.Entry == 50821 || //o.Entry == 50817 || o.Entry == 50822 || o.Entry == 50816 || o.Entry == 50811 || //o.Entry == 50808 || o.Entry == 50820 || o.Entry == 50787 || o.Entry == 50806 || //o.Entry == 50789 || o.Entry == 50805 || o.Entry == 50783 || o.Entry == 50782 || //o.Entry == 50791 || o.Entry == 51059 || o.Entry == 50334 || o.Entry == 51078 || //o.Entry == 50331 || o.Entry == 50332 || o.Entry == 50333 || o.Entry == 50336) //{ // UsedPullRange = "3"; // Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to 3 because of other Pandaria Rares"); //} else if (!Rarekiller.Settings.DefaultPull && (Convert.ToInt64(UsedPullRange) > Convert.ToInt64(Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull)))) { UsedPullRange = Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull); Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to {0} because of Low-Ranged Customized Spell", Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull)); } else if (Rarekiller.Settings.DefaultPull && (Convert.ToInt64(UsedPullRange) > Convert.ToInt64(Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell)))) { UsedPullRange = Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell); Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to {0} because of Low-Ranged Default Spell", Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell)); } #endregion #region Move To Mob if (Enemy.Entry == 50817 || Enemy.Entry == 50768 || Enemy.Entry == 50836 || Enemy.Entry == 50782 || Enemy.Entry == 50331 || Enemy.Entry == 51078 || Enemy.Entry == 50822 || Enemy.Entry == 50831 || Enemy.Entry == 50832 || Enemy.Entry == 50769 || Enemy.Entry == 50749 || Enemy.Entry == 50334 || Enemy.Entry == 50347 || Enemy.Entry == 50811 || Enemy.Entry == 50821 || Enemy.Entry == 50808 || Enemy.Entry == 50820) { if (!Rarekiller.MoveTo(Enemy, Convert.ToInt64(UsedPullRange), true)) { return; } } else { if (!Rarekiller.MoveTo(Enemy, Convert.ToInt64(UsedPullRange), false)) { return; } } #endregion #region Special Behavior Nal'lak //if (Me.Combat && o.Entry == 50364) //Nal'lak //{ // WoWMovement.MoveStop(); // Thread.Sleep(100); // if (Me.IsFlying) // { // WoWUnit GroundUnit = ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (!u.IsFlying)).OrderBy(u => u.Distance).FirstOrDefault(); ; // if (!Rarekiller.DescendToLand(GroundUnit)) return; // } // Rarekiller.Dismount(); //} #endregion #region Special Behavior Clean up Area if (Enemy.Entry == 50749 || Enemy.Entry == 50334 || Enemy.Entry == 50347) { List <WoWUnit> AddList = ObjectManager.GetObjectsOfType <WoWUnit>().Where(Add => !Add.IsDead && Add.IsHostile && (Add != Enemy) && Add.Location.Distance(Enemy.Location) < 27 && Add.Location.Distance(Me.Location) < 27).OrderBy(Add => Add.Distance).ToList(); foreach (WoWUnit Add in AddList) { if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.RangedPullspell, Add, true); Logging.Write(Colors.MediumPurple, "Rarekiller: Clean up Area, pull Add: {0}", Add.Name); return; } } } #endregion #region Pull Mob Logging.Write(Colors.MediumPurple, "Rarekiller: Pull at Mob Location: {0} / {1} / {2}", Convert.ToString(Enemy.X), Convert.ToString(Enemy.Y), Convert.ToString(Enemy.Z)); Logging.Write(Colors.MediumPurple, "Rarekiller: ... my Location: {0} / {1} / {2}", Convert.ToString(Me.X), Convert.ToString(Me.Y), Convert.ToString(Me.Z)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Target is Flying - {0}", Enemy.IsFlying); Enemy.Target(); if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell) && (Enemy.Entry == 50817 || Enemy.Entry == 50768 || Enemy.Entry == 50836 || Enemy.Entry == 50782 || Enemy.Entry == 50331 || Enemy.Entry == 51078 || Enemy.Entry == 50822 || Enemy.Entry == 50831 || Enemy.Entry == 50832 || Enemy.Entry == 50769 || Enemy.Entry == 50749 || Enemy.Entry == 50334 || Enemy.Entry == 50347 || Enemy.Entry == 50811 || Enemy.Entry == 50821 || Enemy.Entry == 50808 || Enemy.Entry == 50820)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.RangedPullspell, Enemy, true); } else if (!(Rarekiller.Settings.DefaultPull) && SpellManager.HasSpell(Rarekiller.Settings.Pull)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Settings.Pull, Enemy, false); } else if (SpellManager.HasSpell(Rarekiller.Spells.FastPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.FastPullspell, Enemy, false); } else { Logging.Write(Colors.MediumPurple, "Rarekiller: I have no valid Pullspell - sorry"); } if (Me.CurrentTarget != Enemy) { Enemy.Target(); } #endregion #region Quick Slowfall for known flying Mobs if (Rarekiller.Settings.UseSlowfall && ((Enemy.Entry == 29753) || (Enemy.Entry == 32491) || (Enemy.Entry == 32630) || (Enemy.Entry == 33687) || (Enemy.Entry == 50364))) { Thread.Sleep(500); if (Me.IsFalling) { Rarekiller.Slowfall.HelpFalling(); } } Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Use Quick Slowfall: {0} Mob: {1}", Me.IsFalling, Enemy.Name); #endregion #region Pulltimer and Pullcounter WaitAfterPullTimer.Reset(); WaitAfterPullTimer.Start(); while (WaitAfterPullTimer.IsRunning && !Rarekiller.ToonInvalidCombat && WaitAfterPullTimer.ElapsedMilliseconds < 2000) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Wait for Combat now {0} ms", WaitAfterPullTimer.ElapsedMilliseconds); Thread.Sleep(100); } if (CastSuccess && Me.Combat) { Logging.Write(Colors.MediumPurple, "Rarekiller: Successfully pulled {0}", Enemy.Name); } if (Enemy.Entry != 32491 && Enemy.Entry != 50005 && (Rarekiller.Settings.GuidCurrentPull != Enemy.Guid) && Me.Combat) { Rarekiller.Settings.PullCounter = 1; Rarekiller.Settings.GuidCurrentPull = Enemy.Guid; Logging.Write(Colors.MediumPurple, "Rarekiller: Pulled {0} now first time", Enemy.Name); } else if (Me.Combat) { Rarekiller.Settings.PullCounter++; Logging.Write(Colors.MediumPurple, "Rarekiller: Pulled {0} now {1} times", Enemy.Name, Rarekiller.Settings.PullCounter); if ((Enemy.Entry == 50828 || Enemy.Entry == 50836 || Enemy.Entry == 50840 || Enemy.Entry == 50823 || Enemy.Entry == 50831 || Enemy.Entry == 50830 || Enemy.Entry == 50832 || Enemy.Entry == 50750 || Enemy.Entry == 50768 || Enemy.Entry == 50772 || Enemy.Entry == 50766 || Enemy.Entry == 50769 || Enemy.Entry == 50780 || Enemy.Entry == 50776 || Enemy.Entry == 50739 || Enemy.Entry == 50749 || Enemy.Entry == 50734 || Enemy.Entry == 50364 || Enemy.Entry == 50363 || Enemy.Entry == 50733 || Enemy.Entry == 50388 || Enemy.Entry == 50341 || Enemy.Entry == 50349 || Enemy.Entry == 50340 || Enemy.Entry == 50347 || Enemy.Entry == 50338 || Enemy.Entry == 50344 || Enemy.Entry == 50339 || Enemy.Entry == 50354 || Enemy.Entry == 50351 || Enemy.Entry == 50355 || Enemy.Entry == 50356 || Enemy.Entry == 50350 || Enemy.Entry == 50352 || Enemy.Entry == 50359 || Enemy.Entry == 50821 || Enemy.Entry == 50817 || Enemy.Entry == 50822 || Enemy.Entry == 50816 || Enemy.Entry == 50811 || Enemy.Entry == 50808 || Enemy.Entry == 50820 || Enemy.Entry == 50787 || Enemy.Entry == 50806 || Enemy.Entry == 50789 || Enemy.Entry == 50805 || Enemy.Entry == 50783 || Enemy.Entry == 50782 || Enemy.Entry == 50791 || Enemy.Entry == 51059 || Enemy.Entry == 50334 || Enemy.Entry == 51078 || Enemy.Entry == 50331 || Enemy.Entry == 50332 || Enemy.Entry == 50333 || Enemy.Entry == 50336) && Me.Level < 90) { RoutineManager.Current.Combat(); } } #endregion #region Move to a Save Fighting Area after Pull for some Pandaria Rares if ((Enemy.Entry == 50768 || Enemy.Entry == 50832) && Me.Combat) { WoWPoint SaveHelperpoint = Enemy.Location; Logging.Write(Colors.MediumPurple, "Rarekiller: Move to Save Fighting Point", Enemy.Entry); if (Enemy.Entry == 50768) { SaveHelperpoint = SavePoint50768; } if (Enemy.Entry == 50832) { SaveHelperpoint = SavePoint50832; } if (Navigator.CanNavigateFully(Me.Location, SaveHelperpoint)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Move to Save Fighting Point"); while (Me.Location.Distance(SaveHelperpoint) > 5) { if (Me.IsSwimming) { WoWMovement.ClickToMove(SaveHelperpoint); } else { Navigator.MoveTo(SaveHelperpoint); } Thread.Sleep(100); if (Rarekiller.ToonInvalid) { return; } } } else { Logging.Write(Colors.MediumPurple, "Rarekiller: Wasn't able to Move to Save Fighting Point", Enemy.Entry); } } #endregion return; } else { if (Enemy.Guid == Rarekiller.Settings.GuidCurrentPull) { Rarekiller.Settings.PullCounter = 0; Rarekiller.Settings.GuidCurrentPull = 0; Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Set PullCounter to {0}", Rarekiller.Settings.PullCounter); } if (Enemy.CanLoot) { if (!Rarekiller.Loothelper(Enemy)) { return; } } if (!Blacklist.Contains(Enemy.Guid, Rarekiller.Settings.Flags)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but sadly he's dead", Enemy.Name); Blacklist.Add(Enemy.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); } } }
public override void Pulse() { try { #region Plugin deactivated if ... if (Rarekiller.ToonInvalid) { return; } if (Battlegrounds.IsInsideBattleground || Me.IsInInstance) { return; } #endregion #region Init if (!hasItBeenInitialized) { Initialize(); hasItBeenInitialized = true; } #endregion #region Timer if (Settings.Keyer && !Checktimer.IsRunning && !Me.IsMoving) { Checktimer.Start(); } if (Settings.Keyer && Checktimer.IsRunning && Me.IsMoving) { Checktimer.Reset(); } if (Settings.Shadowmeld && !Shadowmeldtimer.IsRunning && !Me.IsMoving && !Me.HasAura("Shadowmeld")) { Shadowmeldtimer.Start(); } if (Settings.Shadowmeld && Shadowmeldtimer.IsRunning && Me.IsMoving) { Shadowmeldtimer.Reset(); } // Developer Thing (ToDo Remove) if (!DumpAuraTimer.IsRunning && Rarekiller.Settings.MoPRaresDeveloper) { DumpAuraTimer.Reset(); DumpAuraTimer.Start(); } #endregion #region Slowfall if (Me.IsFalling && Settings.UseSlowfall && !FallTimer.IsRunning) { FallTimer.Start(); } if (!Me.IsFalling && Settings.UseSlowfall && FallTimer.IsRunning) { FallTimer.Reset(); } if (Me.IsFalling && Settings.UseSlowfall && FallTimer.ElapsedMilliseconds > Convert.ToInt32(Rarekiller.Settings.Falltimer)) { FallTimer.Reset(); Slowfall.HelpFalling(); } //if (Me.IsFalling && Settings.UseSlowfall) //{ // Thread.Sleep(Convert.ToInt32(Rarekiller.Settings.Falltimer)); // if (Me.IsFalling && !Me.IsDead && !Me.IsGhost) // Slowfall.HelpFalling(); //} #endregion if (!Me.Combat) { #region Pulse Camel Figurine and NPC Interactor if (Settings.Camel || Settings.TestFigurineInteract || Settings.AnotherMansTreasure || Settings.InteractNPC) { Camel.findAndInteractNPC(); } // --> Dormus' Rage = 93269 if (Me.HasAura(93269) || Settings.Camel) { Camel.findAndKillDormus(); } #endregion #region Pulse Object Interactor if (Settings.RaptorNest || Settings.TestRaptorNest || Settings.ObjectsCollector || Settings.AnotherMansTreasure || Settings.OnyxEgg) { Collector.findAndPickupObject(); } #endregion #region Pulse Tamer if (((Me.Class == WoWClass.Hunter) && (Rarekiller.Settings.TameDefault || Rarekiller.Settings.TameByID)) || Rarekiller.Settings.TestcaseTamer) { if (Me.HealthPercent > 30) { Tamer.findAndTameMob(); } } if ((Me.Class == WoWClass.Hunter && Rarekiller.Settings.Footprints) || Rarekiller.Settings.TestcaseTamer) { Tamer.findandfollowFootsteps(); } #endregion #region Pulse Rarekiller if (Settings.KillList || Settings.MOP || Settings.WOTLK || Settings.BC || Settings.CATA || Settings.TLPD || Settings.LowRAR || Settings.HUNTbyID || Settings.Poseidus) { Killer.findAndKillMob(); } #endregion #region Pulse Security if (Settings.Keyer && !Me.IsMoving) { if (Checktimer.Elapsed.TotalSeconds > MoveTimer) { Checktimer.Reset(); MoveTimer = rnd.Next(360, 540); Security.Movearound(); } } if (Settings.Shadowmeld && !Me.IsMoving) { if (Shadowmeldtimer.Elapsed.TotalSeconds > 5) { Shadowmeldtimer.Reset(); if (SpellManager.HasSpell("Shadowmeld") && SpellManager.CanCast("Shadowmeld") && !Me.HasAura("Shadowmeld")) { bool SpellSuccess = RarekillerSpells.CastSafe("Shadowmeld", Me, false); //bool SpellSuccess = SpellManager.Cast("Shadowmeld"); Logging.Write(Colors.MediumPurple, "Rarekiller: Shadowmeld activated - {0}", SpellSuccess); } } } #endregion } else // In Combat with MoPRares / Dormus { #region Hozen - working - but needs some luck if (MoPRares.Hozen != null) { // Bananarang if (MoPRares.Hozen.CastingSpellId == 125311) { MoPRares.AvoidEnemyCast(MoPRares.Hozen, 0, 50); } // Going Bananas else if (MoPRares.Hozen.CastingSpellId == 125363) { while (MoPRares.Hozen.CastingSpellId == 125363 && MoPRares.Hozen.Location.Distance(Me.Location) > 5) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.Hozen.Location); } else { Navigator.MoveTo(MoPRares.Hozen.Location); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } } } } #endregion #region Mogu Sorcerer - working if (MoPRares.MoguSorcerer != null) { //Voidcloud if (Me.HasAura("Voidcloud") && MoPRares.getVoidcloudList != null) { if (MoPRares.getVoidcloudList[0].Distance < (MoPRares.getVoidcloudList[0].Radius * 1.6f)) { MoPRares.AvoidEnemyAOE(MoPRares.MoguSorcerer, "Voidcloud", 10, MoPRares.getVoidcloudList, 10, 3); } } } #endregion #region Saurok - working if (MoPRares.Saurok != null) { if (MoPRares.Saurok.Combat && MoPRares.Saurok.Location.Distance(Me.Location) > 15) { while (MoPRares.Saurok.Location.Distance(Me.Location) > 5) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.Saurok.Location); } else { Navigator.MoveTo(MoPRares.Saurok.Location); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } } } if (Me.CurrentTarget != null && Me.CurrentTarget != MoPRares.Saurok && !MoPRares.Saurok.IsDead) { MoPRares.Saurok.Target(); } } #endregion #region Jinyu - working - but needs some luck if (MoPRares.Jinyu != null) { // Rain Dance if (MoPRares.Jinyu.CastingSpellId == 124860 && SpellManager.CanCast(Spells.Stun)) { RarekillerSpells.CastSafe(Spells.Stun, MoPRares.Jinyu, false); Logging.Write(Colors.MediumPurple, "Rarekiller: * {0}. - Stun", Spells.Stun); } else if (MoPRares.Jinyu.CastingSpellId == 124860) { MoPRares.AvoidEnemyMissiles(MoPRares.Jinyu, 0, 7, true, 10, 5); Logging.Write(Colors.MediumPurple, "Rarekiller: Avoid Missiles"); } // Torrent - interrupt else if (MoPRares.Jinyu.CastingSpellId == 124935 && SpellManager.CanCast(Spells.Interrupt)) { RarekillerSpells.CastSafe(Spells.Interrupt, MoPRares.Jinyu, false); Logging.Write(Colors.MediumPurple, "Rarekiller: * {0}. - Interrupt", Spells.Interrupt); } } #endregion #region Mogu Warrior - working if (MoPRares.MoguWarrior != null) { while (MoPRares.MoguWarrior.Distance2D <= 15 && MoPRares.MoguWarrior.IsCasting && MoPRares.MoguWarrior.CastingSpellId == 124946 && !Me.IsSafelyBehind(MoPRares.MoguWarrior)) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.getLocationBehindUnit(MoPRares.MoguWarrior)); } else { Navigator.MoveTo(MoPRares.getLocationBehindUnit(MoPRares.MoguWarrior)); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } } } #endregion #region Mantid - working but Index Fehler if (MoPRares.Mantid != null) { // Blade Flurry while (MoPRares.Mantid.Location.Distance(Me.Location) <= 20 && MoPRares.Mantid.IsCasting && MoPRares.Mantid.CastingSpellId == 125370 && !Me.IsSafelyBehind(MoPRares.Mantid)) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.getLocationBehindUnit(MoPRares.Mantid)); } else { Navigator.MoveTo(MoPRares.getLocationBehindUnit(MoPRares.Mantid)); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } } // Tornados if (MoPRares.getTornadoList != null) { if (MoPRares.getTornadoList[0].Distance < 7) { MoPRares.AvoidEnemyAOE(MoPRares.Mantid, 27, MoPRares.getTornadoList, 10, 5); } } } #endregion #region Pandaren - don't work good if (MoPRares.Pandaren != null) { // Spinning Crane Kick if (MoPRares.Pandaren.CastingSpellId == 125799 && SpellManager.CanCast(Spells.Stun)) { RarekillerSpells.CastSafe(Spells.Stun, MoPRares.Pandaren, false); Logging.Write(Colors.MediumPurple, "Rarekiller: * {0}. - Stun", Spells.Stun); } else if (MoPRares.Pandaren.CastingSpellId == 125799 && MoPRares.Pandaren.Location.Distance(Me.Location) < 25) { WoWMovement.Move(WoWMovement.MovementDirection.Backwards); MoPRares.FleeingFromEnemy(MoPRares.Pandaren, 125799, 40, 10, 5); } // Healing Mists else if (MoPRares.Pandaren.CastingSpellId == 125802 && SpellManager.CanCast(Spells.Interrupt)) { RarekillerSpells.CastSafe(Spells.Interrupt, MoPRares.Pandaren, false); Logging.Write(Colors.MediumPurple, "Rarekiller: * {0}. - Interrupt", Spells.Interrupt); } // Chi Burst else if (MoPRares.Pandaren.Combat && MoPRares.Pandaren.Location.Distance(Me.Location) > 15) { Logging.Write(Colors.MediumPurple, "Rarekiller: Run to Pandaren because of Chistoß"); while (MoPRares.Pandaren.Location.Distance(Me.Location) > 5) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.Pandaren.Location); } else { Navigator.MoveTo(MoPRares.Pandaren.Location); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } // Healing Mists else if (MoPRares.Pandaren.CastingSpellId == 125802 && SpellManager.CanCast(Spells.Interrupt) && MoPRares.Pandaren.Location.Distance(Me.Location) < 30) { RarekillerSpells.CastSafe(Spells.Interrupt, MoPRares.Pandaren, false); Logging.Write(Colors.MediumPurple, "Rarekiller: * {0}. - Interrupt", Spells.Interrupt); } } WoWMovement.MoveStop(); } } #endregion #region Yaungol - working if (MoPRares.Yaungol != null) { // Yaungol Stomp if (MoPRares.Yaungol.CastingSpellId == 124289 && MoPRares.Yaungol.Location.Distance(Me.Location) < 15) { MoPRares.FleeingFromEnemy(MoPRares.Yaungol, 124289, 17, 10, 5); } // Bellowing Rage else if (MoPRares.Yaungol.HasAura("Bellowing Rage") && MoPRares.Yaungol.Location.Distance(Me.Location) < 25) { MoPRares.FleeingFromEnemy(MoPRares.Yaungol, 0, 30, 10, 5); } // Rushing Charge else if (MoPRares.Yaungol.Combat && Me.Location.Distance(MoPRares.Yaungol.Location) > 20) { while (Me.Location.Distance(MoPRares.Yaungol.Location) > 10) { if (Me.IsSwimming) { WoWMovement.ClickToMove(MoPRares.Yaungol.Location); } else { Navigator.MoveTo(MoPRares.Yaungol.Location); } Thread.Sleep(80); if (Rarekiller.ToonInvalid) { return; } } } } #endregion #region Dormus Avoid Spit - working if (Camel.Dormus != null) { // Developer Thing (ToDo Remove) if (DumpAuraTimer.Elapsed.TotalSeconds > 5 && Rarekiller.Settings.MoPRaresDeveloper) { DumpAuraTimer.Reset(); MoPRares.DumpAOEEffect(); } //94967 = Aura Spit if (Me.HasAura(94967)) { Camel.AvoidSpit(Camel.Dormus); } //if (Me.HasAura(94967) && Camel.getSpitList != null && Camel.getSpitList[0].Distance < (Camel.getSpitList[0].Radius * 1.6f)) // MoPRares.AvoidEnemyAOE(Camel.Dormus, 0, 2, 20, Camel.getSpitList, 15, 3); } #endregion } } catch (ThreadAbortException) { } catch (Exception e) { Logging.WriteDiagnostic(Colors.Red, e.Message); } }
/// <summary> /// Function to Find and Tame Mobs /// </summary> public void findAndTameMob(WoWUnit tamePet) { if (Me.Class != WoWClass.Hunter && !Rarekiller.Settings.TestcaseTamer) { return; } if (!tamePet.IsDead) { Logging.WriteQuiet(Colors.MediumPurple, "Rarekiller: Found a new Pet {0} ID {1}", tamePet.Name, tamePet.Entry); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Unit Location: {0} / {1} / {2}", Convert.ToString(tamePet.X), Convert.ToString(tamePet.Y), Convert.ToString(tamePet.Z)); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: Find {0} ID {1}')", tamePet.Name, tamePet.Entry); } #region don't tame if // Don't tame the Rare if ... if (Me.IsFlying && Me.IsOutdoors && tamePet.IsIndoors) { Logging.Write(Colors.MediumPurple, "Rarekiller: Unit is Indoors and I fly Outdoors, so blacklist him to prevent Problems"); Logging.Write(Colors.MediumPurple, "Rarekiller: You have to place me next to the Spawnpoint, if you want me to hunt this Unit."); Blacklist.Add(tamePet.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, " Part TamerRarekiller: Blacklist Unit for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is Indoors')", tamePet.Name); } return; } if (Me.Level < tamePet.Level) { Logging.Write(Colors.MediumPurple, "Rarekiller: Unit Level is higher then mine, can't tame the Unit."); Blacklist.Add(tamePet.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Unit for 60 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC Level is to high to tame')", tamePet.Name); } return; } if (Rarekiller.BlacklistMobsList.ContainsKey(Convert.ToInt32(tamePet.Entry))) { Logging.Write(Colors.MediumPurple, "Rarekiller: {0} is Member of the BlacklistedMobs.xml", tamePet.Name); Blacklist.Add(tamePet.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Unit for 15 Minutes."); return; } if (Rarekiller.DontInteract) { return; } #endregion //Dismiss Pet if (Me.Class == WoWClass.Hunter && Me.Pet != null) { RarekillerSpells.CastSafe("Dismiss Pet", Me, false); //SpellManager.Cast("Dismiss Pet"); Thread.Sleep(3000); } if (Rarekiller.Settings.Alert) { Rarekiller.Alert(); } #region Move to tameable Unit if (!Rarekiller.MoveTo(tamePet, 20, false)) { return; } if (Me.IsFlying) { if (!Rarekiller.DescendToLand(tamePet)) { return; } } Rarekiller.Dismount(); #endregion tamePet.Target(); if (Me.Class == WoWClass.Hunter) { #region Tame while (!tamePet.IsPet) { if (tamePet.IsDead) { Logging.Write(Colors.MediumPurple, "Rarekiller: Oh no, I accidently killed him !!! "); return; } if (Me.HealthPercent < 10) { Logging.Write(Colors.MediumPurple, "Rarekiller: Health < 10% , Use Feign Death !!! "); if (SpellManager.CanCast("Feign Death")) { RarekillerSpells.CastSafe("Feign Death", Me, false); } //SpellManager.Cast("Feign Death"); return; } if (!(Me.CastingSpellId == 1515)) { WoWMovement.MoveStop(); RarekillerSpells.CastSafe("Tame Beast", tamePet, true); //SpellManager.Cast(1515); Logging.Write(Colors.MediumPurple, "Rarekiller: Try to tame Beast {0}", tamePet.Name); Thread.Sleep(500); } } Logging.Write(Colors.MediumPurple, "Rarekiller: Sucessfully tamed Beast {0}", tamePet.Name); #endregion } else { #region Testcase for my Shammi while (!tamePet.IsDead) { Logging.Write(Colors.MediumPurple, "Rarekiller Test: Try to tame Beast", tamePet.Name); Thread.Sleep(1500); } #endregion } } else if (tamePet.IsPet) { return; } else if (Blacklist.Contains(tamePet.Guid, Rarekiller.Settings.Flags)) { return; } else { Logging.Write(Colors.MediumPurple, "Rarekiller: Find a Unit, but sadly he's dead or not tameable: {0}", tamePet.Name); Blacklist.Add(tamePet.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.Write(Colors.MediumPurple, "Rarekiller: Blacklist Unit for 5 Minutes."); return; } }
public void DKKill(WoWUnit Unit) { if (SpellManager.HasSpell("Bone Shield") && !SpellManager.Spells["Bone Shield"].Cooldown && !Me.ActiveAuras.ContainsKey("Bone Shield")) { RarekillerSpells.CastSafe("Bone Shield", Me, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Frost Strike") && !SpellManager.Spells["Frost Strike"].Cooldown && !Unit.Dead) { if ((Me.RunicPowerPercent > 16) && (Me.CurrentRunicPower > SpellManager.Spells["Frost Strike"].PowerCost)) { RarekillerSpells.CastSafe("Frost Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Outbreak") && !SpellManager.Spells["Outbreak"].Cooldown && !Unit.Dead) { if (!Unit.ActiveAuras.ContainsKey("Blood Plague") && !Unit.ActiveAuras.ContainsKey("Frost Fever")) { RarekillerSpells.CastSafe("Outbreak", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("BloodTap") && !SpellManager.Spells["BloodTap"].Cooldown && !Unit.Dead) { if ((Me.BloodRuneCount == 0) && (Me.DeathRuneCount == 0)) { RarekillerSpells.CastSafe("BloodTap", Me, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Death Strike") && !SpellManager.Spells["Death Strike"].Cooldown && Me.HealthPercent < 80 && !Unit.Dead) { if (!(Me.UnholyRuneCount < 1 && Me.FrostRuneCount < 1 && Me.DeathRuneCount < 2) && !(Me.UnholyRuneCount < 1 && Me.DeathRuneCount < 1) && !(Me.FrostRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Death Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Festering Strike") && !SpellManager.Spells["Festering Strike"].Cooldown && !Unit.Dead) { if (!(Me.BloodRuneCount < 1 && Me.FrostRuneCount < 1 && Me.DeathRuneCount < 2) && !(Me.BloodRuneCount < 1 && Me.DeathRuneCount < 1) && !(Me.FrostRuneCount < 1 && Me.DeathRuneCount < 1) && !(!Unit.ActiveAuras.ContainsKey("Frost Fever")) && !(!Unit.ActiveAuras.ContainsKey("Blood Plague")) && !(Unit.Auras["Frost Fever"].TimeLeft.TotalSeconds > 5 && Unit.Auras["Blood Plague"].TimeLeft.TotalSeconds > 5)) { RarekillerSpells.CastSafe("Festering Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Rune Tap") && !SpellManager.Spells["Rune Tap"].Cooldown && Me.HealthPercent < 35 && !Unit.Dead) { if (!(Me.BloodRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Rune Tap", Me, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Heart Strike") && !SpellManager.Spells["Heart Strike"].Cooldown && !Unit.Dead) { if (!(Me.BloodRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Heart Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Howling Blast") && !SpellManager.Spells["Howling Blast"].Cooldown && !Unit.Dead) { if (!(Me.FrostRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Howling Blast", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Death Coil") && !SpellManager.Spells["Death Coil"].Cooldown && !Unit.Dead) { if ((Me.RunicPowerPercent > 80) && (Me.CurrentRunicPower > SpellManager.Spells["Frost Strike"].PowerCost)) { RarekillerSpells.CastSafe("Death Coil", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Frost Strike") && !SpellManager.Spells["Frost Strike"].Cooldown && !Unit.Dead) { if ((Me.RunicPowerPercent > 16) && (Me.CurrentRunicPower > SpellManager.Spells["Frost Strike"].PowerCost)) { RarekillerSpells.CastSafe("Frost Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Obliterate") && !SpellManager.Spells["Obliterate"].Cooldown && !Unit.Dead) { if (!(Me.UnholyRuneCount < 1 && Me.FrostRuneCount < 1 && Me.DeathRuneCount < 2) && !(Me.UnholyRuneCount < 1 && Me.DeathRuneCount < 1) && !(Me.FrostRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Obliterate", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Plague Strike") && !SpellManager.Spells["Plague Strike"].Cooldown && Unit.ActiveAuras.ContainsKey("Blood Plague") && !Unit.Dead) { if (!(Me.UnholyRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Plague Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Frost Strike") && !SpellManager.Spells["Frost Strike"].Cooldown && !Unit.Dead) { if ((Me.RunicPowerPercent > 16) && (Me.CurrentRunicPower > SpellManager.Spells["Frost Strike"].PowerCost)) { RarekillerSpells.CastSafe("Frost Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Icy Touch") && !SpellManager.Spells["Icy Touch"].Cooldown && !Unit.Dead) { if (!(Me.FrostRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Icy Touch", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Scourge Strike") && !SpellManager.Spells["Scourge Strike"].Cooldown && !Unit.Dead) { if (!(Me.UnholyRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Scourge Strike", Unit, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Blood Strike") && !SpellManager.Spells["Blood Strike"].Cooldown && !Unit.Dead) { if (!(Me.BloodRuneCount < 1 && Me.DeathRuneCount < 1)) { RarekillerSpells.CastSafe("Blood Strike", Unit, true); Thread.Sleep(100); } } }
public static WoWPoint SavePoint50832 = new WoWPoint(1749.258, 3209.693, 316.2377); // The Yowler #endregion /// <summary> /// Function to Find and Kill Mobs /// </summary> public void findAndKillMob() { bool CastSuccess = false; #region create List of Mobs in Reach // ----------------- Generate a List with all wanted Rares found in Object Manager --------------------- ObjectManager.Update(); List <WoWUnit> objList = ObjectManager.GetObjectsOfType <WoWUnit>() .Where(o => (!Blacklist.Contains(o.Guid, Rarekiller.Settings.Flags) && ( (Rarekiller.Settings.CATA && (Rarekiller.CataRaresList.ContainsKey(Convert.ToInt32(o.Entry)))) || (Rarekiller.Settings.Poseidus && ((o.Entry == 50005) || // Poseidus (o.Entry == 9999999))) || // Platzhalter (Rarekiller.Settings.TLPD && ((o.Entry == 32491) || // Timelost Protodrake (o.Entry == 32630))) || // Vyragosa (Rarekiller.Settings.WOTLK && (Rarekiller.FrostbittenList.ContainsKey(Convert.ToInt32(o.Entry)))) || (Rarekiller.Settings.BC && (Rarekiller.BloodyRareList.ContainsKey(Convert.ToInt32(o.Entry)))) || (Rarekiller.Settings.KillList && (Rarekiller.KillMobsList.ContainsKey(Convert.ToInt32(o.Entry)))) || //Kill Mobs from List (Rarekiller.Settings.KillList && o.TaggedByOther && (Rarekiller.TaggedMobsList.ContainsKey(Convert.ToInt32(o.Entry)))) || //Kill Tagged Mobs from List ((o.Level < Rarekiller.Settings.Level) && Rarekiller.Settings.LowRAR && (o.CreatureRank == Styx.WoWUnitClassificationType.Rare)) || // every single Rare Mob < Level 61 is hunted (Rarekiller.Settings.HUNTbyID && (o.Entry == Convert.ToInt64(Rarekiller.Settings.MobID))) // Hunt special IDs // Pandaria Rares || (Rarekiller.Settings.MOP && ( (o.Entry == 50828 && Rarekiller.Settings.Bonobos50828) || // (o.Entry == 50836 && Rarekiller.Settings.IkIk50836) || // (o.Entry == 50840 && Rarekiller.Settings.Nanners50840) || // (o.Entry == 50823 && Rarekiller.Settings.Ferocious50823) || // (o.Entry == 50831 && Rarekiller.Settings.Scritch50831) || // (o.Entry == 50830 && Rarekiller.Settings.Spriggin50830) || // (o.Entry == 50832 && Rarekiller.Settings.Yowler50832) || // (o.Entry == 50750 && Rarekiller.Settings.Aethis50750) || // (o.Entry == 50768 && Rarekiller.Settings.Cournith50768) || // (o.Entry == 50772 && Rarekiller.Settings.Eshelon50772) || // (o.Entry == 50766 && Rarekiller.Settings.Selena50766) || // (o.Entry == 50769 && Rarekiller.Settings.Zai50769) || // (o.Entry == 50780 && Rarekiller.Settings.Sahn50780) || // (o.Entry == 50776 && Rarekiller.Settings.Nalash50776) || // (o.Entry == 50739 && Rarekiller.Settings.Garlok50739) || // (o.Entry == 50749 && Rarekiller.Settings.Kaltik50749) || // (o.Entry == 50734 && Rarekiller.Settings.Lithik50734) || // (o.Entry == 50364 && Rarekiller.Settings.Nallak50364) || // (o.Entry == 50363 && Rarekiller.Settings.Kraxik50363) || // (o.Entry == 50733 && Rarekiller.Settings.Skithik50733) || // (o.Entry == 50388 && Rarekiller.Settings.Torik50388) || // (o.Entry == 50341 && Rarekiller.Settings.Borginn50341) || // (o.Entry == 50349 && Rarekiller.Settings.Kang50349) || // (o.Entry == 50340 && Rarekiller.Settings.Gaarn50340) || // (o.Entry == 50347 && Rarekiller.Settings.Karr50347) || // (o.Entry == 50338 && Rarekiller.Settings.Kornas50338) || // (o.Entry == 50344 && Rarekiller.Settings.Norlaxx50344) || // (o.Entry == 50339 && Rarekiller.Settings.Sulikshor50339) || // (o.Entry == 50354 && Rarekiller.Settings.Havak50354) || // (o.Entry == 50351 && Rarekiller.Settings.JonnDar50351) || // (o.Entry == 50355 && Rarekiller.Settings.Kahtir50355) || // (o.Entry == 50356 && Rarekiller.Settings.Krol50356) || // (o.Entry == 50350 && Rarekiller.Settings.Morgrinn50350) || // (o.Entry == 50352 && Rarekiller.Settings.Qunas50352) || // (o.Entry == 50359 && Rarekiller.Settings.Urgolax50359) || // (o.Entry == 50821 && Rarekiller.Settings.AiLi50821) || // (o.Entry == 50817 && Rarekiller.Settings.Ahone50817) || // (o.Entry == 50822 && Rarekiller.Settings.AiRan50822) || // (o.Entry == 50816 && Rarekiller.Settings.Ruun50816) || // (o.Entry == 50811 && Rarekiller.Settings.Nasra50811) || // (o.Entry == 50808 && Rarekiller.Settings.Urobi50808) || // (o.Entry == 50820 && Rarekiller.Settings.Yul50820) || // (o.Entry == 50787 && Rarekiller.Settings.Arness50787) || // (o.Entry == 50806 && Rarekiller.Settings.Moldo50806) || // (o.Entry == 50789 && Rarekiller.Settings.Nessos50789) || // (o.Entry == 50805 && Rarekiller.Settings.Omnis50805) || // (o.Entry == 50783 && Rarekiller.Settings.Salyin50783) || // (o.Entry == 50782 && Rarekiller.Settings.Sarnak50782) || // (o.Entry == 50791 && Rarekiller.Settings.Siltriss50791) || // (o.Entry == 51059 && Rarekiller.Settings.Blackhoof51059) || // (o.Entry == 50334 && Rarekiller.Settings.Dak50334) || // (o.Entry == 51078 && Rarekiller.Settings.Ferdinand51078) || // (o.Entry == 50331 && Rarekiller.Settings.GoKan50331) || // (o.Entry == 50332 && Rarekiller.Settings.Korda50332) || // (o.Entry == 50333 && Rarekiller.Settings.Lon50333) || // (o.Entry == 50336 && Rarekiller.Settings.Yorik50336) // )) ))) .OrderBy(o => o.Distance).ToList(); #endregion foreach (WoWUnit o in objList) { if (!o.IsDead && !o.IsPet) { #region don't kill if // Don't kill Pandaria Rares with Low Health if ((o.Entry == 50828 || o.Entry == 50836 || o.Entry == 50840 || o.Entry == 50823 || o.Entry == 50831 || o.Entry == 50830 || o.Entry == 50832 || o.Entry == 50750 || o.Entry == 50768 || o.Entry == 50772 || o.Entry == 50766 || o.Entry == 50769 || o.Entry == 50780 || o.Entry == 50776 || o.Entry == 50739 || o.Entry == 50749 || o.Entry == 50734 || o.Entry == 50364 || o.Entry == 50363 || o.Entry == 50733 || o.Entry == 50388 || o.Entry == 50341 || o.Entry == 50349 || o.Entry == 50340 || o.Entry == 50347 || o.Entry == 50338 || o.Entry == 50344 || o.Entry == 50339 || o.Entry == 50354 || o.Entry == 50351 || o.Entry == 50355 || o.Entry == 50356 || o.Entry == 50350 || o.Entry == 50352 || o.Entry == 50359 || o.Entry == 50821 || o.Entry == 50817 || o.Entry == 50822 || o.Entry == 50816 || o.Entry == 50811 || o.Entry == 50808 || o.Entry == 50820 || o.Entry == 50787 || o.Entry == 50806 || o.Entry == 50789 || o.Entry == 50805 || o.Entry == 50783 || o.Entry == 50782 || o.Entry == 50791 || o.Entry == 51059 || o.Entry == 50334 || o.Entry == 51078 || o.Entry == 50331 || o.Entry == 50332 || o.Entry == 50333 || o.Entry == 50336) && Me.HealthPercent < 80) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}, but don't Kill Pandaria Mob with Health < 80%", o.Name, o.Entry); return; } if (Rarekiller.Settings.NotKillTameable && o.IsTameable) // ... I want to tame him :) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}, but kill tameable", o.Name, o.Entry); return; } #endregion Logging.WriteQuiet(Colors.MediumPurple, "Rarekiller: Find a hunted Mob called {0} ID {1}", o.Name, o.Entry); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Mob Location: {0} / {1} / {2}", Convert.ToString(o.X), Convert.ToString(o.Y), Convert.ToString(o.Z)); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: Find {0} ID {1}')", o.Name, o.Entry); } #region don't kill if ... if (Rarekiller.Settings.PullCounter >= Rarekiller.Settings.MaxPullCounter) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but I pulled him now {1} Times", o.Name, Rarekiller.Settings.PullCounter); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 15 Minutes, MoP Rares will be deactivated"); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: I pulled now {0} times, blacklist')", Rarekiller.Settings.PullCounter); } Rarekiller.Settings.PullCounter = 0; Rarekiller.Settings.GuidCurrentPull = 0; Rarekiller.Settings.BlacklistCounter++; Rarekiller.Settings.DeactivateMoPRare(o); return; } // Don't kill Pandaria Rares with Level < 90 if ((o.Entry == 50828 || o.Entry == 50836 || o.Entry == 50840 || o.Entry == 50823 || o.Entry == 50831 || o.Entry == 50830 || o.Entry == 50832 || o.Entry == 50750 || o.Entry == 50768 || o.Entry == 50772 || o.Entry == 50766 || o.Entry == 50769 || o.Entry == 50780 || o.Entry == 50776 || o.Entry == 50739 || o.Entry == 50749 || o.Entry == 50734 || o.Entry == 50364 || o.Entry == 50363 || o.Entry == 50733 || o.Entry == 50388 || o.Entry == 50341 || o.Entry == 50349 || o.Entry == 50340 || o.Entry == 50347 || o.Entry == 50338 || o.Entry == 50344 || o.Entry == 50339 || o.Entry == 50354 || o.Entry == 50351 || o.Entry == 50355 || o.Entry == 50356 || o.Entry == 50350 || o.Entry == 50352 || o.Entry == 50359 || o.Entry == 50821 || o.Entry == 50817 || o.Entry == 50822 || o.Entry == 50816 || o.Entry == 50811 || o.Entry == 50808 || o.Entry == 50820 || o.Entry == 50787 || o.Entry == 50806 || o.Entry == 50789 || o.Entry == 50805 || o.Entry == 50783 || o.Entry == 50782 || o.Entry == 50791 || o.Entry == 51059 || o.Entry == 50334 || o.Entry == 51078 || o.Entry == 50331 || o.Entry == 50332 || o.Entry == 50333 || o.Entry == 50336) && Me.Level < 90) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but my level is to Low to kill him", o.Name); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: My Level is to low')", o.Name); } return; } if (o.TaggedByOther && !Rarekiller.TaggedMobsList.ContainsKey(Convert.ToInt32(o.Entry))) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but he's tagged by another Player", o.Name); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is tagged')", o.Name); } return; } //if not known ID of Inhouse Pandaria Rare --> don't kill if (!(o.Entry == 50817 || o.Entry == 50768 || o.Entry == 50836 || o.Entry == 50782 || o.Entry == 50331 || o.Entry == 51078 || o.Entry == 50822 || o.Entry == 50831 || o.Entry == 50832 || o.Entry == 50769)) { if (Me.IsFlying && Me.IsOutdoors && o.IsIndoors) { Logging.Write(Colors.MediumPurple, "Rarekiller: Mob is Indoors and I fly Outdoors, so blacklist him to prevent Problems"); Logging.Write(Colors.MediumPurple, "Rarekiller: You have to place me next to the Spawnpoint, if you want me to hunt this Mob."); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is Indoors')", o.Name); } return; } } if (o.Level > (Me.Level + 4)) // ... 4 Levels higher them me { Logging.Write(Colors.MediumPurple, "Rarekiller: His Level is 5 over mine, better not to kill him."); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (o.IsFriendly) // ... is Friendly { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but he's friendly", o.Name); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: NPC is friendly')", o.Name); } return; } if ((o.Entry == 32630) && !Rarekiller.Settings.Vyragosa) // ... my Settings say don't kill Vyragosa { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Config says: don't kill Vyragosa."); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: don't kill NPC')", o.Name); } return; } if ((o.Entry == 50057) && !Rarekiller.Settings.Blazewing) // ... my Settings say don't kill Blazewing { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Config says: don't kill Blazewing."); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist5)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 5 Minutes."); if (Rarekiller.Settings.LUAoutput) { Lua.DoString("print('NPCScan: don't kill NPC')", o.Name); } return; } if ((o.Entry == 596) || (o.Entry == 599) || Me.IsInInstance) { // ... Instance Mobs, don't run wild in Instances Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Don't run wild because of RareMobs in Instances."); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); return; } if (Rarekiller.BlacklistMobsList.ContainsKey(Convert.ToInt32(o.Entry))) // ... Mob is Blacklisted in Rarekiller/config/BlacklistedMobs.xml { Logging.Write(Colors.MediumPurple, "Rarekiller: {0} is Member of the BlacklistedMobs.xml", o.Name); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist15)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 15 Minutes."); return; } if (Rarekiller.DontInteract) { return; } #endregion if (Rarekiller.Settings.Alert) { Rarekiller.Alert(); } #region fly to Helperpoint for some Pandaria Rares if (Me.IsFlying && (o.Entry == 50817 || o.Entry == 50768 || o.Entry == 50836 || o.Entry == 50782 || o.Entry == 50331 || o.Entry == 51078 || o.Entry == 50822 || o.Entry == 50831 || o.Entry == 50832 || o.Entry == 50769 || o.Entry == 50749 || o.Entry == 50334 || o.Entry == 50347 || o.Entry == 50811 || o.Entry == 50821 || o.Entry == 50808 || o.Entry == 50820)) { WoWPoint Helperpoint = o.Location; if (o.Entry == 50817) { Helperpoint = LandingPoint50817; } if (o.Entry == 50768) { Helperpoint = LandingPoint50768; } if (o.Entry == 50836) { Helperpoint = LandingPoint50836; } if (o.Entry == 50782) { Helperpoint = LandingPoint50782; } if (o.Entry == 50831) { Helperpoint = LandingPoint50831; } if (o.Entry == 50832) { Helperpoint = LandingPoint50832; } if (o.Entry == 50769) { Helperpoint = LandingPoint50769; } if (o.Entry == 50822) { Helperpoint = LandingPoint50822; } if (o.Entry == 50331) { Helperpoint = LandingPoint50331; } if (o.Entry == 51078) { Helperpoint = LandingPoint51078; } if (o.Entry == 50749) { Helperpoint = LandingPoint50749; } if (o.Entry == 50334) { Helperpoint = LandingPoint50334; } if (o.Entry == 50347) { Helperpoint = LandingPoint50347; } if (o.Entry == 50811) { Helperpoint = LandingPoint50811; } if (o.Entry == 50821) { Helperpoint = LandingPoint50821; } if (o.Entry == 50808) { Helperpoint = LandingPoint50808; } if (o.Entry == 50820) { Helperpoint = LandingPoint50820; } if (!Rarekiller.MoveTo(Helperpoint, o, 5, false)) { return; } Rarekiller.Dismount(); } #endregion #region Check PullRange if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell) && ( o.Entry == 50836 || o.Entry == 50782 || o.Entry == 50331 || o.Entry == 51078 || o.Entry == 50822 || o.Entry == 50831 || o.Entry == 50832 || o.Entry == 50768 || o.Entry == 50749 || o.Entry == 50334 || o.Entry == 50347 || o.Entry == 50811 || o.Entry == 50821 || o.Entry == 50808 || o.Entry == 50820)) { Rarekiller.Settings.Range = "27"; Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to 27 because of Inhouse Pandaria Rare"); } else if (o.Entry == 50828 || o.Entry == 50836 || o.Entry == 50840 || o.Entry == 50823 || o.Entry == 50831 || o.Entry == 50830 || o.Entry == 50832 || o.Entry == 50750 || o.Entry == 50768 || o.Entry == 50772 || o.Entry == 50766 || o.Entry == 50769 || o.Entry == 50780 || o.Entry == 50776 || o.Entry == 50739 || o.Entry == 50749 || o.Entry == 50734 || o.Entry == 50364 || o.Entry == 50363 || o.Entry == 50733 || o.Entry == 50388 || o.Entry == 50341 || o.Entry == 50349 || o.Entry == 50340 || o.Entry == 50347 || o.Entry == 50338 || o.Entry == 50344 || o.Entry == 50339 || o.Entry == 50354 || o.Entry == 50351 || o.Entry == 50355 || o.Entry == 50356 || o.Entry == 50350 || o.Entry == 50352 || o.Entry == 50359 || o.Entry == 50821 || o.Entry == 50817 || o.Entry == 50822 || o.Entry == 50816 || o.Entry == 50811 || o.Entry == 50808 || o.Entry == 50820 || o.Entry == 50787 || o.Entry == 50806 || o.Entry == 50789 || o.Entry == 50805 || o.Entry == 50783 || o.Entry == 50782 || o.Entry == 50791 || o.Entry == 51059 || o.Entry == 50334 || o.Entry == 51078 || o.Entry == 50331 || o.Entry == 50332 || o.Entry == 50333 || o.Entry == 50336) { Rarekiller.Settings.Range = "3"; Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to 3 because of other Pandaria Rares"); } else if (!Rarekiller.Settings.DefaultPull && (Convert.ToInt64(Rarekiller.Settings.Range) > Convert.ToInt64(Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull)))) { Rarekiller.Settings.Range = Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull); Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to {0} because of Low-Ranged Customized Spell", Rarekiller.Spells.RangeCheck(Rarekiller.Settings.Pull)); } else if (Rarekiller.Settings.DefaultPull && (Convert.ToInt64(Rarekiller.Settings.Range) > Convert.ToInt64(Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell)))) { Rarekiller.Settings.Range = Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell); Logging.Write(Colors.MediumPurple, "Rarekiller: Set Range to {0} because of Low-Ranged Default Spell", Rarekiller.Spells.RangeCheck(Rarekiller.Spells.FastPullspell)); } #endregion #region Move To Mob if (o.Entry == 50817 || o.Entry == 50768 || o.Entry == 50836 || o.Entry == 50782 || o.Entry == 50331 || o.Entry == 51078 || o.Entry == 50822 || o.Entry == 50831 || o.Entry == 50832 || o.Entry == 50769 || o.Entry == 50749 || o.Entry == 50334 || o.Entry == 50347 || o.Entry == 50811 || o.Entry == 50821 || o.Entry == 50808 || o.Entry == 50820) { if (!Rarekiller.MoveTo(o, Convert.ToInt64(Rarekiller.Settings.Range), true)) { return; } } else { if (!Rarekiller.MoveTo(o, Convert.ToInt64(Rarekiller.Settings.Range), false)) { return; } } #endregion #region Special Behavior Nal'lak //if (Me.Combat && o.Entry == 50364) //Nal'lak //{ // WoWMovement.MoveStop(); // Thread.Sleep(100); // if (Me.IsFlying) // { // WoWUnit GroundUnit = ObjectManager.GetObjectsOfType<WoWUnit>().Where(u => (!u.IsFlying)).OrderBy(u => u.Distance).FirstOrDefault(); ; // if (!Rarekiller.DescendToLand(GroundUnit)) return; // } // Rarekiller.Dismount(); //} #endregion #region Special Behavior Clean up Area if (o.Entry == 50749 || o.Entry == 50334 || o.Entry == 50347) { ObjectManager.Update(); List <WoWUnit> AddList = ObjectManager.GetObjectsOfType <WoWUnit>().Where(Add => !Add.IsDead && Add.IsHostile && (Add != o) && Add.Location.Distance(o.Location) < 27 && Add.Location.Distance(Me.Location) < 27).OrderBy(Add => Add.Distance).ToList(); foreach (WoWUnit Add in AddList) { if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.RangedPullspell, Add, true); Logging.Write(Colors.MediumPurple, "Rarekiller: Clean up Area, pull Add: {0}", Add.Name); return; } } } #endregion #region Pull Mob Logging.Write(Colors.MediumPurple, "Rarekiller: Pull at Mob Location: {0} / {1} / {2}", Convert.ToString(o.X), Convert.ToString(o.Y), Convert.ToString(o.Z)); Logging.Write(Colors.MediumPurple, "Rarekiller: ... my Location: {0} / {1} / {2}", Convert.ToString(Me.X), Convert.ToString(Me.Y), Convert.ToString(Me.Z)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Target is Flying - {0}", o.IsFlying); o.Target(); if (SpellManager.HasSpell(Rarekiller.Spells.RangedPullspell) && (o.Entry == 50817 || o.Entry == 50768 || o.Entry == 50836 || o.Entry == 50782 || o.Entry == 50331 || o.Entry == 51078 || o.Entry == 50822 || o.Entry == 50831 || o.Entry == 50832 || o.Entry == 50769 || o.Entry == 50749 || o.Entry == 50334 || o.Entry == 50347 || o.Entry == 50811 || o.Entry == 50821 || o.Entry == 50808 || o.Entry == 50820)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.RangedPullspell, o, true); } else if (!(Rarekiller.Settings.DefaultPull) && SpellManager.HasSpell(Rarekiller.Settings.Pull)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Settings.Pull, o, false); } else if (SpellManager.HasSpell(Rarekiller.Spells.FastPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.FastPullspell, o, false); } else { Logging.Write(Colors.MediumPurple, "Rarekiller: I have no valid Pullspell - sorry"); } if (Me.CurrentTarget != o) { o.Target(); } #endregion #region Quick Slowfall for known flying Mobs if (Rarekiller.Settings.UseSlowfall && ((o.Entry == 29753) || (o.Entry == 32491) || (o.Entry == 32630) || (o.Entry == 33687) || (o.Entry == 50364))) { Thread.Sleep(500); if (Me.IsFalling) { Rarekiller.Slowfall.HelpFalling(); } } Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Use Quick Slowfall: {0} Mob: {1}", Me.IsFalling, o.Name); #endregion #region Pulltimer and Pullcounter WaitAfterPullTimer.Reset(); WaitAfterPullTimer.Start(); while (WaitAfterPullTimer.IsRunning && !Rarekiller.ToonInvalidCombat && WaitAfterPullTimer.ElapsedMilliseconds < 2000) { Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Wait for Combat now {0} ms", WaitAfterPullTimer.ElapsedMilliseconds); Thread.Sleep(100); } if (CastSuccess && Me.Combat) { Logging.Write(Colors.MediumPurple, "Rarekiller: Successfully pulled {0}", o.Name); } if (o.Entry != 32491 && o.Entry != 50005 && (Rarekiller.Settings.GuidCurrentPull != o.Guid) && Me.Combat) { Rarekiller.Settings.PullCounter = 1; Rarekiller.Settings.GuidCurrentPull = o.Guid; Logging.Write(Colors.MediumPurple, "Rarekiller: Pulled {0} now first time", o.Name); } else if (Me.Combat) { Rarekiller.Settings.PullCounter++; Logging.Write(Colors.MediumPurple, "Rarekiller: Pulled {0} now {1} times", o.Name, Rarekiller.Settings.PullCounter); if ((o.Entry == 50828 || o.Entry == 50836 || o.Entry == 50840 || o.Entry == 50823 || o.Entry == 50831 || o.Entry == 50830 || o.Entry == 50832 || o.Entry == 50750 || o.Entry == 50768 || o.Entry == 50772 || o.Entry == 50766 || o.Entry == 50769 || o.Entry == 50780 || o.Entry == 50776 || o.Entry == 50739 || o.Entry == 50749 || o.Entry == 50734 || o.Entry == 50364 || o.Entry == 50363 || o.Entry == 50733 || o.Entry == 50388 || o.Entry == 50341 || o.Entry == 50349 || o.Entry == 50340 || o.Entry == 50347 || o.Entry == 50338 || o.Entry == 50344 || o.Entry == 50339 || o.Entry == 50354 || o.Entry == 50351 || o.Entry == 50355 || o.Entry == 50356 || o.Entry == 50350 || o.Entry == 50352 || o.Entry == 50359 || o.Entry == 50821 || o.Entry == 50817 || o.Entry == 50822 || o.Entry == 50816 || o.Entry == 50811 || o.Entry == 50808 || o.Entry == 50820 || o.Entry == 50787 || o.Entry == 50806 || o.Entry == 50789 || o.Entry == 50805 || o.Entry == 50783 || o.Entry == 50782 || o.Entry == 50791 || o.Entry == 51059 || o.Entry == 50334 || o.Entry == 51078 || o.Entry == 50331 || o.Entry == 50332 || o.Entry == 50333 || o.Entry == 50336) && Me.Level < 90) { RoutineManager.Current.Combat(); } } #endregion #region Move to a Save Fighting Area after Pull for some Pandaria Rares if ((o.Entry == 50768 || o.Entry == 50832) && Me.Combat) { WoWPoint SaveHelperpoint = o.Location; Logging.Write(Colors.MediumPurple, "Rarekiller: Move to Save Fighting Point", o.Entry); if (o.Entry == 50768) { SaveHelperpoint = SavePoint50768; } if (o.Entry == 50832) { SaveHelperpoint = SavePoint50832; } if (Navigator.CanNavigateFully(Me.Location, SaveHelperpoint)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Move to Save Fighting Point"); while (Me.Location.Distance(SaveHelperpoint) > 5) { if (Me.IsSwimming) { WoWMovement.ClickToMove(SaveHelperpoint); } else { Navigator.MoveTo(SaveHelperpoint); } Thread.Sleep(100); if (Rarekiller.ToonInvalid) { return; } } } else { Logging.Write(Colors.MediumPurple, "Rarekiller: Wasn't able to Move to Save Fighting Point", o.Entry); } } #endregion return; } else if (o.IsDead) { if (o.Guid == Rarekiller.Settings.GuidCurrentPull) { Rarekiller.Settings.PullCounter = 0; Rarekiller.Settings.GuidCurrentPull = 0; Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Set PullCounter to {0}", Rarekiller.Settings.PullCounter); } if (o.CanLoot) { if (!Rarekiller.Loothelper(o)) { return; } } if (!Blacklist.Contains(o.Guid, Rarekiller.Settings.Flags)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Find {0}, but sadly he's dead", o.Name); Blacklist.Add(o.Guid, Rarekiller.Settings.Flags, TimeSpan.FromSeconds(Rarekiller.Settings.Blacklist60)); Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: Blacklist Mob for 60 Minutes."); } } } }
public void WarriorKill(WoWUnit Unit) { //Arms warrior: rend, colossus smash, mortal strike, overpower, slam if (SpellManager.HasSpell("Mortal Strike")) { if (SpellManager.HasSpell("Battle Stance") && !SpellManager.Spells["Battle Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Battle Stance", Me, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Rend") && !SpellManager.Spells["Rend"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Battle Stance") && !SpellManager.Spells["Battle Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Battle Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Rend", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Colossus Smash") && !SpellManager.Spells["Colossus Smash"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Battle Stance") && !SpellManager.Spells["Battle Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Me.ActiveAuras.ContainsKey("Berserker Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Battle Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Colossus Smash", Unit, true); Thread.Sleep(100); } if (!SpellManager.Spells["Mortal Strike"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Mortal Strike", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Overpower") && !SpellManager.Spells["Overpower"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Overpower", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Slam") && !SpellManager.Spells["Slam"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Slam", Unit, true); Thread.Sleep(100); } } //Fury warrior: Colossus smash, raging blow, bloodthirst, heroic strike else if (SpellManager.HasSpell("Bloodthirst")) { if (SpellManager.HasSpell("Berserker Stance") && !SpellManager.Spells["Berserker Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Berserker Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Berserker Stance", Me, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Colossus Smash") && !SpellManager.Spells["Colossus Smash"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Berserker Stance") && !SpellManager.Spells["Berserker Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Me.ActiveAuras.ContainsKey("Berserker Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Berserker Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Colossus Smash", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Raging Blow") && !SpellManager.Spells["Raging Blow"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Berserker Stance") && !SpellManager.Spells["Berserker Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Me.ActiveAuras.ContainsKey("Berserker Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Berserker Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Raging Blow", Unit, true); Thread.Sleep(100); } if (!SpellManager.Spells["Bloodthirst"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Bloodthirst", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Heroic Strike") && !SpellManager.Spells["Heroic Strike"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Heroic Strike", Unit, true); Thread.Sleep(100); } } //Prot Warrior: Thunder Clap, Revenge, Shield Slam, Shockwave, Devastate else if (SpellManager.HasSpell("Shield Slam")) { if (SpellManager.HasSpell("Defensive Stance") && !SpellManager.Spells["Defensive Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Defensive Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Defensive Stance", Me, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Thunder Clap") && !SpellManager.Spells["Thunder Clap"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Defensive Stance") && !SpellManager.Spells["Defensive Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Battle Stance") && !Me.ActiveAuras.ContainsKey("Defensive Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Defensive Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Thunder Clap", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Revenge") && !SpellManager.Spells["Revenge"].Cooldown && !Unit.Dead) { if (SpellManager.HasSpell("Defensive Stance") && !SpellManager.Spells["Defensive Stance"].Cooldown && !Me.ActiveAuras.ContainsKey("Defensive Stance") && !Unit.Dead) { RarekillerSpells.CastSafe("Defensive Stance", Me, true); Thread.Sleep(100); return; } RarekillerSpells.CastSafe("Revenge", Unit, true); Thread.Sleep(100); } if (!SpellManager.Spells["Shield Slam"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Shield Slam", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Shockwave") && !SpellManager.Spells["Shockwave"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Shockwave", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Devastate") && !SpellManager.Spells["Devastate"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Devastate", Unit, true); Thread.Sleep(100); } } }
public void PaladinKill(WoWUnit Unit) { // -------- Heal if (Me.HealthPercent < 10 && SpellManager.HasSpell("Flash of Light")) { while (Me.HealthPercent < 30 && SpellManager.HasSpell("Flash of Light")) { RarekillerSpells.CastSafe("Flash of Light", Me, true); Thread.Sleep(100); } } if (Me.HealthPercent < 30 && SpellManager.HasSpell("Divine Light")) { while (Me.HealthPercent < 50 && SpellManager.HasSpell("Divine Light")) { RarekillerSpells.CastSafe("Divine Light", Me, true); Thread.Sleep(100); } } //Retribution Paladin if (SpellManager.HasSpell("Templar's Verdict")) { if (SpellManager.HasSpell("Seal of Truth") && !SpellManager.Spells["Seal of Truth"].Cooldown && !Me.ActiveAuras.ContainsKey("Seal of Truth") && !Unit.Dead) { RarekillerSpells.CastSafe("Seal of Truth", Me, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Guardian of Ancient Kings") && !SpellManager.Spells["Guardian of Ancient Kings"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Guardian of Ancient Kings", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Hammer of Wrath") && !SpellManager.Spells["Hammer of Wrath"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Hammer of Wrath", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Exorcism") && !SpellManager.Spells["Exorcism"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Exorcism", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Judgement") && !SpellManager.Spells["Judgement"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Judgement", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Holy Wrath") && !SpellManager.Spells["Holy Wrath"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Holy Wrath", Unit, true); Thread.Sleep(100); } } else { if (SpellManager.HasSpell("Seal of Truth") && !SpellManager.Spells["Seal of Truth"].Cooldown && !Me.ActiveAuras.ContainsKey("Seal of Truth") && !Unit.Dead) { RarekillerSpells.CastSafe("Seal of Truth", Me, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Exorcism") && !SpellManager.Spells["Exorcism"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Exorcism", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Judgement") && !SpellManager.Spells["Judgement"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Judgement", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Holy Wrath") && !SpellManager.Spells["Holy Wrath"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Holy Wrath", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Crusader Strike") && !SpellManager.Spells["Crusader Strike"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Crusader Strike", Unit, true); Thread.Sleep(100); } } }
public void PriestKill(WoWUnit Unit) { if (Me.HealthPercent < 10 && SpellManager.HasSpell("Flash Heal")) { while (Me.HealthPercent < 30 && SpellManager.HasSpell("Flash Heal")) { RarekillerSpells.CastSafe("Flash Heal", Me, true); Thread.Sleep(100); } } if (Me.HealthPercent < 30 && SpellManager.HasSpell("Greater Heal")) { while (Me.HealthPercent < 50 && SpellManager.HasSpell("Greater Heal")) { RarekillerSpells.CastSafe("Greater Heal", Me, true); Thread.Sleep(100); } } if (Me.HealthPercent < 50 && SpellManager.HasSpell("Renew") && !SpellManager.Spells["Renew"].Cooldown) { RarekillerSpells.CastSafe("Renew", Me, true); Thread.Sleep(100); } if (Me.ManaPercent < 40 && SpellManager.HasSpell("Dispersion") && !SpellManager.Spells["Dispersion"].Cooldown) { RarekillerSpells.CastSafe("Dispersion", Me, true); Thread.Sleep(6500); } if (Me.ManaPercent < 10 && SpellManager.HasSpell("Shoot") && !SpellManager.Spells["Shoot"].Cooldown) { while (Me.ManaPercent < 30 && SpellManager.HasSpell("Shoot")) { RarekillerSpells.CastSafe("Shoot", Unit, true); Thread.Sleep(6500); return; } } // -------- Shadow Form if possible if (SpellManager.HasSpell("Shadowform") && SpellManager.CanCast("Shadowform") && !Me.ActiveAuras.ContainsKey("Shadowform")) { RarekillerSpells.CastSafe("Shadowform", Me, true); Thread.Sleep(100); } // -------- Damage DOTs Renew if (SpellManager.HasSpell("Vampiric Embrance") && !SpellManager.Spells["Vampiric Embrance"].Cooldown && !Me.ActiveAuras.ContainsKey("Vampiric Embrance")) { RarekillerSpells.CastSafe("Vampiric Embrance", Me, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Vampiric Touch") && !SpellManager.Spells["Vampiric Touch"].Cooldown && !Unit.ActiveAuras.ContainsKey("Vampiric Touch")) { RarekillerSpells.CastSafe("Vampiric Touch", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Shadow Word: Pain") && !SpellManager.Spells["Shadow Word: Pain"].Cooldown && !Unit.ActiveAuras.ContainsKey("Shadow Word: Pain")) { RarekillerSpells.CastSafe("Shadow Word: Pain", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Devouring Plague") && !SpellManager.Spells["Devouring Plague"].Cooldown && !Unit.ActiveAuras.ContainsKey("Devouring Plague")) { RarekillerSpells.CastSafe("Devouring Plague", Unit, true); Thread.Sleep(100); return; } // -------- Damage Spells if (SpellManager.HasSpell("Mind Blast") && !SpellManager.Spells["Mind Blast"].Cooldown) { RarekillerSpells.CastSafe("Mind Blast", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Mind Flay") && !SpellManager.Spells["Mind Flay"].Cooldown) { RarekillerSpells.CastSafe("Mind Flay", Unit, true); Thread.Sleep(100); return; } if (!SpellManager.HasSpell("Shadowform") && SpellManager.HasSpell("Smite") && !SpellManager.Spells["Smite"].Cooldown) { RarekillerSpells.CastSafe("Smite", Unit, true); Thread.Sleep(100); return; } if (!SpellManager.HasSpell("Shadowform") && SpellManager.HasSpell("Holy Fire") && !SpellManager.Spells["Holy Fire"].Cooldown) { RarekillerSpells.CastSafe("Holy Fire", Unit, true); Thread.Sleep(100); return; } }
public void findAndKillDormus() { bool CastSuccess = false; if (Rarekiller.Settings.DeveloperLogs) { Logging.WriteDebug("Rarekiller: Scan for Dormus"); } ObjectManager.Update(); List <WoWUnit> objList = ObjectManager.GetObjectsOfType <WoWUnit>() .Where(o => ((o.Entry == 50245) || ((o.Entry == 47755) && Rarekiller.Settings.TestKillDormus) //Testcase Warlord Ihsenn )) .OrderBy(o => o.Distance).ToList(); foreach (WoWUnit o in objList) { if (!o.Dead) { Logging.Write(System.Drawing.Color.MediumPurple, "Rarekiller Part Dormus: Find Dormus."); if (Rarekiller.Settings.Alert) { if (File.Exists(Rarekiller.Settings.SoundfileFoundRare)) { new SoundPlayer(Rarekiller.Settings.SoundfileFoundRare).Play(); } else if (File.Exists(Rarekiller.Soundfile)) { new SoundPlayer(Rarekiller.Soundfile).Play(); } else { Logging.Write(System.Drawing.Color.Red, "Rarekiller Part Dormus: playing Soundfile failes"); } } if (RoutineManager.Current.NeedRest) { Logging.Write("Rarekiller Part Dormus: CC says we need rest - Letting it do it before Fight."); RoutineManager.Current.Rest(); } if (Me.Auras.ContainsKey("Flight Form")) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted) { Lua.DoString("Dismount()"); } o.Target(); Thread.Sleep(500); while (!Rarekiller.inCombat) { // ------------- Move to Dormus with Klick to Move ------------------- Logging.Write("Rarekiller Part Dormus: Move to Dormus"); while (Me.IsSwimming) { WoWMovement.ClickToMove(o.Location); } WoWMovement.MoveStop(); while (o.Location.Distance(Me.Location) > Convert.ToInt64(Rarekiller.Settings.Range)) { if (Rarekiller.Settings.GroundMountMode) { Navigator.MoveTo(o.Location); } else { Flightor.MoveTo(o.Location); } Thread.Sleep(100); } WoWMovement.MoveStop(); // ------------- pull Dormus ------------------- Logging.WriteDebug("Rarekiller Part Dormus: Distance: {0}", o.Location.Distance(Me.Location)); o.Target(); o.Face(); Thread.Sleep(100); if (Rarekiller.Settings.ScreenCamel && Rarekiller.Settings.ScreenFound) { Lua.DoString("TakeScreenshot()"); Thread.Sleep(500); Logging.WriteDebug("Rarekiller Part Dormus: Take Screenshot before Pull"); } if (!(Rarekiller.Settings.DefaultPull) && SpellManager.HasSpell(Rarekiller.Settings.Pull)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Settings.Pull, o, true); } else if (SpellManager.HasSpell(Rarekiller.Spells.LowPullspell)) { CastSuccess = RarekillerSpells.CastSafe(Rarekiller.Spells.LowPullspell, o, true); } else { Logging.Write(System.Drawing.Color.Red, "Rarekiller Part Dormus: I have no Pullspell"); } if (!CastSuccess && SpellManager.HasSpell("Shoot")) { CastSuccess = RarekillerSpells.CastSafe("Shoot", o, true); } if (CastSuccess) { Logging.Write("Rarekiller Part Dormus: successfully pulled Dormus"); Logging.WriteDebug("Rarekiller Part Dormus: Pull Distance: {0}", o.Location.Distance(Me.Location)); return; } else if (!CastSuccess && Rarekiller.inCombat) { Logging.Write("Rarekiller Part Dormus: got Aggro"); } else { Logging.Write("Rarekiller Part Dormus: Pull Fails - Set Range to 3 for next try"); Rarekiller.Settings.Range = "3"; } } } else { Logging.Write("Rarekiller Part Dormus: Find {0}, but he's dead", o.Name); // ----------------- Loot Helper --------------------- if (o.CanLoot) { if (Me.Auras.ContainsKey("Flight Form")) { Lua.DoString("CancelShapeshiftForm()"); } else if (Me.Mounted) { Lua.DoString("Dismount()"); } o.Target(); // ------------- Move to Corpse with Klick to Move ------------------- Logging.Write("Rarekiller Part Dormus: ... move to him to loot"); while (o.Location.Distance(Me.Location) > 3) { Navigator.MoveTo(o.Location); Thread.Sleep(100); } Thread.Sleep(500); WoWMovement.MoveStop(); if (Rarekiller.Settings.ScreenCamel && Rarekiller.Settings.ScreenSuccess) { Lua.DoString("TakeScreenshot()"); Thread.Sleep(500); Logging.WriteDebug("Rarekiller Part Dormus: Take Screenshot successfully killed {0}", o.Name); } o.Interact(); Thread.Sleep(2000); Lua.DoString("RunMacroText(\"/click StaticPopup1Button1\");"); Thread.Sleep(4000); if (!o.CanLoot) { Logging.Write("Rarekiller Part Dormus: successfuly looted"); } else { Logging.Write("Rarekiller Part Dormus: Loot failed, try again"); } } } } }
public void DruidKill(WoWUnit Unit) { if (Me.ActiveAuras.ContainsKey("Eclipse (Lunar)")) { EclipseMoon = true; EclipseSun = false; } else if (Me.ActiveAuras.ContainsKey("Eclipse (Solar)")) { EclipseMoon = false; EclipseSun = true; } // -------- Heal if (Me.HealthPercent < 10 && SpellManager.HasSpell("Regrowth")) { while (Me.HealthPercent < 30 && SpellManager.HasSpell("Regrowth")) { RarekillerSpells.CastSafe("Regrowth", Me, true); Thread.Sleep(100); } } if (Me.HealthPercent < 30 && SpellManager.HasSpell("Healing Thouch")) { while (Me.HealthPercent < 50 && SpellManager.HasSpell("Healing Thouch")) { RarekillerSpells.CastSafe("Healing Thouch", Me, true); Thread.Sleep(100); } } if (SpellManager.HasSpell("Mangle") && SpellManager.HasSpell("Cat Form") && SpellManager.CanCast("Cat Form") && !Me.ActiveAuras.ContainsKey("Cat Form")) { RarekillerSpells.CastSafe("Cat Form", Me, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Moonkin Form") && SpellManager.CanCast("Moonkin Form") && !Me.ActiveAuras.ContainsKey("Moonkin Form")) { RarekillerSpells.CastSafe("Moonkin Form", Me, true); Thread.Sleep(100); return; } // -------- Damage Cat if (Me.ActiveAuras.ContainsKey("Cat Form")) { if (SpellManager.HasSpell("Rip") && !SpellManager.Spells["Rip"].Cooldown && (Me.ComboPoints > 4)) { RarekillerSpells.CastSafe("Rip", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Tiger's Fury") && !SpellManager.Spells["Tiger's Fury"].Cooldown) { RarekillerSpells.CastSafe("Tiger's Fury", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Mangle") && !SpellManager.Spells["Mangle"].Cooldown) { RarekillerSpells.CastSafe("Mangle", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Rake") && !SpellManager.Spells["Rake"].Cooldown) { RarekillerSpells.CastSafe("Rake", Unit, true); Thread.Sleep(100); return; } } // -------- Damage Cat else { if (SpellManager.HasSpell("Insect Swarm") && !SpellManager.Spells["Rake"].Cooldown && !Unit.ActiveAuras.ContainsKey("Insect Swarm")) { RarekillerSpells.CastSafe("Insect Swarm", Unit, true); Thread.Sleep(100); return; } if (EclipseSun) { if (SpellManager.HasSpell("Sunfire") && !SpellManager.Spells["Sunfire"].Cooldown && !Unit.Auras.ContainsKey("Sunfire")) { RarekillerSpells.CastSafe("Sunfire", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Starsurge") && !SpellManager.Spells["Starsurge"].Cooldown && Me.Auras.ContainsKey("Shooting Stars")) { RarekillerSpells.CastSafe("Starsurge", Unit, true); Thread.Sleep(100); return; } if (!SpellManager.HasSpell("Wrath") && !SpellManager.Spells["Wrath"].Cooldown && SpellManager.CanCast("Wrath")) { RarekillerSpells.CastSafe("Wrath", Unit, true); Thread.Sleep(100); return; } } else { if (SpellManager.HasSpell("Moonfire") && !SpellManager.Spells["Moonfire"].Cooldown && !Unit.Auras.ContainsKey("Moonfire")) { RarekillerSpells.CastSafe("Moonfire", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Starsurge") && !SpellManager.Spells["Starsurge"].Cooldown && Me.Auras.ContainsKey("Shooting Stars")) { RarekillerSpells.CastSafe("Starsurge", Unit, true); Thread.Sleep(100); return; } if (SpellManager.HasSpell("Starfire") && !SpellManager.Spells["Starfire"].Cooldown) { RarekillerSpells.CastSafe("Starfire", Unit, true); Thread.Sleep(100); return; } } } }
/// <summary> /// Activates Slow Fall and checks if it was successfull /// </summary> public void HelpFalling() { if (Rarekiller.Settings.SlowfallSpell == "") { Rarekiller.Settings.SlowfallSpell = "No special Spell given by User"; } if (Rarekiller.Settings.SlowfallItem == "") { Rarekiller.Settings.SlowfallItem = "No special Item given by User"; } int UseSlowfall = 1; //Slowfall Spell if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && Rarekiller.Settings.Spell && SpellManager.HasSpell(Rarekiller.Settings.SlowfallSpell)) { RarekillerSpells.CastSafe(Rarekiller.Settings.SlowfallSpell, Me, false); //SpellManager.Cast(Rarekiller.Settings.SlowfallSpell); Thread.Sleep(200); if (Me.HasAura(Rarekiller.Settings.SlowfallSpell)) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability {0}", Rarekiller.Settings.SlowfallSpell); return; } } //Cloak if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && Rarekiller.Settings.Cloak && (Me.Inventory.Equipped.Back.Cooldown == 0)) { if (Me.Inventory.Equipped.Back.Usable) { Me.Inventory.Equipped.Back.Use(); Thread.Sleep(200); } if (Me.HasAura("Parachute") || Me.HasAura("Slow Fall")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability Cloak"); return; } } //Snowfall Lager english if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && Rarekiller.Settings.Item && Rarekiller.Settings.SlowfallItem == "Snowfall Lager") { if (SnowfallLagerID.Usable) { SnowfallLagerID.Use(); // or use Item Thread.Sleep(200); } if (Me.HasAura("Snowfall Lager") || Me.HasAura("Parachute") || Me.HasAura("Slow Fall")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability {0}", Rarekiller.Settings.SlowfallItem); return; } } //Snowfall Lager Client Language if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && Rarekiller.Settings.Item) { if (SnowfallLagerString != null) { if (SnowfallLagerString.Usable) { SnowfallLagerString.Use(); // or use Item Thread.Sleep(200); } if (Me.HasAura("Snowfall Lager") || Me.HasAura("Parachute") || Me.HasAura("Slow Fall")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability {0}", Rarekiller.Settings.SlowfallItem); return; } } } #region Notfallzauber Levitate, Slow Fall, Snowfall Lager by ID if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && SpellManager.HasSpell("Slow Fall")) { RarekillerSpells.CastSafe("Slow Fall", Me, false); //SpellManager.Cast("Slow Fall"); Thread.Sleep(200); if (Me.HasAura("Slow Fall")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability Slow Fall"); return; } } if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && SpellManager.HasSpell("Levitate")) { RarekillerSpells.CastSafe("Levitate", Me, false); //SpellManager.Cast("Levitate"); Thread.Sleep(200); if (Me.HasAura("Levitate")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability Levitate"); return; } } if (!Me.HasAura("Snowfall Lager") && !Me.HasAura("Parachute") && !Me.HasAura(Rarekiller.Settings.SlowfallSpell) && !Me.HasAura("Slow Fall") && !Me.HasAura("Levitate") && SnowfallLagerID != null) { Logging.Write(Colors.MediumPurple, "Rarekiller: Found {0} in Bag", SnowfallLagerID.Name); if (SnowfallLagerID.Usable) { SnowfallLagerID.Use(); // or use Item Thread.Sleep(200); } if (Me.HasAura("Snowfall Lager")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Used Slowfall Ability Snowfall Lager (ID)"); return; } } #endregion #region Slowfall sucessfull ? if (Me.HasAura("Snowfall Lager") || Me.HasAura("Parachute") || Me.HasAura(Rarekiller.Settings.SlowfallSpell) || Me.HasAura("Slow Fall") || Me.HasAura("Levitate")) { Logging.Write(Colors.MediumPurple, "Rarekiller: Slowfall successfull, Parachute to Ground"); //Überprüfen: if (Me.CurrentTarget != null) { if (Me.CurrentTarget.IsMe) { Me.ClearTarget(); } if (!Me.CurrentTarget.IsMe) { Me.CurrentTarget.Face(); } } } else { if (Me.IsDead || Me.IsGhost) { Logging.Write(Colors.MediumPurple, "Rarekiller: I'm dead"); return; } if (!Me.IsFalling) { Logging.Write(Colors.MediumPurple, "Rarekiller: Don't fall any more"); return; } if (UseSlowfall >= 3) { Logging.Write(Colors.MediumPurple, "Rarekiller: Slowfall failed 3 Times"); return; } Logging.Write(Colors.MediumPurple, "Rarekiller: Slowfall failed"); UseSlowfall = UseSlowfall + 1; Rarekiller.Slowfall.HelpFalling(); } #endregion // Slowfall Part End }
public void WarlockKill(WoWUnit Unit) { if (Me.ManaPercent < 10 && SpellManager.HasSpell("Shoot") && SpellManager.CanCast("Shoot")) { while (Me.ManaPercent < 30 && SpellManager.HasSpell("Shoot")) { RarekillerSpells.CastSafe("Shoot", Unit, true); Thread.Sleep(6500); return; } } // Affliction Warlock if (SpellManager.HasSpell("Unstable Affliction")) { if (SpellManager.HasSpell("Demon Soul") && !SpellManager.Spells["Demon Soul"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Demon Soul", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Haunt") && !SpellManager.Spells["Haunt"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Haunt", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Soulburn") && !SpellManager.Spells["Soulburn"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Soulburn", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Soul Fire") && !SpellManager.Spells["Soul Fire"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Soul Fire", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Bane of Agony") && !SpellManager.Spells["Bane of Agony"].Cooldown && !Unit.ActiveAuras.ContainsKey("Bane of Agony") && !Unit.Dead) { RarekillerSpells.CastSafe("Bane of Agony", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Corruption") && !SpellManager.Spells["Corruption"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Corruption", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Unstable Affliction") && !SpellManager.Spells["Unstable Affliction"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Unstable Affliction", Unit, true); Thread.Sleep(100); } } //Destruction Warlock else if (SpellManager.HasSpell("Conflagrate")) { if (SpellManager.HasSpell("Soulburn") && !SpellManager.Spells["Soulburn"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Soulburn", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Soul Fire") && !SpellManager.Spells["Soul Fire"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Soul Fire", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Bane of Doom") && !SpellManager.Spells["Bane of Doom"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Bane of Doom", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Immolate") && !SpellManager.Spells["Immolate"].Cooldown && !Unit.ActiveAuras.ContainsKey("Immolate") && !Unit.Dead) { RarekillerSpells.CastSafe("Immolate", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Conflagrate") && !SpellManager.Spells["Conflagrate"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Conflagrate", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Corruption") && !SpellManager.Spells["Corruption"].Cooldown && !Unit.ActiveAuras.ContainsKey("Corruption") && !Unit.Dead) { RarekillerSpells.CastSafe("Corruption", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Shadowflame") && !SpellManager.Spells["Shadowflame"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Shadowflame", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Chaos Bolt") && !SpellManager.Spells["Chaos Bolt"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Chaos Bolt", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Incinerate") && !SpellManager.Spells["Incinerate"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Incinerate", Unit, true); Thread.Sleep(100); } } //Demonologie else { if (SpellManager.HasSpell("Immolate") && !SpellManager.Spells["Immolate"].Cooldown && !Unit.ActiveAuras.ContainsKey("Immolate") && !Unit.Dead) { RarekillerSpells.CastSafe("Immolate", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Corruption") && !SpellManager.Spells["Corruption"].Cooldown && !Unit.ActiveAuras.ContainsKey("Corruption") && !Unit.Dead) { RarekillerSpells.CastSafe("Corruption", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Bane of Agony") && !SpellManager.Spells["Bane of Agony"].Cooldown && !Unit.ActiveAuras.ContainsKey("Bane of Agony") && !Unit.Dead) { RarekillerSpells.CastSafe("Bane of Agony", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Incinerate") && !SpellManager.Spells["Incinerate"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Incinerate", Unit, true); Thread.Sleep(100); } if (SpellManager.HasSpell("Shadow Bolt") && !SpellManager.Spells["Shadow Bolt"].Cooldown && !Unit.Dead) { RarekillerSpells.CastSafe("Shadow Bolt", Unit, true); Thread.Sleep(100); } } }