Jump to content

Wait or pause in Runcode


Rodex

Recommended Posts

Before the wait I am interacting with innkeeper to set hearthstone but the issue is that the code runs to quick so by time the popup appears to accept location, my code already run. I am using run macro for lua code. So I need to pause 1 or 2 sec then run code to accept. I have tested the accept by itself and it works.

Link to comment
Share on other sites

I did see this option but I was wondering if there was anything I can put in as part of the code in run code.

Will change what I was trying to do.

Thanks for reply.

Link to comment
Share on other sites

Alright it will look like this:

F8E9ozy.png

Change the coords step to your destination coords. (it's setup for redridge mountains inn)

While step:

ObjectManager.Me.Position.DistanceTo2D(new Vector3(-9223.98f, -2157.12f, 63.73089f)) > 5 && ObjectManager.Me.Position.DistanceTo2D(new Vector3(-9223.98f, -2157.12f, 63.73089f)) < 100

Change the coords for the Inn keeper location and ID(6727) for NPC ID (you can get them from helper tools > target info)

RunCode:

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-9223.98f, -2157.12f, 63.73089f), 6727, 1, false);

below add RunMacroLUA:

/click StaticPopup1Button1

after this all add EndWhile. If it still is too fast for you (never had issues with this setup) add action type step Wait with 2000 ms after runcode

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