View Full Version : ChooseOption wont work.
Ultra
12-11-2012, 05:24 PM
procedure Fight;
begin
if(FindColorTolerance(X, Y, 3348339, 0, 0, 580, 405, 15))then
begin
MMouse(X, Y, 3, 3);
Wait(10 + Random(10));
ClickMouse2(false);
Wait(200+Random(100));
if(ChooseOptionMulti(['Attack', 'ttack']))then
WriteLn('Attacked a spider!');
end;
end;
Never clicks "Attack" or displays "Attacked a spider!". Any thoughts? :redface: Getting back to scripting lol.
EDIT Now using:
ChooseOptionMulti(['Attack', 'ttack]))
still wont choose the attack option. :(
litoris
12-11-2012, 05:31 PM
Use ChooseOptionMulti, put more words in there(ie. 'ack', 'ck')
You can also try WaitOption(Multi if you want) so that you don't have to add a wait after the click.
Ultra
12-11-2012, 05:35 PM
Now using:
ChooseOptionMulti(['tta', 'ack', 'ttack', 'ck']))
Still wont choose it*, could it perhaps be that the monster is higher level than me?
DannyRS
12-11-2012, 05:37 PM
Use option multi, and use 'Attack' 'ttack' the * will cause problems otherwise
Ultra
12-11-2012, 05:40 PM
Still no luck :(
DannyRS
12-11-2012, 05:44 PM
It attempts to read the first letters, can you try
ChooseOptionMulti(['*Attack', 'Attack', 'ttack','tac']))
It has been fairly buggy lately though, you could consider recording mouse position of click and clicking within y+22 - y+44
Tht would hit the first option, depends on detection of spider acuracy though :)
Ashaman88
12-11-2012, 06:05 PM
Do an else and writeln(getchooseoptions) i think is the command, will show you what simba is seeing
Also, use waitchooseoptionmulti, tis the best
Wardancer
12-11-2012, 06:49 PM
It might fail because it runs the line before the options tab is correctly opened. You can try to increase the waiting time before the line to see if that's an issue. Nonetheless, I strongly suggest using WaitOptionMulti(['Attack', 'ttack'], 1000).
I have had the same exact problem..
Le Jingle
12-11-2012, 07:12 PM
are you using the latest simba?
just tested some lumbridge spiders with your posted find color x,y
program Lumby_Spiders;
{$i srl/srl.simba}
{$i srl/srl/misc/debug.simba}
var
x, y, bmp: integer;
options: array of TOptions;
begin
setupsrl;
if (FindColorTolerance(X, Y, 3577013, MSX1, MSY1, MSX2, MSY2, 15)) then
begin
MMouse(X, Y, 3, 3);
Wait(10 + Random(10));
ClickMouse2(false);
Wait(2000 + Random(100));
options := GetChooseOptions('all');
writeln(options[0].Str);
CopyclientToBitmap(bmp, options[0].BigBox.X1, options[0].BigBox.Y1,
options[0].BigBox.x2, options[0].BigBox.y2);
DebugBitmap(bmp);
end;
end.
footballjds
12-11-2012, 07:13 PM
issues with simba's OCR. Ongoing issue... :( it needs fixed.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.