Alipheese
12-31-2013, 05:13 PM
So I'm trying to make a script that attacks things and then loots them, but for that I need to use chooseOption._select. When I try to use the function, it always results with the error that the option menu isn't open, even though it is. Is there any way I can fix this?
Example script:
program new;
{$Define SMART}
{$I srl-6/srl.simba}
begin
setupSRL();
Mouse(point(300,300), mouse_right);
if chooseoption.isopen() then
begin
if chooseOption.optionsExist(['alk here']) then
begin
writeln('the option walk here is there!');
chooseoption._select(['alk', 'lk here', 'Walk'], MOUSE_LEFT, true, 1.00, 150);
end else
begin
writeln('option is not there');
end;
end else
begin
writeln('chooseoption not open');
end;
end.
Resulting debug text:
-- setupSRL(): True
-- chooseOption.isOpen(): result = true
-- TRSChooseOptions.optionsExist(): result = true
the option walk here is there!
-- chooseOption._select():
---- chooseOption.isOpen(): result = false
---- ERROR: chooseOption menu never appeared
-- chooseOption.select() result = false
-- Freeing the minimap mask
-- Succesfully freed SMART[15072]
Successfully executed.
Example script:
program new;
{$Define SMART}
{$I srl-6/srl.simba}
begin
setupSRL();
Mouse(point(300,300), mouse_right);
if chooseoption.isopen() then
begin
if chooseOption.optionsExist(['alk here']) then
begin
writeln('the option walk here is there!');
chooseoption._select(['alk', 'lk here', 'Walk'], MOUSE_LEFT, true, 1.00, 150);
end else
begin
writeln('option is not there');
end;
end else
begin
writeln('chooseoption not open');
end;
end.
Resulting debug text:
-- setupSRL(): True
-- chooseOption.isOpen(): result = true
-- TRSChooseOptions.optionsExist(): result = true
the option walk here is there!
-- chooseOption._select():
---- chooseOption.isOpen(): result = false
---- ERROR: chooseOption menu never appeared
-- chooseOption.select() result = false
-- Freeing the minimap mask
-- Succesfully freed SMART[15072]
Successfully executed.