Jump to content

[Resolved] Pause if player nearby ONLY AFTER regen finishes


Recommended Posts

It looks really crappy / bot-like when you're eating, a player comes within range and you just stand up with 30% HP without finishing eating.

The same way bot waits for combat to finish before it pauses itself, it should wait for regen to finish.

EDIT: Wrote a plugin for this. Once properly tested, I will release it...

Link to comment
Share on other sites

Just now, Marsbar said:

No i mean not using the setting at all and just setting the bot to be in a paused state while a player is near (unless in combat or regenerating)

Right... Hmmm, will look into it :)

Link to comment
Share on other sites

One more thing @Marsbar. I have this line, look below. How do I get all of the names of the player so I can print it in the log?

var PlayersNearby = ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120).ToList();

 

Link to comment
Share on other sites

foreach (var player in ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120))
            {
                Logging.Write("Player '" + player.Name + "' is close by!");
            }

Guess you could do that. May want to add a timer in there though so it doesn't spam the log like mad.

edit: Maybe something like that around it>

	using Timer = robotManager.Helpful.Timer;
	public Timer PlayerNotificationTimer = new Timer();
        public void GetPlayers()
        {
            if (PlayerNotificationTimer.IsReady)
            {
                foreach (var player in ObjectManager.GetObjectWoWPlayer().Where(p => p.GetDistance <= 120))
                {
                    Logging.Write("Player '" + player.Name + "' is close by!");

                }
                PlayerNotificationTimer = new Timer(1000 * 5);
            }
        }

 

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...