Code:<?xml version="1.0" encoding="utf-8"?> <Professionbuddy> <CustomAction Code="MyLog("Fishing in Pandaria1-600 by Alisha");" /> <If Condition="Me.ZoneId != 6134" IgnoreCanRun="True"> <CustomAction Code="MyErr("You need to move to Krasarang Wilds");" /> <CustomAction Code="TreeRoot.Stop();" /> </If> <CustomAction Code="MyLog("Leveling Fishing to 600");" /> <If Condition="SecondaryBot.Name != "Combat bot"" IgnoreCanRun="True"> <ChangeBotAction BotName="Combat bot" /> </If> <If Condition="Fishing.MaxLevel == 0" IgnoreCanRun="True"> <CallSubRoutine SubRoutineName="Training" /> </If> <CustomAction Code="Lua.DoString("SetCVar(\"AutoLootDefault\", 1)");" /> <While Condition="Fishing.Level < 600" IgnoreCanRun="True"> <If Condition="(Fishing.MaxLevel - Fishing.Level <= 25 && Fishing.MaxLevel != 600) || Me.BagsFull" IgnoreCanRun="True"> <CallSubRoutine SubRoutineName="Training" /> </If> <If Condition="DistanceTo(-1442.071, -260.4499, 0.5469447) >=1.5" IgnoreCanRun="True"> <FlyToAction Dismount="True" Location="-1442.071, -260.4499, 0.5469447" /> </If> <If Condition="!IsFacing(-1.544366f)" IgnoreCanRun="True"> <WaitAction Condition="false" Timeout="2000" /> <CustomAction Code="MyLog("Facing towards water"); PulseSW.Reset(); Me.SetFacing(-1.544366f); " /> </If> <CustomAction Code="Fish();" /> </While> <If Condition="Fishing.Level == 600" IgnoreCanRun="True"> <CustomAction Code="Log("Maxed out fishing skill! Logging out");" /> <CustomAction Code=" Lua.DoString("Logout()");TreeRoot.Stop();" /> </If> <SubRoutine SubRoutineName="Training"> <While Condition="DistanceTo(-1470.55, -259.8472, 0.1111361) >= 5" IgnoreCanRun="False"> <FlyToAction Dismount="False" Location="-1470.55, -259.8472, 0.1111361" /> </While> <CustomAction Code="MyLog("Training Skill");" /> <TrainSkillAction NpcEntry="63721" Location="-1469.26, -257.042, 0.3785554" /> <CustomAction Code="Lua.DoString("CloseTrainer()");" /> <WaitAction Condition="false" Timeout="2000" /> <SellItemAction Sell="All" NpcEntry="63721" Location="-1470.55, -259.8472, 0.1111361" SellItemType="Greys" ItemID="0" Count="0" /> </SubRoutine> <Declaration Code="Stopwatch PulseSW = new Stopwatch();" /> <Declaration Code="DateTime CastTimeStamp = DateTime.Now;" /> <Declaration Code="void MyErr(string fmt,params object[] args) { Log(Colors.Green,"Fishing1-600: ",Colors.Red,fmt,args); }" /> <Declaration Code="void MyLog(string fmt,params object[] args) { Log(Colors.Green,"Fishing1-600: ",Colors.LightGreen,fmt,args); }" /> [COLOR="#B22222"] <Declaration Code="void Fish() { if (!PulseSW.IsRunning) PulseSW.Start(); using (StyxWoW.Memory.AcquireFrame()) { if (PulseSW.ElapsedMilliseconds >= 1000) { MyErr("Warning: It took {0} milliseconds to pulse.\nThis can cause missed bites. To fix try disabling all plugins", PulseSW.ElapsedMilliseconds); } PulseSW.Reset(); PulseSW.Start(); try { var bobber = ObjectManager.GetObjectsOfType<WoWGameObject>(). FirstOrDefault(u => u.SubType == WoWGameObjectType.FishingNode && u.CreatedByGuid == Me.Guid); if (bobber != null && bobber.IsValid && ((WoWFishingBobber)bobber.SubObj).IsBobbing) { bobber.Interact(); } else if (bobber == null && !Me.IsCasting && DateTime.Now - CastTimeStamp >= TimeSpan.FromSeconds(1)) { TreeRoot.StatusText= string.Format("Fishing level: {0}",Fishing.Level); SpellManager.Cast("Fishing"); CastTimeStamp = DateTime.Now; } } catch(Exception ex){MyErr(ex.ToString());} } }" />[/COLOR] <Declaration Code="bool IsFacing(float dirInRadians) { var facePoint = WoWPoint.RayCast(Me.Location, dirInRadians, 1f); return WoWMathHelper.IsFacing(Me.Location, Me.RenderFacing, facePoint,0.5f); } " /> </Professionbuddy>
Here is the authors code with an edited section from another profile that was working for me, it seemed to fix the issue I was having with the bobber. I have highlighted the specific line that was edited in red.
This works, but I had to edit the code in Microsoft Visual Studio. When I did the edit in just regular notepad, it did not work. So, if anyone is still having problems, try that.