Results 1 to 3 of 3

Thread: Repeat

  1. #1
    Join Date
    Feb 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Repeat

    How would I make this script repeat itself 10,000 times?
    This is not mine.
    Code:
    Program FlaxPicker;
    {$i srl/srl.simba}
    Procedure FindFlaxTPA;
    var
      tmpCTS, l, r:Integer;
      FlaxTPA:TPointArray;
    begin
      MouseSpeed:=15;
      tmpCTS := GetToleranceSpeed;
      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.02, 0.89);
      if FindColorsTolerance(FlaxTPA, 13946995, 8, 7, 509, 335, 11) then
        begin
        SetColorToleranceSpeed(tmpCTS);
        SetToleranceSpeed2Modifiers(0.02, 0.02);
        L := Low(FlaxTPA)
        wait(randomrange(60, 100));
        mmouse((FlaxTPA[r].x), (FlaxTPA[r].y), 2, 2);
        clickmouse2(mouse_left);
        wait(randomrange(600, 800));
        while (IsMoving) do
        wait(randomrange(100, 250));
        end;
    end;
    begin
    FindFlaxTPA;
    end.
    Begin
    end.

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    You only need 1 'begin ... end.'
    Simba Code:
    var
     i: Integer;
    begin
     for i:= 1 to 10000 do
       FindFlaxTPA;
    end;

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    I highly advise that you use the Project2006 Inlcude which can be found here:http://villavu.com/forum/showthread.php?t=95916

    And to make this repeat, you could do something like:

    Simba Code:
    Function ClickTree: Boolean;
    Var
      tmpCTS,i, L,Counter: Integer;
      ObjTPA: TPointArray;
      ObjATPA: T2DPointArray;
      X,Y,DMCount,Moves: Integer;
    Begin
      Moves:=0;
      DMCount:=0;

      tmpCTS := GetToleranceSpeed;
      SetColorToleranceSpeed(2);

      SetToleranceSpeed2Modifiers(0.02, 0.89);
      FindColorsTolerance(ObjTPA, 13946995, MSX1, MSY1, MSX2, MSY2, 5);
      SplitTPAWrap(ObjTPA, 10, ObjATPA);

      SortATPASize(ObjATPA,True);
      SetColorToleranceSpeed(tmpCTS);
      SetToleranceSpeed2Modifiers(0.02, 0.02);

      DMCount:=RandomRange(3,5);
      L := High(ObjATPA)
      MarkTime(Counter);
      For i := 0 To L Do
        Begin
          MiddleTPAEx(ObjATPA[i], X, Y);

          Repeat Begin
            Moves:=Moves+1;
            mmouse(x, y, 1, 1);
            Wait(RandomRange(140, 200));
            If (P06_IsUpTextMultiCustom(['Flax','ick', 'Pick'])) Then
            Begin
              clickmouse2(mouse_Left);
              Wait(700);
              while (IsMoving) do
              wait(100);
              Exit;
            End;
          End; Until (Moves > DMCount)
          If (TimeFromMark(Counter) > 5000) Then
          Begin
            Break;
          End;
        End;
      Result:=False;
    End;
    Procedure CheckStuff;
    Begin
    If (P06_InvFull) Then
      Begin
        BankFlax;
      End;
    End;
    Begin
    CheckStuff;
    End.

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
  •