Ok, follow-up...
first, be careful about leaving ID's specific to your environment in the scripts. Just good practice to not link anything script-related to your UO account:
; manually set secure cotainer ID's, or leave blank (or N/A) for automated setup
set %ResourceSecure NACAPQD
set %axechopper BNRECOD
Next on the issue of discussion
This is the sub:
sub GumpWait
set %_tm #systime + ( %gumptimeout * 60 )
gosub hardwait %gumpwait
while #contsize <> %cwin
{
sleep 10
if #systime > %_tm
{
display Problem waiting on craft gump, open manually then press play easyuo menu
pause
}
}
return #true
This sub is using the variables from your Constants sub:
set %cwin 530_497 ; 530_437 ; Carpentry window size
set %gumpwait 1 ; Time to wait before scanning for open gump/container
set %gumptimeout 60 ; Maximum amount of time to wait for gump to open
so you're sub is doing:
sub GumpWait
set %_tm #systime + 360 ;i.e. systime plus 360ms or just over 1/3 of a second
gosub hardwait 1 ; based on your hardwait sub this makes the script sleep for 1 milisecond, not sure the point
while #contsize <> 530_497 ; i.e. if the gump hasn't come up after 1 ms (which it will likely never do for most of us)
{
sleep 10 ;again, what is ths point here?
if #systime > %_tm ;at this point we are saying if more than 371ms has gone buy (less than a half second)
{
display Problem waiting on craft gump, open manually then press play easyuo menu
pause
}
}
return #true
So based on the above breakdown you are definitely not giving enough time, or enough variability, in your waits for the average Joe User. The above wait approach can work , as you are seeing for yourself, but it's very complicated and not easily transported from situation to situation.
Here is an example of my Gumpwait standard sub. Not a work of art by any means, I'm certainly a sub-par script writer, but this is pretty simple:
;#######################
;SUB XIIxGumpWait
;#######################
; %1 = Required: Gumpname 1
; %2 = Required only if using Gumpsize: Gumpname 2
; %3 = Optional: Gumpsize
; Returns #TRUE if gump occured before timeout, #FALSE if timeout occured
sub XIIxGumpWait
namespace push
namespace local nsXIIxGumpWait
set !gName1 %1
set !gName2 %2
set !gSize %3
set !_time #SCNT
while #SCNT <= !_time + 5
{
if %0 > 2
{
if ( #CONTNAME = !gName1 && #CONTSIZE = !gSize ) || ( #CONTNAME = !gName2 && #CONTSIZE = !gSize )
{
namespace clear
namespace pop
return #TRUE
}
}
else
{
if #CONTNAME = !gName1 || #CONTNAME = !gName2
{
namespace clear
namespace pop
return #TRUE
}
}
}
namespace clear
namespace pop
return #FALSE
I use this standard sub for ALL gump waits and timing in any script I write. I got the idea of adding two possible gump names from TM's Gumpwait but I've actually never used it hehe. But notice that in this sub I'm simply saying "keep checking for a matching gumpname and or gumpname/gumpsize combination for 5 seconds and if it comes up, exit and return #TRUE, if not return #FALSE. Simple. No need for "hardwait", "gumpwait", "contIDwait", "carptoolwait", "tinkwait", etc, etc.
Hopefully this helps.
X