• Visit Rebornbuddy
  • [Astoria Bot Base] Simple Bot for Battleground

    Discussion in 'Botbases' started by Asting83, Mar 7, 2016.

    1. Asting83

      Asting83 Community Developer

      Joined:
      Jan 21, 2016
      Messages:
      23
      Likes Received:
      0
      Trophy Points:
      1
      [Astoria Bot Base] Simple Bot for Combat Assist - Battleground

      Hi everyone !

      Here i just want to share my own combat bot base, with no extra features.

      Framework Info:

      Bot Resumed 30 ticks
      Bot Paused 5 ticks

      Pause/Resume Hotkey -> Shift + Q

      It's clean, simple & designed for combat assist Battleground.

      Download

      View attachment Astoria.zip

      How to install ?

      Just unzip Astoria.zip, copy unziped folder and go to your Honorbuddy folder (e.g: C:\Honorbuddy\Bots\), paste Astoria folder in \Bot\ folder. Restart Honorbuddy and select my botbase. Enjoy !

      If you like my work ? Donate
       
      Last edited: Apr 24, 2016
    2. rafau94

      rafau94 Member

      Joined:
      Dec 25, 2012
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      does it do skirmishes ?

      --edit

      i think it actually does nothing;
      Code:
      using Styx;using Styx.Common;
      using Styx.WoWInternals;
      using Styx.CommonBot;
      using Styx.CommonBot.Profiles;
      using Styx.CommonBot.Routines;
      using Styx.TreeSharp;
      using Action = Styx.TreeSharp.Action;
      using System;
      using System.Windows.Forms;
      using System.Windows.Media;
      
      
      namespace Astoria
      {
          public class Astoria_Bot : BotBase
          {
              private Composite _root;
      
      
              public override string Name
              {
                  get
                  {
                      return "Astoria Bot";
                  }
              }
              public override Composite Root
              {
                  get
                  {
                      return _root ?? (_root = RootBehavior);
                  }
              }
              public override PulseFlags PulseFlags {
                  get
                  {
                      return PulseFlags.Objects | PulseFlags.Lua;
                  }
              }
      
      
              public bool IsPaused { get; set; }
      
      
              public override void Start()
              {
                  TreeRoot.TicksPerSecond = 30;
                  ProfileManager.LoadEmpty();
                  Logging.Write("Astoria Bot Enable - 30 ticks Framework - Shift + Q for pause/resume.");
      
      
                  HotkeysManager.Register("Astoria Bot Pause",
                      Keys.Q,
                      ModifierKeys.Shift,
                      hk =>
                      {
                          IsPaused = !IsPaused;
                          if (IsPaused)
                          {
                              AddToast("Paused", Colors.Red);
                              TreeRoot.TicksPerSecond = 5;
                              Logging.Write("Astoria Bot is paused.");
                          }
                          else
                          {
                              AddToast("Resumed", Colors.Green);
                              TreeRoot.TicksPerSecond = 30;
                              Logging.Write("Astoria Bot is resumed.");
                          }
                      });
              }
      
      
              private void AddToast(string text, Color color)
              {
                  StyxWoW.Overlay.AddToast(() => text, TimeSpan.FromSeconds(2), color, Colors.Black, new FontFamily("Courier"));
              }
      
      
              private Composite RootBehavior
              {
                  get
                  {
                      return
                          new PrioritySelector(
                              new Decorator(ret => IsPaused,
                              new Action(ret => RunStatus.Success)),
                          new Switch<bool>(ret => StyxWoW.Me.Combat,
                          new SwitchArgument<bool>(true, RoutineManager.Current.CombatBehavior),
                          new SwitchArgument<bool>(false, RoutineManager.Current.PreCombatBuffBehavior)
                      ));
                  }
              }
          }
      }
       
      Last edited: Mar 9, 2016
    3. Nightcrawler12

      Nightcrawler12 New Member

      Joined:
      Mar 18, 2012
      Messages:
      765
      Likes Received:
      11
      Trophy Points:
      0
      I don't think HB allows you to use the bot in Arenas atm, or do they?
       
    4. rafau94

      rafau94 Member

      Joined:
      Dec 25, 2012
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      well author of this thread is claiming that his botbase does Arenas (which is not true)
       
    5. Millz

      Millz Well-Known Member Buddy Store Developer

      Joined:
      Jan 15, 2010
      Messages:
      6,495
      Likes Received:
      223
      Trophy Points:
      63
      Looks awfully like Apoc's Raidbot, with credit removed, and a donate link added.

      Code:
      //This BotBase was created by Apoc, I take no credit for anything within this code
      //I just changed "!StyxWoW.Me.CurrentTarget.IsFriendly" to "!StyxWoW.Me.CurrentTarget.IsHostile"
      //For the purpose of allowing RaidBot to work within Arenas
      using System;
      using System.Windows.Forms;
      using System.Windows.Media;
      using Styx;
      using Styx.Common;
      using Styx.CommonBot;
      using Styx.CommonBot.Profiles;
      using Styx.CommonBot.Routines;
      using Styx.WoWInternals;
      using Styx.TreeSharp;
      using Action = Styx.TreeSharp.Action;
      
      
      namespace RaidBot
      {
          public class RaidBot : BotBase
          {
              private Composite _root;
              public override string Name { get { return "Raid Bot"; } }
              public override Composite Root { get { return _root ?? (_root = new PrioritySelector(CreateRootBehavior())); } }
              public override PulseFlags PulseFlags { get { return PulseFlags.All & ~(PulseFlags.Targeting | PulseFlags.Looting); } }
              public bool IsPaused { get; set; }
              public override void Start()
              {
                  TreeRoot.TicksPerSecond = 30;
                  //if (ProfileManager.CurrentProfile == null)
                      ProfileManager.LoadEmpty();
      
      
                  HotkeysManager.Register("RaidBot Pause",
                      Keys.X,
                      ModifierKeys.Alt,
                      hk =>
                          {
                              IsPaused = !IsPaused;
                              if (IsPaused)
                              {
                                  AddToast("RaidBot Paused!", Colors.Red);
                                  // Make the bot use less resources while paused.
                                  TreeRoot.TicksPerSecond = 5;
                              }
                              else
                              {
                                  AddToast("RaidBot Resumed!", Colors.Green);
                                  // Kick it back into overdrive!
                                  TreeRoot.TicksPerSecond = 30;
                              }
                          });
              }
      
      
              private void AddToast(string text, Color color)
              {
                  StyxWoW.Overlay.AddToast(() => text, TimeSpan.FromSeconds(2), color, Colors.Black, new FontFamily("Courier"));            
              }
      
      
              private Composite CreateRootBehavior()
              {
                  return
                      new PrioritySelector(
                          new Decorator(ret => IsPaused,
                              new Action(ret => RunStatus.Success)),
                          new Decorator(ret => !StyxWoW.Me.Combat,
                              new PrioritySelector(
                                  RoutineManager.Current.PreCombatBuffBehavior)),
                          new Decorator(ret => StyxWoW.Me.Combat,
                              new LockSelector(
                                  RoutineManager.Current.HealBehavior,
                                  new Decorator(ret => StyxWoW.Me.GotTarget && !StyxWoW.Me.CurrentTarget.IsFriendly && !StyxWoW.Me.CurrentTarget.IsDead,
                                      new PrioritySelector(
                                          RoutineManager.Current.CombatBuffBehavior,
                                          RoutineManager.Current.CombatBehavior)))));
              }
      
      
              public override void Stop()
              {
                  TreeRoot.ResetTicksPerSecond();
                  HotkeysManager.Unregister("RaidBot Pause");
              }
      
      
              #region Nested type: LockSelector
      
      
              private class LockSelector : PrioritySelector
              {
                  public LockSelector(params Composite[] children) : base(children)
                  {
                  }
      
      
                  public override RunStatus Tick(object context)
                  {
                      using (StyxWoW.Memory.AcquireFrame())
                      {
                          return base.Tick(context);
                      }
                  }
              }
      
      
              #endregion
          }
      }
      
       
    6. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Millz,

      We reviewed the code, and don't see a problem. But, MANY thanks for looking out for things like this! Theft is not acceptable (and a perma-bannable offense) in the Buddy forums.

      We believe the problem stems from the fact that these bots are basically sooooo simple to write, there are not many ways to uniquely write a handful of lines of code.


      @Asting83,
      Much thanks for contributing to the Community!

      We've edited the thread title and OP to remove any references to "Arenas". Bossland GmbH turns a blind eye only to Combat Routines in this regard, and nothing else (i.e., Botbases). You can find the offical policy here:


      cheers,
      chinajade
       
      Last edited: Mar 9, 2016
    7. Asting83

      Asting83 Community Developer

      Joined:
      Jan 21, 2016
      Messages:
      23
      Likes Received:
      0
      Trophy Points:
      1
      Thanks for informations about arena, i mean to say it's designed for combat routine and work well in arena and BG without lag or disconnection. And no i don't have stolen anything, just it's the base of bot base work so yes it's simple but it's the goal ! Thanks.
       
    8. Asting83

      Asting83 Community Developer

      Joined:
      Jan 21, 2016
      Messages:
      23
      Likes Received:
      0
      Trophy Points:
      1
      Added plugin function.
       
    9. pinki104

      pinki104 Member

      Joined:
      Apr 14, 2012
      Messages:
      536
      Likes Received:
      0
      Trophy Points:
      16
      is this a combat rotation and we use movement ourselfs? i started the bot and nothing happened so i guess so
       
    10. Asting83

      Asting83 Community Developer

      Joined:
      Jan 21, 2016
      Messages:
      23
      Likes Received:
      0
      Trophy Points:
      1
      It's bot base not routine
       

    Share This Page