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

Dungeon buddy - Kinda obvious in highmaul that your botting.

saven

Member
Joined
Sep 24, 2010
Messages
275
Reaction score
2
Maybe this can be addressed, in hopes that we are less obvious botters. So, in highmaul I notice before you get to Twin Ogron that you walk a certain path everytime. Instead of following the group up the stairs the bot desides to go through/around these bushs. Every...single time. Now most of you won't care, thats nice. But if there is a way to add this to the original script to blackspot that one area..that would be great. Any thoughts that are helpful and not flameful? :P
 
@phelon Thats good to hear Phelon! On another serious note :p I ask why the community devs haven't established something for dungeon buddy to make it better, like most other plugins do. Anyone shine any light on this?
 
report it under DB thread and Highvoltz will check it
 
There are other areas such as right before you jump down to Butcher where the bot tends to run in circles a couple times.
 
I have an "AutoParty" bot I put together that has 4 members of my bot party following the "lead" tank. I move the tank largely manually. For the followers, as long as they are within a certain distance they move to a position that is slightly offset from the placement that it would normally go (in most bots it's usually 8 units behind the followed tank). In my case, I "permute" that individually for each of my follow bots so they end up following more as a swarm. I check the decided point to make sure it is navigable and if not, I have it go back and find the next in the curve. Note that all curves repeat (see Superformula - Wikipedia, the free encyclopedia).

The offset function actually is set to follow one of several permuted paths... so that way the bots are not randomly jerking back and forth... they follow a smoothed curve from a derived "SuperShape".

Long story short... This does not work if the bot swarm is being called long distances... they all follow the same single file path. If I could get a hold of the pathlist generated, I would apply the supershape permuter to the outcome so all the bots are following a nice slowly wavering path that looks more natural.

Code:
        public static void SuperFormula(double m, double n1, double n2, double n3, double phi, double radius, int leftright, out float x, out float y)
        {
            const double a = 1;
            const double b = 1;

            var t1 = Math.Cos(m * phi / 4) / a;
            t1 = Math.Abs(t1);
            t1 = Math.Pow(t1, n2);

            var t2 = Math.Sin(m * phi / 4) / b;
            t2 = Math.Abs(t2);
            t2 = Math.Pow(t2, n3);

            var r = Math.Pow(t1 + t2, 1 / n1);
            if (Math.Abs(Math.Abs(r)) < .01)
            {
                x = 0;
                y = 0;
            }
            else
            {
                r = 1 / r;
                x = (float)(leftright * radius * r * Math.Cos(phi));
                y = (float)(leftright * radius * r * Math.Sin(phi));
            }
        }

        public static void ChoosePattern(out double m, out double n1, out double n2, out double n3, out double radius, out int leftright)
        {
            //   [URL="http://paulbourke.net/geometry/supershape/"]Supershapes / SuperFormula[/URL]

            var rnd = new Random();
            var number2 = rnd.NextDouble();

            if (number2 < 0.5)
            { leftright = -1; }
            else leftright = 1;

            switch (WhichPattern)
            {
                case 0:                         // Concave Pentamer
                    m = 5;
                    n1 = 1;
                    n2 = 1;
                    n3 = 1;
                    radius = 10;
                    break;

                case 1:                         // Pinched
                    m = 1;
                    n1 = 0.8;
                    n2 = 0.8;
                    n3 = 0.8;
                    radius = 10;
                    break;

                case 2:                         // Pinched
                    m = 3;
                    n1 = 0.8;
                    n2 = 0.8;
                    n3 = 0.8;
                    radius = 14;
                    break;

                case 3:                         // Dog Bone  [URL="http://en.wikipedia.org/wiki/Superformula"]Superformula - Wikipedia, the free encyclopedia[/URL]
                    m = 4;
                    n1 = 2;
                    n2 = 4;
                    n3 = 13;
                    radius = 6;
                    break;

                case 4:                         // Oblong pie shape   [URL="http://en.wikipedia.org/wiki/Superformula"]Superformula - Wikipedia, the free encyclopedia[/URL]
                    m = 3;
                    n1 = 3;
                    n2 = 14;
                    n3 = 2;
                    radius = 5;
                    break;

                case 5:                         // Sharp Starfish   [URL="http://en.wikipedia.org/wiki/Superformula"]Superformula - Wikipedia, the free encyclopedia[/URL]
                    m = 6;
                    n1 = 1;
                    n2 = 7;
                    n3 = 8;
                    radius = 5;
                    break;

                default:                        //  Starfish
                    m = 5;
                    n1 = 1;
                    n2 = 4;
                    n3 = 5;
                    radius = 5;
                    break;
            }
        }

        public static Composite LookingBusy()
        {
            return new Sequence(
               new Action(r =>
               {
                   if (Me.Name == Tank.Name )
                       return RunStatus.Failure;

                   return FollowCircuit(false) ? RunStatus.Failure : RunStatus.Failure;
               }
               ));
           
        }

        public static Composite CircuitTank(bool runAway = false, string message = "")
        {
            return new Sequence(
                new Action(r =>
                {
                    if (Me.Dazed || Me.Fleeing || Me.Stunned || Me.Rooted
                        || Me.Pacified || Me.Possessed)  // Don't bother-- stunned
                        return RunStatus.Failure;
                    
                    if (Me.Name == Tank.Name)
                        return RunStatus.Failure;

                    if (Tank != null && Tank.Mounted && (Tank.IsFlying || Tank.IsSwimming))
                    {
                        Flightor.MoveTo(MakeItSoPoint);
                        return RunStatus.Success;
                    }
                    //Log("Move:  CircuitTank {0}", message);

                    return FollowCircuit(runAway, message) ? RunStatus.Failure : RunStatus.Failure;
                }
                ));
        }

        public static bool FollowCircuit(bool runAway, string message = "")
        {
            CountCheck();
            GetNewPoint();

            var canNav = false;
            Vector3 mePoint = Me.Location;

            if (!Me.IsMoving || Math.Abs(VectorLength(mePoint - MakeItSoPoint)) <= 5)
            {
                _phi = Count * 2 * Math.PI / NumPoints;
                try
                {
                    canNav = Navigator.CanNavigateFully(Me.Location, MakeItSoPoint);
                }
                catch (Exception)
                {
                    
                    throw;
                }

                while (!canNav)             // Search for a spot to which I can move
                {
                    CountCheck();
                    GetNewPoint();
                    try
                    {
                        canNav = Navigator.CanNavigateFully(Me.Location, MakeItSoPoint);
                    }
                    catch (Exception)
                    {
                        
                        throw;
                    }
                }
            }
            return canNav && MoveTo(runAway, message);
        }

        private static void CountCheck()
        {
            // Change the pattern if Count is 0 and only allow this change every 2 seconds.
            if (Count != 0 || TimeUp(LastTimeChoosePattern) <= 2000) return;

            Random rnd = new Random();
            WhichPattern = rnd.Next(0, 6);
            LastTimeChoosePattern = DateTime.Now.Ticks;
            ChoosePattern(out M, out N1, out N2, out N3, out Radius, out Leftright);
        }

        private static void GetNewPoint()
        {
            float xLoc;
            float yLoc;
            IncreaseCount(NumPoints);
            SuperFormula(M, N1, N2, N3, _phi, Radius, Leftright, out xLoc, out yLoc);
            MakeItSoPoint = Tank.Location;
            MakeItSoPoint.X += xLoc; MakeItSoPoint.Y += yLoc;
        }

        public static bool MoveTo(bool runAway, string message = "")
        {
            // if too close, don't move.
            Vector3 mePoint = Me.Location;
            //Log("Move:  MoveTo_1 {0}", message);

            if (!(Math.Abs(VectorLength(mePoint - MakeItSoPoint)) > 2)) return false;

            //if (runAway)
                //Log(Colors.Red, "Move:  MoveTo_2 {0}", message);

            Navigator.MoveTo(MakeItSoPoint);
            LastCtmTime = DateTime.Now.Ticks;
            return true;
        }

        public static void IncreaseCount(int numPoints)
        {
            Count++;
            if (Count > numPoints)
                Count = 0;
        }
        public static int Count;
        public static double M;
        public static double N1;
        public static double N2;
        public static double N3;
        public static double Radius;
        public static int WhichPattern;
        public static int ActualPattern;
        public static int Leftright;
        public const int NumPoints = 15;
        public static long LastTimeChoosePattern = DateTime.Now.Ticks;
        private static double _phi;
 
Last edited:
Give it a day. I have something coming that will fix that. It won't be free, but it will address that very issue.

Where will this something be posted soon? Will it be a botbase or a plugin?
 
Back
Top