Skelo 0 Posted January 1, 2018 Share Posted January 1, 2018 Hello, So far I've been able to figure out profile and fight class creation but I'm stuck with a core function for my bot. It's going to rely on the use of an in game macro. What I need is to have a random delay on said macro between x and y seconds. Preferably I can run another function with this also, essentially having combat and pathing handled by the bot with two macros for targeting a special mob and running this function. Any idea's/advice? Link to comment Share on other sites More sharing options...
Skelo 0 Posted January 2, 2018 Author Share Posted January 2, 2018 Some advice would be really appreciated even if it was "you can do this via x" -> Point me in the direction and I'll research the how. What I don't know is the unknown at the moment. Link to comment Share on other sites More sharing options...
Avvi 98 Posted January 2, 2018 Share Posted January 2, 2018 (edited) private void foo() { var tmp = calculateRandomByRange(1000, 3000); //sleep for random between 1000 and 3000 Thread.sleep(tmp); // run macros macro(): } private int calculateRandomByRange(int lower, int upper) { Random r = new Random(); return (r.Next(lower, upper)); } Here is how you do a random sleep between 1000 and 3000 milliseconds in C#. Edited January 2, 2018 by Avvi Link to comment Share on other sites More sharing options...
Skelo 0 Posted January 2, 2018 Author Share Posted January 2, 2018 Hey Avvi, thank you. Truly, I appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now