Jump to content

having trouble getting to the bot to loop in the way I want...


Recommended Posts

I am trying to get the bots logic to loop through a little better in the sense of checking itself after each fight,

I would like to have it stop itself after each fight for check of (do I have a pet, is my hp/mp above X %) that kinda thing

so far I've tried something like

 internal void Rotation()
    {
        while (_running)
        {
            try
            {
                if (!ObjectManager.Me.IsDeadMe)
                {

                  if (!ObjectManager.Pet.IsAlive)
                  {
                   PSpawn();    //Pet spawner
                   return;
                  }

                    Buff();
                    if (Fight.InFight && ObjectManager.Me.Target > 0)
                    {
                        Pull();
                        CombatRotation();
                    }
                  
                  .....................

which seems to help but not quite full proof, so just wondering is there a better way to basically have it reinitialize, or just have a section of code it executes after it exits combat each time ?

internal void Rotation()
    {
        while (_running)
        {
            try
            {
                if (!ObjectManager.Me.IsDeadMe)
                {

                  if (!ObjectManager.Pet.IsValid && !ObjectManager.Me.IsMounted)
                        {
                            // Thread.Sleep(300);
                            Fight.StopFight();
                            MovementManager.StopMove();
                            PSpawn();   // pet spawner
                        }

                    Buff();
                    if (Fight.InFight && ObjectManager.Me.Target > 0)
                    {
                        Pull();
                        CombatRotation();
                    }
                  
                  .....................

  its not after the fight but seems to have fixed it just carrying out to the next target without resummoning ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...