SRL Archive - SRL Bugs

or Maybe just a minor change


Based Lord

2012-06-30 02:20:10

I used the following to pick up a full helm off the ground for my Animation Room bot.

If(ChooseOption('full helm'))
Now when I run the bot after right clicking the item it just sits their unable to find the text. Not sure if it is because it is a different color now or something but I know for sure it was working about a week ago.

riwu

2012-06-30 02:57:28

Because if u are experiencing slight lag, the option is not going to appear right after u right click, hence it will not choose the option (since the option does not exist when it is called).

Always use WaitOption('helm',1500);

Based Lord

2012-06-30 03:08:17

From: riwu
Because if u are experiencing slight lag, the option is not going to appear right after u right click, hence it will not choose the option (since the option does not exist when it is called).

Always use WaitOption('helm',1500);

I will try that but the window was open the entire time
(Script loops through it ~5 times before exiting to go get armour from the bank)

Edit: Still not picking up the text

riwu

2012-06-30 03:18:07

Took a look at ur script:
Mouse(x, y, 2, 2, False);
If(ChooseOption('full helm')) Then

So basically what its going to do is to right click, then right after u right click, it will search for the option, BUT due to lag, the option window will not appear immediately after u right click, so it will fail to find.

Even if u loops it multiple times the option is still not going to appear immediately after u right click.

Try adding a wait before ChooseOption (~1-2sec) will solve the problem too, WaitOption is a better solution though.
Also maybe shorten ur string, like just 'elm' or 'ull'.

Add debugs if u still cant figure out the problem

Based Lord

2012-06-30 03:24:01

From: riwu
Took a look at ur script:
Mouse(x, y, 2, 2, False);
If(ChooseOption('full helm')) Then

So basically what its going to do is to right click, then right after u right click, it will search for the option, BUT due to lag, the option window will not appear immediately after u right click, so it will fail to find.

Even if u loops it multiple times the option is still not going to appear immediately after u right click.

Try adding a wait before ChooseOption (~1-2sec) will solve the problem too, WaitOption is a better solution though.
Also maybe shorten ur string, like just 'elm' or 'ull'.

Add debugs if u still cant figure out the problem

I have a newer version of the script. Currently I have it using the WaitOption you suggested I will pm you the script if you would like to see. I ran my script for 6 hours and now it won't work even once out of the 10 times i've tried? :p I think something has to have been changed

CephaXz

2012-06-30 03:51:27

Maybe it reads the text wrongly. Try other texts like 'l h', 'ful'.

Based Lord

2012-06-30 04:03:53


If(WaitOptionMulti(['helm','ull','elm'],500)) Then



Didn't work with the code above, attaching a picture of what it looks like after I right click.
Also, I'm going to bed enough scripting for the day :)

CephaXz

2012-06-30 04:28:19

I just bought a mith full helm and tried it. Works for me.


Procedure takeupitem;
begin
Mouse(262, 212, 0, 0, mouse_Right);
if WaitOption('ull', 2000) then
writeln('Found')
else
writeln('Not found');
end;

Based Lord

2012-06-30 12:36:44

Thanks for the help, I realized that my code was incorrect and illogical for this function. Human Error :)

Ashaman88

2012-06-30 13:39:18

Just for future reference, anytime you have trouble with choose options, do writeln(getchooseoptions) to debug and it will tell you exactly what options it is detecting

Based Lord

2012-06-30 14:05:27

From: ashaman88
Just for future reference, anytime you have trouble with choose options, do writeln(getchooseoptions) to debug and it will tell you exactly what options it is detecting

Good to know, Thanks