FooJoo
2015-03-25 08:52:40
Hi all,
I am in process of making a script that makes potions. I've got the basic functionality and it works but before I go onto improving the script I'm just trying to iron out the current bugs and issue first.
Anyway here is a snippet below which I could do with some advice with:
As we can see it will wait until there is no more water vials left in the inventory before continuing. However I have noticed some possible issues that could arise from here. Sometimes the hover text is over the inventory which means it cannot count properly sometimes. Also the DTM finding isn't all that reliable sometimes.
My main question is - does anyone know how I could program a more reliable way to check if the potions are made and to continue.
EDIT: Here's a screenshot of what I'm talking about when the hover text gets in the way:
[ATTACH=CONFIG]25393[/ATTACH]
Thanks in advance!
I am in process of making a script that makes potions. I've got the basic functionality and it works but before I go onto improving the script I'm just trying to iron out the current bugs and issue first.
Anyway here is a snippet below which I could do with some advice with:
procedure makePotions();
begin
if not isLoggedIn() then
exit();
if not productionScreen.isOpen() then
begin
tabBackpack.clickDTM(HerbDTM, MOUSE_LEFT, '', 300, false);
tabBackpack.clickDTM(VialOfWaterDTM, MOUSE_LEFT, '', 300, false);
repeat
wait(randomRange(100, 200));
until productionScreen.isOpen();
end;
productionScreen.clickStart();
repeat
wait(randomRange(1000, 2000));
until tabBackpack.countDTM(VialOfWaterDTM) = 0
end;As we can see it will wait until there is no more water vials left in the inventory before continuing. However I have noticed some possible issues that could arise from here. Sometimes the hover text is over the inventory which means it cannot count properly sometimes. Also the DTM finding isn't all that reliable sometimes.
My main question is - does anyone know how I could program a more reliable way to check if the potions are made and to continue.
EDIT: Here's a screenshot of what I'm talking about when the hover text gets in the way:
[ATTACH=CONFIG]25393[/ATTACH]
Thanks in advance!