SRL Archive - OSR Help

Little help / suggestions with FindObjCustom needed :)


Rodelol

2013-04-28 13:43:04

Made myself a simple Hunger bot that waits for Check option in the bird snare, for the triggered trap i made the MarkTime–TimeFromMark.

Now what i was hoping was a way to see if the snare says "/ 2 more options" instead of "/ 3 more options" when hovering over and if so it would pick the snare up like it does after 40s in my script atm.

begin
MarkTime(timer);
repeat (FindObjCustom(x, y, ['ird', 'nare'], [4483474], 5))
ClickMouse2(mouse_right);
wait(100+random(50));
until WaitOptionEx('heck', 'nare', ClickLeft, 150) or (TimeFromMark(Timer) > 40000);
if (FindObjCustom(x, y, ['ird', 'nare'], [4483474], 5)) then
begin
ClickMouse2(mouse_right);
wait(100+random(50));
WaitOptionEx('ismantle', 'nare', ClickLeft, 150);
end;
sleep(1500);
InvMouse(2, mouse_Left);
sleep(2500);
end;

Rodelol

2013-04-28 14:28:04

Other thing that could work would be that if it doesnt find option Investigate anymore it would pick it up..

Wondering how OptionsExist works.. Testing it like this

until WaitOptionEx('heck', 'nare', ClickLeft, 150) or OptionsExist(['Investigate'], False);
But this didnt work :(

Sjoe

2013-04-28 15:34:48

IsupText('3 more') or something would work

OptionsExist should work

Rodelol

2013-04-28 15:51:41

Thanks alot for advice Sjoe.

begin
repeat (FindObjCustom(x, y, ['ird', 'nare'], [4483474], 5))
MMouse(x, y, 0, 0);
sleep(1000);
until IsupText('heck') or IsupText('2 more');
ClickMouse2(mouse_left);
sleep(1500);
InvMouse(2, mouse_Left);
sleep(8500);
end;

This worked perfectly until "2 more" happened :P does not trigger from it :(

Ill stop trying myself.. Tried with CountColorTolerance but it seems to be quite random ;D.. Im fine with 40s wait if bird doesnt come i guess :D

jelknab

2013-04-28 16:59:30

['ird', 'est'] ???

Could try DTM's or bitmaps if it's in the inv.

Rodelol

2013-04-28 17:07:31

From: jelknab
['ird', 'est'] ???

I have no idea where u pulled this from or why u typed this here.

From: jelknab
Could try DTM's or bitmaps if it's in the inv.

Obviously the trap is set to ground and is not in my inventory.

jelknab

2013-04-28 17:10:14

I trought you were searching birdnests :LLLL.

Oh, the stupity………