Jump to content

Simple Hearthstone


CN

Recommended Posts

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

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

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...