What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Plugin / Ach] Noble Gardener

If more then one bot of this is running at the same location, it ends up in an egg race. Maybe you should choose a random egg out of the three or five "best ones".

Edit: Here's my Pulse() with random "best one" if there are more then one.

Code:
        public override void Pulse()
        {
            if (!isInitialize) { updateList(true); isInitialize = true; }

            while (!complete && !Me.Combat)
            {
                ObjectManager.Update();
                List<WoWGameObject> _ObjList = ObjectManager.GetObjectsOfType<WoWGameObject>();
                double xyDist = double.MaxValue;
                WoWGameObject bestNode = null;
                List<WoWGameObject> bestNodes = new List<WoWGameObject>(5);


                if (StyxWoW.Me.Inventory.Equipped.OffHand != null && ((StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.Id == 45067 || StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.Id == 44802) && StyxWoW.Me.Inventory.Equipped.OffHand.Cooldown <= 0))
                {
                    Logging.Write("EGG RUSH!");
                    StyxWoW.Me.Inventory.Equipped.OffHand.Use();
                }

                //int i = 0;
                //foreach (WoWGameObject obj in _ObjList)
                //for (int i = _ObjList.Count - 1; i >= 0; i--)
                //{
                //    slog("search for best node");
                //    TreeRoot.StatusText = Name + ": search for best node";
                //    if (_ObjList[i].Entry != (uint)113768)
                //    {
                //        _ObjList.Remove(_ObjList[i]);
                //        continue;
                //    }
                //}
                int i = 0;

                while (i <= _ObjList.Count && bestNodes.Count < 5)
                {
                    foreach (WoWGameObject egg in _ObjList)
                    {
                        ++i;
                        slog("search for best node");
                        TreeRoot.StatusText = Name + ": search for best node";
                        if (egg.Entry == 113768 && egg.CanUse() ||
                            (egg.Entry == 113769 && egg.CanUse()) ||
                            (egg.Entry == 113770 && egg.CanUse()) ||
                            (egg.Entry == 113771 && egg.CanUse()))
                        {
                            double dist = egg.Distance2D;
                            if (xyDist > dist)
                            {
                                if (dist < 100)
                                {
                                    xyDist = dist;
                                    bestNodes.Add(egg);
                                    //bestNode = egg;
                                }
                            }
                        }
                        continue;
                    }
                }
                //if (bestNode != null) { slog("GuID: " + bestNode.Guid + " Distance: " + (int)bestNode.Distance); }
                //slog("found " + bestNode.Name + " Distance: " + (int)bestNode.Distance + "yards");
                //slog(bestNode.ToString());
                //TreeRoot.StatusText = Name + ": found: [" + bestNode.Name + "] Distance: " + (int)bestNode.Distance + "yards";
                //achievementFound = true;

                if (bestNodes.Count > 1)
                {
                    Random random = new Random();
                    int index = random.Next(0, (bestNodes.Count - 1)); // bestNodes.Count for List<WoWGameObject> 
                    bestNode = bestNodes[index];
                }
                else
                {
                    bestNode = bestNodes[0];
                }

                while (searchEgg == false && bestNode != null && bestNode.Location != WoWPoint.Empty && bestNode.CanUse() && !bestNode.CanUseNow())
                {
                    slog("Move to " + bestNode.Name);
                    TreeRoot.StatusText = Name + ": Move to " + bestNode.Name + " Distance: " + (int)Me.Location.Distance(bestNode.Location) + "yards";
                    Navigator.MoveTo(bestNode.Location);
                    Thread.Sleep(100);
                    CheckInventoryItems();
                }
                Navigator.MoveTo(Me.Location);
                //WoWMovement.MoveStop();
                while (bestNode != null && bestNode.IsValid /* && bestNode.Distance <= 5*/ && stuckTimer.ElapsedMilliseconds <= 2000 && bestNode.CanUseNow())
                {
                    stuckTimer.Start();
                    WoWMovement.MoveStop();
                    //if (bestNode != null) slog("Interact..");
                    TreeRoot.StatusText = Name + ": Interact..";
                    slog("looting..");
                    bestNode.Interact();
                    //Thread.Sleep(3000);
                    while (LootFrame.Instance.IsVisible)
                    {
                        TreeRoot.StatusText = Name + ": looting..";
                        if (LootFrame.Instance.IsVisible)
                        {
                            Lua.DoString("for i=1,GetNumLootItems() do ConfirmLootSlot(i) LootSlot(i) end");
                            break;
                        }
                        bestNode = null;
                        Thread.Sleep(1500);
                    }
                }

                stuckTimer.Stop(); stuckTimer.Reset();
            }
        }
 
Last edited:
If more then one bot of this is running at the same location, it ends up in an egg race. Maybe you should choose a random egg out of the three or five "best ones".
good idea, I'll add it

edit: I have add it in v1.1.2

** UPDATE **
to v1.1.1


 
Last edited:
Yep, it's less detectable and running well for my two druids in travel form while writing this ^^
yes, I already had to delete hundreds of eggs to make room.. :)

i have add your last code but for me does not work.. (v1.1.2)
 
yes, I already had to delete hundreds of eggs to make room.. :)

i have add your last code but for me does not work.. (v1.1.2)

What exactly is not working for you?

You code to equip the egg basket is quite buggy. First you have to add the null exception to your if statement:

Code:
if (StyxWoW.Me.Inventory.Equipped.OffHand == null || (StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.Id != 45067 || StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.Id != 44802))

And second, your code will not equip the basket if you have a twohanded weapon. It just throws red error messages. But I can't provide a solution for that issue..
 
Do you have to be a certain level? I tried a lvl 6 and it wont work although I can see the eggs myself and interact with them.
I also tried as per the instructions and it did not work.
Do we need to not load a blank profile anymore?
Is there a specific version of HB were supposed to be using. (downloaded the latest version didnt work)
Do you want a log to see maybe why it went wrong?
 
Great plugin, trying this out in dolanaar (night elf area) and it works great but it does get stuck on the mailbox once in a while. Otherwise, fantastic work.
 
Do you have to be a certain level? I tried a lvl 6 and it wont work although I can see the eggs myself and interact with them.
I also tried as per the instructions and it did not work.
Do we need to not load a blank profile anymore?
Is there a specific version of HB were supposed to be using. (downloaded the latest version didnt work)
Do you want a log to see maybe why it went wrong?
Have you selected AutoLoot in the wow settings?

Great plugin, trying this out in dolanaar (night elf area) and it works great but it does get stuck on the mailbox once in a while. Otherwise, fantastic work.
yes the maillboxs are problems, maybe it works if you add the mailbox as a blackspot in your profil.
 
I can not get this to work
[8:10:34 PM:343] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in c:\\Honorbuddy_2.0.0.4492\Plugins\NobleGardener.cs:line 115
at Styx.Plugins.PluginWrapper.Pulse()
[8:10:34 PM:890] Plugin [Noble Gardener] threw an exception in 'Pulse'! Exception:
[8:10:34 PM:890] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in c:\\Honorbuddy_2.0.0.4492\Plugins\NobleGardener_v1.1.2.cs:line 126
Thats it.
 
I can not get this to work
[8:10:34 PM:343] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in c:\\Honorbuddy_2.0.0.4492\Plugins\NobleGardener.cs:line 115
at Styx.Plugins.PluginWrapper.Pulse()
[8:10:34 PM:890] Plugin [Noble Gardener] threw an exception in 'Pulse'! Exception:
[8:10:34 PM:890] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in c:\\Honorbuddy_2.0.0.4492\Plugins\NobleGardener_v1.1.2.cs:line 126
Thats it.
an update is coming soon, maybe even in this half-hour
 
omg please :) I am feeling really left out with 8 pages of people saying how awesome the plugin is and I just plain cant get it to work this entire time under any circumstance. It never moves it just spams that error over and over. Im horde and in Razor Hill.
 
ain't working here, dunno whats going on keep loading titles for the last 2 hours :S
 
already tried:

-fresh honorbuddy
- Redownload pluging
- Delete mesh folder

still loading titles.
 
Seems to work ok on the horde side.. EXCEPT it seems to for no reason just go and stand in the barracks for some reason after awhile ,, wtf :/
 
for the ppl who have issues...

attach logs

i'm sorry, but i have seemed to have lost my crystal ball that hacks into your computers and steals logs
 
Back
Top