January 1, 20188 yr 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?
January 2, 20188 yr Author 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.
January 2, 20188 yr 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, 20188 yr by Avvi
Create an account or sign in to comment