SRL Archive - Help and Support

chosoe option not working


oliver1205

2007-05-06 07:40:01

procedure BuyPlanks;
begin
Mouse( 334+random(10), 110+random(5), 0, 0, false);
wait(100+random(200));
ChooseOption(x,y,'Buy All ');
end;


theres my procedure. it always clicks cancel right below buy all. it never chooses buy 5, 10, or x. just cancel

shaunthasheep

2007-05-06 07:42:47

try something like ChooseOption(x, y, '5'); or ChooseOption(x, y, 'All') (make sure All is right case)

oliver1205

2007-05-06 10:46:38

didnt work. always hits cancel =/

shaunthasheep

2007-05-06 11:02:23

program New;
{.include SRL/SRL.scar}
procedure BuyPlanks;
begin
Mouse(236, 229, 0, 0, false); //i changed this.. change it back to what u had
//and btw, the 0, 0, in Mouse... is the random it adds to it.. so u dont have
//to do + random(35);

wait(100+random(200));
ChooseOption(x,y,'10');
end;

begin
SetupSRL;
BuyPlanks;
end.
thats worked for me buying a random item from general store

i didn't have an Buy All.. only a Buy 10 at general store.. but

if its
Buy All do ChooseOption(x, y, 'All')
if its
Buy all do ChooseOption(x, y, 'all') //notice case
and if those don't work
do
ChooseOption(x, y, 'll');

rkroxpunk

2007-05-06 11:17:47

I got the same problem so I now use ClickOption('Buy all,1) read the SRL manual for the numbers can't remember wat number = wat….but yeah it's easy and works :)

oliver1205

2007-05-06 13:00:01

thansk guys