ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: talkmill on September 10, 2008, 10:18:00 AM
-
Hi, has anyone got a good idea on how to make a reliable buying sub (or can point me to one). I've tested quite a few and tested writing my own. The thing i have a problem with is the double click to select a particular item. Sometime this works, sometimes not, and i cant seem to figure out why. I've tested using: double click X X mc (instead of click d) which work a bit better but still not good. 30% of the time no item is selected. Is there a good way to do this "click" or to verify if the click succeded (if the item appeared in the buy list) without using ocr?
-
I haven't ever used the buy/sell agents in Razor. Perhaps that's a possibility.
-
Hmmm, true. I will test that, thx :)
-
Or hmmm, don't think that is an option. That would be good if i buy the same type of item every time. Bot i'm writing a script for filling bods (normal iron smith bods) that can be filled by buying items from blacksmiths. For that to work in razor i guess a buy agent for every type of bod-item is necessary which really isn't that good :)
-
Thier is a way for reliable buying... i wrote code that did it once... heres a snippet from some of my code dont know if this was the very reliable one or not.. but its got to do with wait times.
if #SHOPITEMTYPE = %BuySellItems && #SHOPITEMPRICE <= %BuySellMaxMinPrice
{
wait 3
gosub gumpclick -55 -137 DMC ; D MC
wait 2
gosub gumpclick -55 -137 DMC ; D MC
wait 2
If #shopItemMax > %BuySellQuantity
setShopItem #shopItemID %BuySellQuantity
ELSE
setShopItem #shopItemID #shopItemMax
}
-
Ahh thx, i'll try your wait times to see if i get better results :)
-
Didn't help. Tried that one and nothing happens. The only thing that works for now is:
click x y mc
click x y mc
I'm not getting why this work and not dmc, is there some kind of delay in mc or is there some other way these two type work in different ways?
-
Hi, has anyone got a good idea on how to make a reliable buying sub (or can point me to one). I've tested quite a few and tested writing my own. The thing i have a problem with is the double click to select a particular item. Sometime this works, sometimes not, and i cant seem to figure out why. I've tested using: double click X X mc (instead of click d) which work a bit better but still not good. 30% of the time no item is selected. Is there a good way to do this "click" or to verify if the click succeded (if the item appeared in the buy list) without using ocr?
What I like to do is after I buy it I look to see if the items are in my pack using finditem. If it is a stackable item and you might have some in your pack you can count the stack or you can count the amount of items prior to buying.
-
i like it hardyz i must rember that and implement in my scripts