Ez Vendor Gold Collection by alistormccoy
// Ez Vendor Gold Collection
// Uses house sign to access your vendors and opens the
// Collect Gold gump of the vendor with the highest amount of gold held.
// Collect the gold off your vendor and simply hit your hotkey again to go to the next.
// By default it searches for the closest house sign to your character
// and uses that, but you can hardcode the sign serial below if you prefer.
@setvar! "houseSign" 0xFFFFFFFF
if "houseSign" == 0xFFFFFFFF
if findtype "sign" ground any any 2 as "autoFind"
@setvar! "houseSign" "autoFind"
elseif findtype "sign" ground any any 4 as "autoFind"
@setvar! "houseSign" "autoFind"
elseif findtype "sign" ground any any 6 as "autoFind"
@setvar! "houseSign" "autoFin0d"
elseif findtype "sign" ground any any 12 as "autoFind"
@setvar! "houseSign" "autoFind"
elseif findtype "sign" ground any any 18 as "autoFind"
@setvar! "houseSign" "autoFind"
else
overhead "No house sign found! Halting..." 1159
stop
endif
endif
if gumpexists 1957446601
gumpclose 1957446601
endif
if gumpexists 725496535
gumpclose 725496535
endif
if not gumpexists 2490201206
dclick "houseSign"
createtimer "globalCD"
waitforgump 2490201206 1000
endif
gumpresponse 3 2490201206
waitforgump 2490201206 1000
if not gumpexists 2490201206
overhead "Something went awry" 1159
stop
endif
//the next gump response opens the vendor backpack so gotta wait out global cooldown
while timerexists "globalCD" and timer "globalCD" < 600
wait 50
endwhile
gumpresponse 20 2490201206
waitforgump 1957446601 1000
gumpresponse 6 1957446601