• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin / Ach] Noble Gardener

    Discussion in 'Archives' started by BarryDurex, Apr 24, 2011.

    1. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      Oh yes, big sorry!
      I forget to mention you.. :(

      So, special thanks to mastahg, too!
       
    2. iggi66

      iggi66 New Member

      Joined:
      Jan 15, 2010
      Messages:
      389
      Likes Received:
      24
      Trophy Points:
      0
      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: Apr 24, 2011
    3. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      good idea, I'll add it

      edit: I have add it in v1.1.2

      ** UPDATE **
      to v1.1.1


       
      Last edited: Apr 24, 2011
    4. Zugga

      Zugga New Member

      Joined:
      Jun 6, 2010
      Messages:
      280
      Likes Received:
      2
      Trophy Points:
      0
      this work for horde?
       
    5. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      I have not tested but it should work




      ** UPDATE **
      to v1.1.2
       
    6. iggi66

      iggi66 New Member

      Joined:
      Jan 15, 2010
      Messages:
      389
      Likes Received:
      24
      Trophy Points:
      0
      Yep, it's less detectable and running well for my two druids in travel form while writing this ^^
       
    7. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      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)
       
    8. iggi66

      iggi66 New Member

      Joined:
      Jan 15, 2010
      Messages:
      389
      Likes Received:
      24
      Trophy Points:
      0
      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..
       
    9. Zugga

      Zugga New Member

      Joined:
      Jun 6, 2010
      Messages:
      280
      Likes Received:
      2
      Trophy Points:
      0
      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?
       
    10. dudekde22

      dudekde22 New Member

      Joined:
      Jan 22, 2010
      Messages:
      265
      Likes Received:
      0
      Trophy Points:
      0
      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.
       
    11. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      Have you selected AutoLoot in the wow settings?

      yes the maillboxs are problems, maybe it works if you add the mailbox as a blackspot in your profil.
       
    12. Zugga

      Zugga New Member

      Joined:
      Jun 6, 2010
      Messages:
      280
      Likes Received:
      2
      Trophy Points:
      0
      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.
       
    13. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      an update is coming soon, maybe even in this half-hour
       
    14. Zugga

      Zugga New Member

      Joined:
      Jun 6, 2010
      Messages:
      280
      Likes Received:
      2
      Trophy Points:
      0
      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.
       
    15. sm0k3d

      sm0k3d Member

      Joined:
      Sep 27, 2010
      Messages:
      466
      Likes Received:
      12
      Trophy Points:
      18
      haha i love this plugin so many eggs!
       
    16. BarryDurex

      BarryDurex New Member

      Joined:
      Jan 20, 2010
      Messages:
      361
      Likes Received:
      32
      Trophy Points:
      0
      Thank you, but rich you as a man not 2! :cool:




      ** UPDATE **
      to v1.1.5
       
      Last edited: Apr 25, 2011
    17. kebabzaak91

      kebabzaak91 Member

      Joined:
      Sep 3, 2010
      Messages:
      105
      Likes Received:
      0
      Trophy Points:
      16
      ain't working here, dunno whats going on keep loading titles for the last 2 hours :S
       
    18. kebabzaak91

      kebabzaak91 Member

      Joined:
      Sep 3, 2010
      Messages:
      105
      Likes Received:
      0
      Trophy Points:
      16
      already tried:

      -fresh honorbuddy
      - Redownload pluging
      - Delete mesh folder

      still loading titles.
       
    19. starnzl

      starnzl New Member

      Joined:
      Jan 19, 2010
      Messages:
      297
      Likes Received:
      1
      Trophy Points:
      0
      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 :/
       
    20. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      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
       

    Share This Page