ScriptUO

Scripting Resources & Utilities => OEUO => OpenEUO Scripting Chat => Topic started by: BadManiac on October 14, 2010, 09:01:18 PM

Title: Open and close gumps.
Post by: BadManiac on October 14, 2010, 09:01:18 PM
What's the best ways you've come up with so far for opening and closing a container/gump in OEUO?

Is there a guaranteed way to open a container from an item id (chest/corpse/whatever) and waiting until it's open? Is that handled the same way as in EUO?
And is there a guaranteed way to close a specific gump by ID as well?

Guaranteed being the key word here. How robust is the client interface in OEUO? What level of error checking can we add? As an example there was no way to guarantee a gump was closed in EUO, you could right click it, but if the user moved the mouse simultaneously, and/or the container lost focus due to, say rain, the script would think the gump was closed, when in fact it isn't. What's OEUO like in this regard?


Discussion, LUA snippets, ideas? (I haven't started yet, this is me doing some early research ;) )
Title: Re: Open and close gumps.
Post by: Endless Night on October 15, 2010, 07:55:00 AM
well open euo have gump indexes.   So you can attempt to close it like you would in EUO (nothing has changed thier) and then after run throught the gump array to see if its still visible.

Bascially you script in OPenEUO exactly like in euo except differnt commands is all... the only additions with gumps is the ability to index through each open gump on screen you can also set a gumptotop by index thus insuring its not covered before closing it.
Title: Re: Open and close gumps.
Post by: BadManiac on October 15, 2010, 08:57:53 AM
That's what I wanted to know. There's a way to check if the gump is still open, even if it loses focus. Thanks.
Title: Re: Open and close gumps.
Post by: Endless Night on October 15, 2010, 09:44:58 AM
I have a few subs .. ill post them if you want them or if you want to play for yourself check out this new command (no EUO equivalent)

UO.GetCont(nI)   -- ni = 0 ... x  (last gump)

It will find radar, paperdoll, spell icons.. you will be amazed how many gumps you find.