Results 1 to 3 of 3

Thread: Barin Fart

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default Barin Fart

    Simba Code:
    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....

    Simba Code:
    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;
    Last edited by Element17; 09-02-2012 at 09:14 PM.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    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);

  3. #3
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •