• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] BuddyManager - A Botbase/Profile/Zone Changer (Now w/ Scheduling)

    Discussion in 'Archives' started by no1knowsy, Dec 6, 2011.

    1. l337pally

      l337pally New Member

      Joined:
      Jun 24, 2011
      Messages:
      473
      Likes Received:
      2
      Trophy Points:
      0
    2. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      I can add it yes. I'll just throw in an if item && nocooldown, use that.

      I'm going to rework all of my code to use separated methods so I don't have so much clutter in the main.cs file also.
      My past reworks have sucked lol. Made it barely more read-able.
       
    3. l337pally

      l337pally New Member

      Joined:
      Jun 24, 2011
      Messages:
      473
      Likes Received:
      2
      Trophy Points:
      0
      Awesome thanks, loving the plugin so far "You must spread some Reputation around before giving it to no1knowsy again."
       
    4. Altoids

      Altoids New Member

      Joined:
      Jul 21, 2011
      Messages:
      936
      Likes Received:
      8
      Trophy Points:
      0
      Toney001, wouldn't this be 'almost the same' by basically merging the 5 profiles in this type of format:

      hotspots group 1:
      spot1
      spot2
      spot3
      spot4
      /hotspots group 1

      hotspots group 2:
      spot1
      spot2
      spot3
      spot4
      /hotspots group 2

      hotspots group 3:
      spot1
      spot2
      spot3
      spot4
      /hotspots group 3

      etc...

      That way the toon would start gathering and then do 1 loop in the first loop pathing and then continue with the next hotspot group, do 1 loop with that pathing and then drop to the next group, do 1 loop with it's pathing... the only thing that would be different is that the order would be the same vs random.

      Now... I have a question cause I'm not really sure the way HB works... when it starts a profile, does it look for the nearest hotspot and start following the profile there?
       
    5. Giwin

      Giwin Well-Known Member Buddy Store Developer

      Joined:
      Dec 3, 2011
      Messages:
      3,431
      Likes Received:
      49
      Trophy Points:
      48
      thanks :cool:
       
    6. xsol

      xsol Member

      Joined:
      Nov 7, 2011
      Messages:
      503
      Likes Received:
      12
      Trophy Points:
      18
      What I mean by this is just have a button that says "Add another Grouping" and it pops up either another window, or pops into the current one.

      I can help you with this.


      Here is a basic example of how to use a Listview to track basic string groups...

      PHP:
          public partial class Example Form
          
      {
              public 
      Example()
              {
                  
      InitializeComponent();
              }

              private 
      void add_Click(object senderEventArgs e)
              {
                  
      item n = new item();
                  
      //copy whatever
                  
      n.BotBase this.BBcb1.Text;
                  
      n.Profile this.SelectedProfile1.Text;
                  
      n.Zone this.Zone1.Text;
                  
      n.Hours this.P1Hours.Value.ToString();
                  
      n.Minutes this.P1Mins.Value.ToString();

                  
      //save it in the list
                  
      routes.Items.Add(new ListViewItem(n.columns));

                  
      //reset the screen
              
      }

              [
      STAThread]
              static 
      void Main()
              {
                  
      Application.EnableVisualStyles();
                  
      Application.SetCompatibleTextRenderingDefault(false);
                  
      Application.Run(new Example());

              }

              private 
      void BBcb1_SelectedIndexChanged(object senderEventArgs e)
              {

              }

              private 
      void rem_Click(object senderEventArgs e)
              {
                  if (
      routes.SelectedItems.Count 0)
                  {
                      for (
      int i 0routes.SelectedItems.Counti++)
                      {
                          
      routes.Items.Remove(routes.SelectedItems[i]);
                      }
                  }

              }
          }

          
      partial class Example
          
      {
              
      /// <summary>
              /// Required designer variable.
              /// </summary>
              
      private System.ComponentModel.IContainer components null;

              
      /// <summary>
              /// Clean up any resources being used.
              /// </summary>
              /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
              
      protected override void Dispose(bool disposing)
              {
                  if (
      disposing && (components != null))
                  {
                      
      components.Dispose();
                  }
                  
      base.Dispose(disposing);
              }

              
      #region Windows Form Designer generated code

              /// <summary>
              /// Required method for Designer support - do not modify
              /// the contents of this method with the code editor.
              /// </summary>
              
      private void InitializeComponent()
              {
                  
      this.groupBox1 = new System.Windows.Forms.GroupBox();
                  
      this.Zone1 = new System.Windows.Forms.ComboBox();
                  
      this.label12 = new System.Windows.Forms.Label();
                  
      this.label11 = new System.Windows.Forms.Label();
                  
      this.P1Mins = new System.Windows.Forms.NumericUpDown();
                  
      this.P1Hours = new System.Windows.Forms.NumericUpDown();
                  
      this.label10 = new System.Windows.Forms.Label();
                  
      this.label4 = new System.Windows.Forms.Label();
                  
      this.SelectedProfile1 = new System.Windows.Forms.TextBox();
                  
      this.BBcb1 = new System.Windows.Forms.ComboBox();
                  
      this.routes = new System.Windows.Forms.ListView();
                  
      this.botBase = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
                  
      this.profile = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
                  
      this.zone = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
                  
      this.runTimeH = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
                  
      this.runTimeM = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
                  
      this.add = new System.Windows.Forms.Button();
                  
      this.rem = new System.Windows.Forms.Button();
                  
      this.groupBox1.SuspendLayout();
                  ((
      System.ComponentModel.ISupportInitialize)(this.P1Mins)).BeginInit();
                  ((
      System.ComponentModel.ISupportInitialize)(this.P1Hours)).BeginInit();
                  
      this.SuspendLayout();
                  
      // 
                  // groupBox1
                  // 
                  
      this.groupBox1.BackColor System.Drawing.Color.LightGray;
                  
      this.groupBox1.Controls.Add(this.Zone1);
                  
      this.groupBox1.Controls.Add(this.label12);
                  
      this.groupBox1.Controls.Add(this.label11);
                  
      this.groupBox1.Controls.Add(this.P1Mins);
                  
      this.groupBox1.Controls.Add(this.P1Hours);
                  
      this.groupBox1.Controls.Add(this.label10);
                  
      this.groupBox1.Controls.Add(this.label4);
                  
      this.groupBox1.Controls.Add(this.SelectedProfile1);
                  
      this.groupBox1.Controls.Add(this.BBcb1);
                  
      this.groupBox1.Location = new System.Drawing.Point(123);
                  
      this.groupBox1.Name "groupBox1";
                  
      this.groupBox1.Size = new System.Drawing.Size(55474);
                  
      this.groupBox1.TabIndex 4;
                  
      this.groupBox1.TabStop false;
                  
      this.groupBox1.Text "New ";
                  
      // 
                  // Zone1
                  // 
                  
      this.Zone1.FormattingEnabled true;
                  
      this.Zone1.Items.AddRange(new object[] {
                  
      "Hyjal",
                  
      "Uldum",
                  
      "Deepholm",
                  
      "Twilight Highlands",
                  
      "Tol\'Barad Peninsula",
                  
      "None"});
                  
      this.Zone1.Location = new System.Drawing.Point(645);
                  
      this.Zone1.Name "Zone1";
                  
      this.Zone1.Size = new System.Drawing.Size(12121);
                  
      this.Zone1.TabIndex 8;
                  
      this.Zone1.Text "Zone";
                  
      // 
                  // label12
                  // 
                  
      this.label12.AutoSize true;
                  
      this.label12.Location = new System.Drawing.Point(40247);
                  
      this.label12.Name "label12";
                  
      this.label12.Size = new System.Drawing.Size(4713);
                  
      this.label12.TabIndex 7;
                  
      this.label12.Text "Minutes:";
                  
      // 
                  // label11
                  // 
                  
      this.label11.AutoSize true;
                  
      this.label11.Location = new System.Drawing.Point(21948);
                  
      this.label11.Name "label11";
                  
      this.label11.Size = new System.Drawing.Size(3813);
                  
      this.label11.TabIndex 6;
                  
      this.label11.Text "Hours:";
                  
      // 
                  // P1Mins
                  // 
                  
      this.P1Mins.Location = new System.Drawing.Point(45545);
                  
      this.P1Mins.Name "P1Mins";
                  
      this.P1Mins.Size = new System.Drawing.Size(7020);
                  
      this.P1Mins.TabIndex 5;
                  
      // 
                  // P1Hours
                  // 
                  
      this.P1Hours.Location = new System.Drawing.Point(26345);
                  
      this.P1Hours.Name "P1Hours";
                  
      this.P1Hours.Size = new System.Drawing.Size(7020);
                  
      this.P1Hours.TabIndex 4;
                  
      // 
                  // label10
                  // 
                  
      this.label10.AutoSize true;
                  
      this.label10.BackColor System.Drawing.SystemColors.AppWorkspace;
                  
      this.label10.Location = new System.Drawing.Point(14547);
                  
      this.label10.Name "label10";
                  
      this.label10.Size = new System.Drawing.Size(7113);
                  
      this.label10.TabIndex 3;
                  
      this.label10.Text "Run for Time:";
                  
      // 
                  // label4
                  // 
                  
      this.label4.AutoSize true;
                  
      this.label4.BackColor System.Drawing.SystemColors.ControlLight;
                  
      this.label4.Location = new System.Drawing.Point(14023);
                  
      this.label4.Name "label4";
                  
      this.label4.Size = new System.Drawing.Size(7613);
                  
      this.label4.TabIndex 2;
                  
      this.label4.Text "Profile Filepath";
                  
      // 
                  // SelectedProfile1
                  // 
                  
      this.SelectedProfile1.Location = new System.Drawing.Point(22220);
                  
      this.SelectedProfile1.Name "SelectedProfile1";
                  
      this.SelectedProfile1.Size = new System.Drawing.Size(30620);
                  
      this.SelectedProfile1.TabIndex 1;
                  
      this.SelectedProfile1.Text "None";
                  
      // 
                  // BBcb1
                  // 
                  
      this.BBcb1.FormattingEnabled true;
                  
      this.BBcb1.Location = new System.Drawing.Point(619);
                  
      this.BBcb1.Name "BBcb1";
                  
      this.BBcb1.Size = new System.Drawing.Size(12121);
                  
      this.BBcb1.TabIndex 0;
                  
      this.BBcb1.Text "BOT Base";
                  
      this.BBcb1.SelectedIndexChanged += new System.EventHandler(this.BBcb1_SelectedIndexChanged);
                  
      // 
                  // routes
                  // 
                  
      this.routes.BorderStyle System.Windows.Forms.BorderStyle.FixedSingle;
                  
      this.routes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                  
      this.botBase,
                  
      this.profile,
                  
      this.zone,
                  
      this.runTimeH,
                  
      this.runTimeM});
                  
      this.routes.GridLines true;
                  
      this.routes.Location = new System.Drawing.Point(1283);
                  
      this.routes.Name "routes";
                  
      this.routes.Size = new System.Drawing.Size(55497);
                  
      this.routes.TabIndex 5;
                  
      this.routes.UseCompatibleStateImageBehavior false;
                  
      this.routes.View System.Windows.Forms.View.Details;
                  
      // 
                  // botBase
                  // 
                  
      this.botBase.Text "BOT Base";
                  
      this.botBase.Width 84;
                  
      // 
                  // profile
                  // 
                  
      this.profile.Text "Profile";
                  
      this.profile.Width 80;
                  
      // 
                  // zone
                  // 
                  
      this.zone.Text "Zone";
                  
      // 
                  // runTimeH
                  // 
                  
      this.runTimeH.Text "Run Time Hours";
                  
      this.runTimeH.Width 128;
                  
      // 
                  // runTimeM
                  // 
                  
      this.runTimeM.Text "Run Time Minutes";
                  
      this.runTimeM.Width 139;
                  
      // 
                  // add
                  // 
                  
      this.add.Location = new System.Drawing.Point(5723);
                  
      this.add.Name "add";
                  
      this.add.Size = new System.Drawing.Size(2823);
                  
      this.add.TabIndex 6;
                  
      this.add.Text "+";
                  
      this.add.UseVisualStyleBackColor true;
                  
      this.add.Click += new System.EventHandler(this.add_Click);
                  
      // 
                  // rem
                  // 
                  
      this.rem.Location = new System.Drawing.Point(57283);
                  
      this.rem.Name "rem";
                  
      this.rem.Size = new System.Drawing.Size(2823);
                  
      this.rem.TabIndex 7;
                  
      this.rem.Text "-";
                  
      this.rem.UseVisualStyleBackColor true;
                  
      this.rem.Click += new System.EventHandler(this.rem_Click);
                  
      // 
                  // Example
                  // 
                  
      this.AutoScaleDimensions = new System.Drawing.SizeF(6F13F);
                  
      this.AutoScaleMode System.Windows.Forms.AutoScaleMode.Font;
                  
      this.ClientSize = new System.Drawing.Size(609188);
                  
      this.Controls.Add(this.rem);
                  
      this.Controls.Add(this.add);
                  
      this.Controls.Add(this.routes);
                  
      this.Controls.Add(this.groupBox1);
                  
      this.Name "Example";
                  
      this.Text "Example";
                  
      this.groupBox1.ResumeLayout(false);
                  
      this.groupBox1.PerformLayout();
                  ((
      System.ComponentModel.ISupportInitialize)(this.P1Mins)).EndInit();
                  ((
      System.ComponentModel.ISupportInitialize)(this.P1Hours)).EndInit();
                  
      this.ResumeLayout(false);

              }

              
      #endregion

              
      private System.Windows.Forms.GroupBox groupBox1;
              private 
      System.Windows.Forms.ComboBox Zone1;
              private 
      System.Windows.Forms.Label label12;
              private 
      System.Windows.Forms.Label label11;
              private 
      System.Windows.Forms.NumericUpDown P1Mins;
              private 
      System.Windows.Forms.NumericUpDown P1Hours;
              private 
      System.Windows.Forms.Label label10;
              private 
      System.Windows.Forms.Label label4;
              private 
      System.Windows.Forms.TextBox SelectedProfile1;
              private 
      System.Windows.Forms.ComboBox BBcb1;
              private 
      System.Windows.Forms.ListView routes;
              private 
      System.Windows.Forms.ColumnHeader botBase;
              private 
      System.Windows.Forms.ColumnHeader profile;
              private 
      System.Windows.Forms.ColumnHeader zone;
              private 
      System.Windows.Forms.ColumnHeader runTimeH;
              private 
      System.Windows.Forms.ColumnHeader runTimeM;
              private 
      System.Windows.Forms.Button add;
              private 
      System.Windows.Forms.Button rem;
          }

          class 
      item
          
      {
              public 
      string BotBase;
              public 
      string Profile;
              public 
      string Zone;
              public 
      string Hours;
              public 
      string Minutes;
              public 
      string[] columns get { return new string[] { BotBaseProfileZoneHoursMinutes }; } }
          }
       
      Last edited: Dec 8, 2011
    7. masterexe

      masterexe New Member

      Joined:
      Jan 15, 2010
      Messages:
      25
      Likes Received:
      0
      Trophy Points:
      1
      hey first of all, awesome plugin - works great in most cases.

      but i have one problem, i dont know why but sometimes when it uses the Twilight Highlands Portal the Bot stucks inside the building in twilight highlands, it seems he cant/want run out of that building.. if i run manually out of the building, the bot starts flying and farming.

      Edit:

      Ist it Maybe because in the BuddyManager.cs the Code is OutCommented?

      /*if (_CurrentProfile > 0 && _Manager.Zone[(_CurrentProfile - 1)] != _Manager.Zone[_CurrentProfile])
      {
      if (_Manager.Zone[_CurrentProfile] == "Twilight Highlands")
      {
      if (Me.IsHorde)
      {
      while (new WoWPoint(-4033.016, -6336.784, 37.86655).Distance(Me.Location) > 3)
      {
      Log("Moving Outside (Twilight Highlands/Horde).");
      Navigator.MoveTo(new WoWPoint(-4033.016, -6336.784, 37.86655));
      }
      }
      }
      }*/
       
      Last edited: Dec 8, 2011
    8. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      I thought of that altoids, but the main point of the idea was randomization in case people or a GM start watching you.
       
    9. theatristformallyknownasG

      theatristformallyknownasG Active Member

      Joined:
      Jan 16, 2010
      Messages:
      3,041
      Likes Received:
      8
      Trophy Points:
      38

      What is the use of that item ?, same use as a hearthstone isn't it ? Or thats what it was when I dug mine up, shared the same cooldown with a hearthstone and took the same location as a hearthstone, so I just threw it away.

      G
       
    10. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      I'll be in contact with the guy with the scheduling ideas :). Thanks.

      Uncomment that please. I forgot to get rid of it. My PC is having problems downloading tiles ATM so I couldn't test Twilight (I'm still phased)

      @G, yes.
      If someone wants a special hearthstone ability item added please give ms the wowhead link to it.

      @Ally members, I'm still looking for repair/mailbox info.

      For my reference, I need to change the horde vendor (sticks), don't fly to mailbox (same), change the forcesell to actually work, check for herbalism plant transformation buff and get rid of it, add Dalaran hearth support.
      Rework the way it sets variables upon next profile.

      Thanks all :)
       
      Last edited: Dec 8, 2011
    11. neal121

      neal121 New Member

      Joined:
      Jan 15, 2010
      Messages:
      254
      Likes Received:
      0
      Trophy Points:
      0
      Log attached.

      When I start up HB2 (click start) sometimes the toon doesnt go to the right area. Like I have both profiles, 1 for twilight highlands and 2 is uldum. When it starts, he flies towards uldum, then tries to go across the water - and dies.
       

      Attached Files:

    12. masterexe

      masterexe New Member

      Joined:
      Jan 15, 2010
      Messages:
      25
      Likes Received:
      0
      Trophy Points:
      1
      OK i uncommented it, but now i have a new Problem, right after clicking the Twilight Highlands Portal Honorbuddy says "not in game" then in the Room the Bot moves left and right and walks backwards through the Portal back to Orgrimmar :D

      and second: after flying to the OG portals, the Bot dismounts, waits 10 seconds, mounts up, dismounts and sleeps 10 second again before entering the portals. The Same happens at the OG Vendor:

      BuddyManager] Mounted and flying Vendor!
      [BuddyManager]
      Dismounting.
      [BuddyManager] Moving towards: Morgum.
      [BuddyManager] Mounted
      and flying Vendor!
      [BuddyManager] Dismounting.
      [BuddyManager] Moving
      towards: Morgum.
      [BuddyManager] Found no items to mail.
      [BuddyManager]
      Mounted and flying to Org Portals!


      And sometimes afte Hearth teh Bot Stucks at the Roof from the Innkeepersroom in Valley of Strenght ^^
       
    13. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      Past two posters:

      Those will be fixed when I correct how I process the next profile and what to do, I will rework the background thread. Seems to be taking too long to switch.

      At the first of the last two posters, it never reached org, so it entered combat after trying to hearth.

      I'm at work. Will look @ all past recent posts more in depth when I get home.
       
    14. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      New Revision. Re-svn and all that jazzy blue shit.

      Version 1.1.1 Revision 14

      //Changed Orgrimmar repair/mail to be at the front door (less stuck issues)
      //Adjusted the walk outside XYZ to prevent getting stuck on the roof
      //Making sure the Hearthstone cast worked should be a lot better now.
      //Adjusted sleeps on background thread, switches much faster (could be a problem when loading large profiles, so let me know)
      //Will no longer even try to go to the next profile, of course after the first, when Hearth is on cooldown. It will just let it continue until it can use the hearth
      //Should no longer change zones when not necessary (IE Last and Current grouping are in the same zone, and it isn't because the bot wants to repair/mail/sell (if you have that turned on in settings))
      //Also should no longer get caught up so much when it gets to the home city, and the portals
      //Mailbox's and vendors are now walked to, instead of flying. Looks a lot less bot-like.
      //Mailbox's will be found automatically, and if not it will fly to the backup xyz and check again.
      //Changing between profiles with Zone set to "None" to those next set to "None" will now not require a hearth.
      //--Last will not apply with the current Bot-Base will be sitting in orgrimmar (I.E. BG Bot, PvP, IB)
      //Reworked logs so I can understand them when I look at logs (fail)
      //Sleeps added/removed/times changed
      //More Movestop()'s where needed

      //And last, but not nearly least. No more need to hit Recompile All. Every time the bot starts (you or the my background thread hitting start) it will reload the data in the _Manager Struct.
      //--This will allow you to hit stop, change things, and hit start again, and it should work fine. The only thing you can change on the group you are on is the time though.
      //--Changing the BotBase/Profile/Zone on the currently running grouping will cause issues down the line. Don't do it! (Only applies if you already started HB for the first time)
       
    15. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      One last change.
      //Un-Commented the Twilight Highlands move outside check...


      I forgot Okay?! I've had less than 5 hours of sleep the past 4 days.
      So if you got it already, re-svn yet again if ur gonna use Twi-High.

      Sleepy Panda is Sleepy.
      -G'nite all.

      P.S. - I'll check the thread when I wake up... for issues or user-failures :p
       
    16. Altoids

      Altoids New Member

      Joined:
      Jul 21, 2011
      Messages:
      936
      Likes Received:
      8
      Trophy Points:
      0
      Did some preliminary testing this morning on my toon and was absolutely blown over! I was shocked that the toon was doing exactly what I had hoped to be able to accomplish long term!

      Fantastic job! I'll be doing a full blown run through 3 profiles, but probably not until Sunday. Our son is going to an 'activities night' at his school tonight so my Wife and I get to have a Date Night! ;) Saturday is 5 hours of college in the morn and church in the evening... so no large block of time for a full round until Sunday... lol

      Hope Panda is sleeping well (or about to be)... he has deserved it!
       
    17. woanaz

      woanaz New Member

      Joined:
      Oct 25, 2011
      Messages:
      34
      Likes Received:
      0
      Trophy Points:
      0
      Thanks for the great plugin no1knowsy when will vashir added into buddymanager under zones?
       
    18. neal121

      neal121 New Member

      Joined:
      Jan 15, 2010
      Messages:
      254
      Likes Received:
      0
      Trophy Points:
      0
      Toying with it now.

      So far, nothing big panda but my 85 gets:

      I also get a path error everytime through the twilight highlands portal - is that a profile problem? Ive tried 2 profiles and both do it so thought I'd ask.

       
      Last edited: Dec 9, 2011
    19. Altoids

      Altoids New Member

      Joined:
      Jul 21, 2011
      Messages:
      936
      Likes Received:
      8
      Trophy Points:
      0
      Just making sure... did you just download the latest version? It sounded like he addressed the issue in TH - so was just making sure you didn't download it yesterday and then test it today. ;)
       
    20. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      Possibly tomorrow.
      Depends on how tired I am after work...

      That lvl 85 showing that is not possible. It's just not. So you need to restart wow and the bot and try again.
      Any more problems need to be accompanied by an attached log file. None of this copy/paste BS.
       
      Last edited: Dec 9, 2011

    Share This Page