ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Cerveza on September 27, 2010, 07:31:47 AM
-
Is this a good way to wait for a hotkey to continue?
set %waiting_to_start #TRUE
while %waiting_to_start = #TRUE
{
onhotkey F10 alt
set %waiting_to_start #FALSE
}
That would just cycle waiting for alt+F10 then continue? Should I put a "wait 1" in there?
-
That looks fine with me. This is what I use with no wait and so far never a problem.
set #targcurs 1
while #true
{
repeat
onhotkey %hotkey
goto Island_End
until #targcurs = 0
break
}
-
I just tried it with and without a wait 1 and it doesn't appear to affect CPU load either way. Appears to be a pretty gentle loop.
-
Wow, thanks Paul! Appreciate that.
I thought it was a slick little tidbit... should work well with a project I've been working on. I want the user to be able to load and run the script from anywhere to get the setup completed, then use a hotkey when they are in position to begin running the main script.
-
That would work great with a looter
-
No doubt!
I never cared much for onhotkey. It always seems sluggish to me. But that's when it's used in a loop with other hotkey checks. I've even run a separate script to watch hotkeys and passed the info via globals to the main script.
This little thing just seems pretty slick. I think it'll work well with my application.
And, of course, anyone who can make use of this code is welcome to it.
-
I miss the little black fart cloud that used to appear behind the little UO guys when they failed at casting a spell ?!
-
It's still there. Get the ID of that fart?
-
I miss the little black fart cloud that used to appear behind the little UO guys when they failed at casting a spell ?!
Is that gone? Wow, I guess I haven't played EA/OSI for a while.