CN 1 Posted May 9, 2017 Share Posted May 9, 2017 How do I RunCode without having to add Wait in editor? ItemsManager.UseItem("Hearthstone"); // some code here like Wait in quest order editor Thanks. Link to comment Share on other sites More sharing options...
reapler 154 Posted May 9, 2017 Share Posted May 9, 2017 Hello you can use this code in quest order editor at runcode: ItemsManager.UseItem("Hearthstone"); var t = System.Threading.Tasks.Task.Run(async delegate { await System.Threading.Tasks.Task.Delay(10000); //execute this block after 10000ms even after dispose robotManager.Helpful.Logging.Write("execution2"); }); //this will be executed immediately robotManager.Helpful.Logging.Write("execution1"); but i guess you just need a simple sleep so it would be: ItemsManager.UseItem("Hearthstone"); System.Threading.Thread.Sleep(10000); robotManager.Helpful.Logging.Write("execution1"); Link to comment Share on other sites More sharing options...
CN 1 Posted May 11, 2017 Author Share Posted May 11, 2017 works great. thank you. 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