Results 1 to 4 of 4

Thread: Bank Opening / ChooseOption(); Help

  1. #1
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Bank Opening / ChooseOption(); Help

    Ok so i had a bank opening function made for me, and it uses: ChooseOption('Bank'); to click 'Bank Banker' when you right click on the banker.
    Now the problem is that there are also the words 'Talk To Banker' which contain the word Bank, so 50% of the time the script clicks Talk instead of Bank. Now i thought maby i could use ChooseOption('Bank Banker'); and that might solve my problem but nope.. it didnt. So now im comeing to you guys for help. =D

    just for referance here is the TPA that SmarterChild (this guys awesome) made for me
    Code:
    function GE_OpenBank: Boolean; //Made by SmarterChild
    var
       Colorz: TIntegerArray;
       TPA: TPointArray;
       ATPA: T2DPointArray;
       i: Integer;
    begin
      if(not(LoggedIn)) then exit;
      Result := False;
      Colorz := [470584, 1408164, 1474215, 1073278, 268832];
      X:= MSCX;
      Y:= MSCY;
      for i := 0 to 4 do
      begin
        FindColorsSpiralTolerance(x, y, TPA, Colorz[i], 153, 111, 246, 257, 7);
        begin
          if Length(TPA) = 0 then Continue;
          ATPA := SplitTPA(TPA, 22);
          for i := 0 to High(ATPA) do
          begin
            MiddleTPAEx(ATPA[i], x, y);
            MMouse(x, y, 3, 3);
            Wait(100+Random(100));
            if IsUpText('anker') then
          begin
            Wait(100 + Random(200));
            Mouse(x, y, 4, 4, False);
            Wait(400 + Random(200));
            ChooseOption('Bank');
            WriteLn('Opening bank');
            Result:= True;
           end;
          end;
        end;
      end;
    end;
    now someone sudgested i rewrite the SRL ChooseOption(); function to ONLY click on the white action text.. i was trying to do it but im not that skilled a scripter yet so if any of you guys could help me with that it would be realy awesome to
    Lance. Da. Pants.

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Just use:
    Code:
    ChooseOption('uickly');

  3. #3
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    function ChooseOptionMultiFast(Texts: TStringArray): Boolean;
    var
       B, T: TBox;
       TextTPA, TPA: TPointArray;
       I, C, H, HH: Integer;
       P: TPoint;

    begin
      Result := False;
      GetClientDimensions(B.X2, B.Y2);
      B.X1 := 0;
      B.Y1 := 0;
      FindColorsTolerance(TPA, 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
      If Length(TPA) < 10 Then
        Exit;
      B.X2 := 0;
      B.Y2 := 0;

      P := TPA[0];
      For I := 0 To High(TPA) - 1 Do
        If TPA[i].X = TPA[I+1].X - 1 Then
        Begin
          If C > 5 Then
          Begin
            B.X1 := P.X;
            B.Y1 := P.Y;
            Break;
          End Else
            C := C + 1;
        End
        Else
        Begin
          P := TPA[I + 1];
          C := 0;
        End;
      If I = Length(TPA) Then
      Begin
        WriteLn('Choose Option Menu Getting Failed');
        Exit;
      End;
      InvertTPA(TPA);
      C := 0;
      P := TPA[0];
      For I := 0 To High(TPA) - 1 Do
        If TPA[i].X = TPA[I+1].X + 1 Then
        Begin
          If C > 5 Then
          Begin
            B.X2 := P.X;
            B.Y2 := P.Y;
            Break;
          End Else
            C := C + 1;
        End Else
        Begin
          P := TPA[I + 1];
          C := 0;
        End;
      If I = Length(TPA) Then
      Begin
        WriteLn('Choose Option Menu Getting Failed');
        Exit;
      End;

      H := High(Texts);
      For I := 0 To H do
      begin
        TextTPA := LoadTextTPA(Texts[I], UpChars, HH);
        FindColorsTolerance(TPA, 16777215, B.X1, B.Y1, B.X2, B.Y2, 3);
        If FindTextTPAInTPA(HH, TextTPA, TPA, TPA) Then
        Begin
          T := GetTPABounds(TPA);
          Result := True;
          Mouse(B.X1 + 5, T.y1 - 4, B.X2 - B.X1 - 5, 13, True);
          Exit;
        End;
      end;

      MMouse(B.X1 - 50, B.Y1 - 50, 40, B.Y2 - B.Y1);
      Wait(200 + Random(100));
    end;

    function ChooseOptionFast(Text: String): Boolean;
    begin
      Result := ChooseOptionMultiFast([Text]);
    end;

    Use that instead of ChooseOption. Just make it do Bank though, and it SHOULD only pick an action. If it doesn't, change the Color in
    SCAR Code:
    FindColorsTolerance(TPA, 16777215, B.X1, B.Y1, B.X2, B.Y2, 3);
    To the color of the text you need.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  4. #4
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    N D C S: that wont help me, there is no quickly option, maby i shoulda specified im useing the Grand Exchange bankers so maby they are differant from normal bankers.

    Nava2: ill try it out, hope it works :B
    Lance. Da. Pants.

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
  •