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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Astoria Bot Base] Simple Bot for Battleground

Asting83

Community Developer
Joined
Jan 21, 2016
Messages
23
[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:
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:
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
    }
}
 
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
    }
}
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:
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

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.
 
is this a combat rotation and we use movement ourselfs? i started the bot and nothing happened so i guess so
 
Back
Top