public static bool FindBobberAndClick(bool waitForLoot) { PGameObject bobber = null; Thread.Sleep(1000); _triedWorldToScreen = false; _saidSomethingManager = false; _tryingSearch = false; while (ObjectManager.MyPlayer.IsCasting) { if (bobber != null) { if (!_saidSomethingManager) { Logging.Write("Located bobber in objectmanager"); _saidSomethingManager = true; } if (LazySettings.BackgroundMode) { if (bobber.IsBobbing) { bobber.Interact(false); Thread.Sleep(1500); if (waitForLoot) { while (ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } Thread.Sleep(1300); } return(true); } } else { if (!Memory.ReadObject(Memory.BaseAddress + (uint)Pointers.Globals.MouseOverGUID, typeof(ulong)).Equals(bobber.GUID)) { if (!_triedWorldToScreen) { Logging.Write("Trying world to screen"); FindTheBobber(bobber.Location, bobber.GUID); _triedWorldToScreen = true; } else { if (!_tryingSearch) { Logging.Write("Trying search"); _tryingSearch = true; } FindBobberSearch(); } Thread.Sleep(100); } else { if (bobber.IsBobbing) { KeyHelper.SendKey("InteractWithMouseOver"); Thread.Sleep(1500); if (waitForLoot) { while (ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } Thread.Sleep(1300); } return(true); } } } Thread.Sleep(1000); } else { bobber = Bobber(); } Thread.Sleep(100); } return(false); }