Hey Crisis!
The reason for a Gumpwait sub is that the time could fluctuate for different people. What might take .1 seconds for you to open a menu could take .6 seconds for me. The idea of a Gumpwait is to say "hang out until you see the "gump" with the following attributes then move along". This way it doesn't matter how long the gump takes to open, you'll be waiting for it.
Would I list a time after like this?
Code: Select All | Copy To Clipboard
gosub XIIxGumpWait 20
Nope, because you don't really know what the time should be. You want to pass the name of the gump and the size (because the name is usually the same for many gumps) so, for example, if you were using my sub, the gump name was "generic_gump" and the size was 100x100:
Gosub XIIxGumpWait generic_gump generic_gump 100_100
Note that my Gumpwait uses two different options for the Gump name (this name OR that name) which is probably not necessary but is an idea I stole from TM's way back when I was still learning and it stuck lol.
On the name part, would this section need to be changed at all?
Code: Select All | Copy To Clipboard
set !gName1 %1
set !gName2 %2
set !gSize %
I set a gumpsize on my scripts so how would that affect !gName2 %2
You don't change anything in the sub, you pass your variable to it. So, for example, if you set your gump name to something like %CarpMenuName and the size to something like %CarpMenuSize you would call the sub like:
gosub XIIxGumpWait %CarpMenuName %CarpMenuName %CarpMenuSize
Would I need to use %3 on scripts like carpentry which has gumps for tinkering and carpentry?
It's always best to use both the name and the size. When you are using two different skills with identical menu sizes then this can get tricky determining the difference between one or the other so you need to build logic around this in your code but this has no bearing on your gumpwait sub, it's job is ONLY to wait for a gump that you tell it to wait for then report back to the body of the script whether it happened or not.
X