SRL Archive - Help

ChooseOption


Mute

2011-06-29 22:44:08

Hi,

It's been a long time.

I started working (again) on a color-based script, after all this time I still don't know the first thing about reflection (and I'm testing all of these random snippets on an outdated version of RuneScape, so I don't think reflection would work anyways, right?)

So anywho, I finally managed to put something together that compiles and runs, however, I am running into a problem with ChooseOption('')..

Here's the code:


procedure BuyItems;
begin
bs := 20;
repeat
bu := bu+10;
MoveMouse(x,y);
Wait(1000);
ClickMouse2(false);
Wait(1000);
ChooseOption('uy 10');
Wait(1000);
until(bu = bs);
end;

Please excuse the mess.

The problem I am getting is when I run the script, it moves to the item, right clicks it, but it just leaves the right-click menu open..

Smarter Child

2011-06-29 22:57:52

Chances are with an older version of Runescape the text is different.

@Awkwardsaw: :p

E: You could try -
MoveMouse(x, y);
ClickMouse2(false);
MoveMouse(x + 4, y);
Or something like that, it would move the mouse to an offset of the x coord <– to –> and then you could use clickmouse, however that may not always work depending on the angle, so may want to try something from Text.scar or find an old SRL revision.

E2: If the option has a different color that you could use (after the option box is open)
if FindColor(xx, yy, color, MSx1, MSy1, MSx2, MSy2)then
MoveMouse(xx, yy);
ClickMouse2(true);

Not you would need to include SRL via
{$i srl\srl.scar} 
for the MS coordinates, or you could simply get them yourself through the colour picker :)

Awkwardsaw

2011-06-29 22:58:21

perhaps the font that chooseoption uses is different than the version of runescape you are playing, thus it can't recognise the text

e: ninja :(

Mute

2011-06-29 23:09:56

From: Awkwardsaw
perhaps the font that chooseoption uses is different than the version of runescape you are playing, thus it can't recognise the text

e: ninja :(


I don't know why I didn't consider that. :duh:

I guess I'll use the updated RuneScape client, I know it still can be done with TPAs (perhaps?) but I'd rather be able to take full advantage of what SRL has to offer. :redface:

Awkwardsaw

2011-06-29 23:14:53

or perhaps you can make a dtm/bitmap of the option you want to choose. there are plenty of good tutorials

noidea

2011-06-30 14:36:50

Make sure you're in safemode. Ive fallen for that trap :|

mat_de_b

2011-06-30 15:31:57

+50 X pixels is the second option 100 for the third ETC. I couldn't get it to work on the current RS a little while ago.

blackfire553

2011-07-01 15:07:08

try R_ChooseOption from reflection
ill try using chooseoption and see if i can duplicate your problem, color should still work