SRL Archive - OSR Help

Barin Fart


Element17

2012-09-02 17:05:31

Function Search: Boolean;  
Var
Loc: TStringArray;
Points: TPointArray;
i,cts: Integer;
PBox: TBox;
Begin
If(Not(LoggedIn))Then Exit;
Begin
FindThing(x,y);
HumanMMouse(x,y, 0,0);
ClickMouse2(True);
Writeln('Clicked Thing');
Wait(2000 +Random(500));
PBox:= IntToBox(307,604,391,613);
HumanMMouse(PBox,PBox ,0,0);
End;
End;

Not sure how to add the Tbox coords into flights HumanMMouse function. I tried pbox.x and pbox.y

The functions finds object a then clicks it, but after that a menu appears in the chat box and all the options are the same color, but they are numbered 1.blah
2.blah
3.blah

and all have the same uptext. "Continue"

Question is how do I HumanMMouse to coords of my tbox

This should work…I think….

Function SearchThing: Boolean;
Var
Loc: TStringArray;
Points: TPointArray;
i,cts: Integer;
PBox: TBox;
Begin

If(Not(LoggedIn))Then Exit;
Begin
FindThing(x,y);
HumanMMouse(x,y, 0,0);
ClickMouse2(True);
Writeln('Clicked thing');
Wait(2000 +Random(500));
PBox:= IntToBox(307,604,391,613);
MouseTBox(PBox, movemouse);
ClickMouse2(True);
End;
End;

Le Jingle

2012-09-02 17:14:31

I think you want to just click one of the three options?

I'd use a TPoint for the middle of the option you want, then do HumanMMouse(TPointName.x, TPointName.y, 0, 0);

Richard

2012-09-02 17:46:51

I think HumanMMouse((TBox.x1 + TBox.x2)/2, (TBox.y1 + TBox.y2)/2, (TBox.x2 - TBox.x1)/2, (TBox.y2 - TBox.y1)/2); would work.

I'm not entirely sure, as I haven't tested it, but my logic is that the first two parameters is the midpoint of the TBox, the second pair of parameters calculate how far it is to the outside corners of the TBox from the midpoint. The only issue with this is that the randomness would be a circle around the midpoint, meaning it goes outside the TBox at some points. Image:

The box is your box, while the circle is where the mouse could click.

I could be wrong, but this is my understanding of the maths.