Results 1 to 4 of 4

Thread: FindFastRandoms-Error?

  1. #1
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindFastRandoms-Error?

    ok, im sure its something i did wrong, but I am getting an error in FindFast Randoms. Here is the script:

    SCAR Code:
    {]|====================================================================================|[]
    []|        _________________________________________________                           |[]
    []|        || Macrosoft Lumbridge Swamp Tar Collector V.1 ||                           |[]
    []|        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\                           |[]
    []|                          Instructions                                              |[]
    []|                          <><><><><><>                                              |[]
    []| 1. You may start the script anywere, however it is recomended                      |[]
    []|    that you start in the Lumbridge Swamp, as the script will                       |[]
    []|    most likely run longer due to the fact that it uses Lumb Home Tele to           |[]
    []|    reset its place if it gets lost.                                                |[]
    []| 2. Use Runescape on Low Detail, and set it to V-Bright in the Options menu         |[]
    []| 3. Setup Players and other Stuff                                                   |[]
    []| 4. Do not set Players[].Integer1 and Players[].Integer2, I have not added that yet |[]
    []| 5. Please Post Proggies and Happy Autoing! Press f12 to manually end script.                                         |[]
    []|====================================================================================|[}

    program SwampTarCollector;

    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    //{.include SRL/SRL/Extended/xBitMap.scar}

    var
     STime: Array of Integer;
     PlayerUsed: Array of Boolean;
     LumbMins: Array of longint;
     TarCollected: Array of integer;
     i,n,x,y, TTarCollected, a,b,CTime, TimesSwitched, WalkBacks, Strikes: Integer;
     MaybeStrike: Boolean;
     Person: Integer;
    {-_-_-_-_Player Setup_-_-_-_-}
    {}Procedure DeclarePlayers;
    {} begin
    {}  HowManyPlayers := 10;
    {}  NumberOfPlayers(HowManyPlayers);
    {}  CurrentPlayer := 0; //Player to start on.
    {}
    {}  Players[0].Name := 'Username';
    {}  Players[0].Pass := 'Password';
    {}  Players[0].Nick := 'ame'; //A 3 to 4 letter section of your username that does not have any capitals
    {}  Players[0].Integers[0] := 100; //How much tar to collect before switching players?
    {}  Players[0].Integers[1] := 120;  //Maximum amount of time (in minutes) to auto on this player
    {}  Players[0].Booleans[0] := True;{If true, the player will become Active again
    {}
                                 //after 30 mins because it will be able to reset itself with
    {}                              //lumb home tele}
    {}  Players[0].Booleans[1] := True;{If true, the script will reset itself with lumb home tele
    {}
                               //if it gets lost}
    {}  Players[0].Active := True; //Will you be using this player to auto?
    {}
    {}
    {}
    {}  Players[1].Name := 'Username';
    {}  Players[1].Pass := 'Password';
    {}  Players[1].Nick := 'ame'; //A 3 to 4 letter section of your username that does not have any capitals
    {}  Players[1].Integers[0] := 500; //How much tar to collect before switching players?
    {}  Players[1].Integers[1] := 120;  //Maximum amount of time (in minutes) to auto on this player
    {}  Players[1].Booleans[0] := True;{If true, the player will become Active again
    {}
                                 //after 30 mins because it will be able to reset itself with
    {}                              //lumb home tele}
    {}  Players[1].Booleans[1] := True;{If true, the script will reset itself with lumb home tele
    {}
                                 //if it gets lost}
    {}  Players[1].Active := False; //Will you be using this player to auto?
    {}
    {}
    {}
    {}  Players[2].Name := 'Username';
    {}  Players[2].Pass := 'Password';
    {}  Players[2].Nick := 'ame';
    {}  Players[2].Integers[0] := 100;
    {}  Players[2].Integers[1] := 120;
    {}  Players[2].Booleans[0] := True;
    {}  Players[2].Booleans[1] := True;
    {}  Players[2].Active := False;
    {}
    {}
    {}  Players[3].Name := 'Username';
    {}  Players[3].Pass := 'Password';
    {}  Players[3].Nick := 'ame';
    {}  Players[3].Integers[0] := 100;
    {}  Players[3].Integers[1] := 120;
    {}  Players[3].Booleans[0] := True;
    {}  Players[3].Booleans[1] := True;
    {}  Players[3].Active := False;
    {}
    {}
    {}  Players[4].Name := 'Username';
    {}  Players[4].Pass := 'Password';
    {}  Players[4].Nick := 'ame';
    {}  Players[4].Integers[0] := 100;
    {}  Players[4].Integers[1] := 120;
    {}  Players[4].Booleans[0] := True;
    {}  Players[4].Booleans[1] := True;
    {}  Players[4].Active := False;
    {}
    {}
    {}  Players[5].Name := 'Username';
    {}  Players[5].Pass := 'Password';
    {}  Players[5].Nick := 'ame';
    {}  Players[5].Integers[0] := 100;
    {}  Players[5].Integers[1] := 120;
    {}  Players[5].Booleans[0] := True;
    {}  Players[5].Booleans[1] := True;
    {}  Players[5].Active := False;
    {}
    {}
    {}  Players[6].Name := 'Username';
    {}  Players[6].Pass := 'Password';
    {}  Players[6].Nick := 'ame';
    {}  Players[6].Integers[0] := 100;
    {}  Players[6].Integers[1] := 120;
    {}  Players[6].Booleans[0] := True;
    {}  Players[6].Booleans[1] := True;
    {}  Players[6].Active := False;
    {}
    {}
    {}  Players[7].Name := 'Username';
    {}  Players[7].Pass := 'Password';
    {}  Players[7].Nick := 'ame';
    {}  Players[7].Integers[0] := 100;
    {}  Players[7].Integers[1] := 120;
    {}  Players[7].Booleans[0] := True;
    {}  Players[7].Booleans[1] := True;
    {}  Players[7].Active := False;
    {}
    {}
    {}  Players[8].Name := 'Username';
    {}  Players[8].Pass := 'Password';
    {}  Players[8].Nick := 'ame';
    {}  Players[8].Integers[0] := 100;
    {}  Players[8].Integers[1] := 120;
    {}  Players[8].Booleans[0] := True;
    {}  Players[8].Booleans[1] := True;
    {}  Players[8].Active := False;
    {}
    {}
    {}  Players[9].Name := 'Username';
    {}  Players[9].Pass := 'Password';
    {}  Players[9].Nick := 'ame';
    {}  Players[9].Integers[0] := 100;
    {}  Players[9].Integers[1] := 120;
    {}  Players[9].Booleans[0] := True;
    {}  Players[9].Booleans[1] := True;
    {}  Players[9].Active := False;
    {}
    {}  SetLength(STime, HowManyPlayers);
    {}  SetLength(PlayerUsed, HowManyPlayers);
    {}  SetLength(LumbMins, HowManyPlayers);
    {}  SetLength(TarCollected, HowManyPlayers);
    {}end;

    Procedure ProgressReport;
     begin
       writeln('_-_-_-_-_-Macrosoft Lumbridge Swamp Tar Collector-_-_-_-_-_');
       writeln('_-_-_-_-_-_-_-_-_-_-_-Progress Report-_-_-_-_-_-_-_-_-_-_-_');
       writeln('');
       writeln('Worked for: ' + TimeRunning);
       writeln('Colected a total of ' + inttostr(TTarCollected) + ' swamp tar');
       begin
         For a:= 0 to HowManyPlayers -1 do
           begin
             if(PlayerUsed[a]=True) then
               writeln('Collected ' + inttostr(TarCollected[a])+' on ' + Players[a].Name)
           end;
       end;
       writeln('Switched Players ' + inttostr(TimesSwitched) + ' time(s)');
       writeln('Teleported to lumbridge and walked back ' + inttostr(WalkBacks) + ' time(s)');
       writeln('Post this progress report and any other comments or suggestions');
       writeln('on [url]http://www.srl-forums.com/[/url] or suffer the title of leecher!');
       writeln('You Leech, You Die!');
    end;
    Function NoneActive: Boolean;
     begin
       begin
         for n:=0 to HowManyPlayers - 1 do
           begin
               begin
                 If(Players[n].Active) then
                   begin
                     result:=False;
                     Exit;
                   end;
               end;
             n:=n+1;
           end;
       end;
       Result:=True;
     end;
     
     
    Function ReActivatePlayers: Boolean;
     begin
        NoneActive;
        begin
          if(NoneActive) then
            begin
              for CurrentPlayer:=0 to HowManyPlayers - 1 do
                begin
                  if(Players[CurrentPlayer].Booleans[1]) then
                    begin
                      If(GetSystemTime - STime[CurrentPlayer]>=LumbMins[CurrentPlayer] * 6000) then
                        Players[CurrentPlayer].Active:=True;
                    end;
                    CurrentPlayer:=CurrentPlayer+1;
                end;
            end;
            NoneActive;
            begin
              If(NoneActive)then
                Result:= False
              else
                begin
                  Result:= True;
                end;
            end;
        end;
     end;

    Procedure NextPlayerCycle;
     begin
        logout;
        a:=0;
        Stime[CurrentPlayer]:=GetSystemTime;
        Players[CurrentPlayer].Active:=False;
        repeat
          a:=a+1;
          begin
            If(CurrentPlayer>HowManyPlayers - 1) then
              CurrentPlayer:=0
            else
              CurrentPlayer:=CurrentPlayer + 1;
          end;
          begin
            if(a=HowManyPlayers) then
              begin
                ReActivatePlayers;
                begin
                  if(ReActivatePlayers) then a:=0
                  else
                    begin
                      ProgressReport;
                      TerminateScript;
                    end;
                end;
              end;
          end;
        until(Players[CurrentPlayer].Active);
        TarCollected[CurrentPlayer]:=0;
        LoginPlayer;
        TimesSwitched:= TimesSwitched + 1;
    end;

    Function SwampCheck: Boolean;//checks if in the swamp
     begin
       begin
         if (not(FindColorTolerance(x, y, 7965518, MMX1, MMY1, MMX2, MMY2, 15)))
         and (not(FindColorTolerance(x, y, 6191915, MMX1, MMY1, MMX2, MMY2, 20)))then
           begin
             Result:= False;
           end else
             Result:= True;
        end;
     end;
     
    Procedure LogInIfNot;
     begin
       if(not(LoggedIn))then
         begin
           LoginPlayer;
           wait(1000 + random(100));
         end;
     end;
     
    Function LumbTele: Boolean;
     begin
       GameTab(7);
       wait(1000 + random(100));
       begin
         if (not(GetLumbridgeMins=0)) then
           begin
             LumbMins[CurrentPlayer]:= GetLumbridgeMins;
             Result:=False;
           end
         else
           Result:=True;
       end;
     end;
    Function WalkToSwamp: Boolean;
     begin
       RadialWalk( 608291, 176, 208, 67, 2, 2);
       wait(500 + random(50));
       Flag;
       FindColorTolerance(x, y, 8097105, MMX1, MMY1, MMX2, MMY2, 10);
       wait(100 + random(50));
       Mouse(x, y, 5, 5, True);
       i:=0;
       wait(5000 + random(500));
       repeat
         begin
           Wait(1000 +random(50));
           i:=i +1;
         end;
       until(FlagPresent)or(i=5);
       wait(100 + random(25));
       Flag;
       RadialWalk(6059563 , 166, 210, 54, 2, 2);
       Wait(500 + random(100));
       Flag;
       begin
         if(SwampCheck) then
           begin
             Writeln('Walked to Swamp Succesfully');
             WalkBacks:=WalkBacks +1;
             Result:=True
         end else
           begin
             Writeln('Didnt Walk to Swamp succesfully');
             Result:=False;
           end;
       end;
    end;

    Function PickUpTar: Boolean;
     begin
       begin         //the below finds the item dot on the minimap
         If(not(FindColorTolerance(x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10))) Then
         begin
           result:= False;
           Exit;
         end;
       end;
       Mouse(x, y, 5, 5, True);
       Wait(500);                     //now it walks to the item
       Flag;                          //and finds the swamp tar
       begin
         if FindObjCustom(x, y, ['ake', 'wamp', 'tar'], [3552827, 2434343, 3289655], 10) then
          begin
            case Random(3) of
              0: Mouse(x, y, 5, 5, True);
              1: Mouse(x, y, 5, 5, True);
              2: begin
                   Mouse(x, y, 10, 10, False);
                   ChooseOption('ake');
                 end;
          end;
            TarCollected[CurrentPlayer] := TarCollected[CurrentPlayer] +1;
            TTarCollected := TTarCollected + 1;
            Result:=True;
          end else
            Result:=False;
          end;
     end;
    Procedure IDontAuto;
     begin
       wait(1000 + random(500));
       begin
         case Random(100) of
           1: AlmostLogout;
           7: PickUpMouse;
           17: RandomRClick;
           27: PickUpMouse
       end;
       Person := BitmapFromString(6, 6, 'beNpjYICAf2DAwIDCBYI3b94g' +
            'iwC5ly5dgqlifPTo0dGjR4EMBgRgROUiAQBy9SHO');
       if(FindBitmapsProgressiveTol(x, y, [Person], 10, 1, MMX1, MMY1, MMX2, MMY2))then
         begin
           FreeBitmap(Person);
           wait(1000 + Random(500));
           case Random(50) of
             1: TypeSend('I heard this is a good way to make mony');
             2: Typesend('Sry if i dont respond, I am doing hw :p');
             7: Typesend('Im bored...');
             5: Typesend('These sell for like 300-400gp on da forums right?');
         end;
        FreeBitmap(Person);
     end;

    function FindFastRandoms: Boolean; //By WT-Fakawi. I edited some things to make it work for me :p
    var
      i: Integer;
    begin
      for i := 1 to 8 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          7: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                NextPlayerCycle;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
    end;
    begin
      ClearDebug;
      SetupSrl;
      ActivateClient;
      DeclarePlayers;
      LogInIfNot;
      TarCollected[CurrentPlayer]:=0;
      TimesSwitched:=0;
      WalkBacks:=0;
      Strikes:=0;
      TTarCollected:=0;
      MaybeStrike:=False;
      repeat
        SwampCheck;
        IDontAuto;
        begin
          if(FindFastRandoms) then
          Continue;
        end;
        FindNormalRandoms;
        begin
          If(not(SwampCheck))then
            begin
              LumbTele;
              begin
                If(not(LumbTele))then
                  Writeln('Player was not in swamp and was not able to tele to Lumbridge, Next Player...');
                  NextPlayerCycle;
                  Continue;
              end;
              begin
                FindFastRandoms;
                FindNormalRandoms;
                if(WalkToSwamp) then
                  writeln('Picking up tar')
                else
                  NextPlayerCycle;
                  Continue;
            end;
        end;
        begin
          wait(1000 + random(200));
          begin
            if(FindFastRandoms) then
              Continue;
          end;
          FindNormalRandoms;
          if(not(PickUpTar))then
            begin
              if(MaybeStrike=True) then
                begin
                  MaybeStrike:=False;
                  Strikes:=Strikes +1;
                  if(Strikes=3) then
                    begin
                      if(LumbTele) then
                        begin
                          if(WalkToSwamp) then
                            begin
                              Strikes:=0;
                              Continue;
                          end else
                            begin
                              NextPlayerCycle;
                              Strikes:=0;
                              Continue;
                            end;
                      end else
                        begin
                          NextPlayerCycle;
                          Strikes:=0;
                          Continue;
                        end;
                    end;
                end;
            end;
            begin
              if(not(FindColorTolerance( x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10))) Then
                begin
                  if(SwampCheck) Then
                    begin
                      i:=0;
                      repeat
                        wait(1000);//Wait for a swamp tar to respawn
                        i:=i+1;
                        begin
                          begin
                            if(FindFastRandoms) then
                              Continue;
                          end;
                          FindNormalRandoms;
                          case Random(30) of//antiban for when waiting
                            1: RandomRClick;
                            7: PickUpMouse;
                            10: BoredHuman;
                            17: AlmostLogout;
                        end;
                      until(FindColorTolerance(x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10)) or (i=15);
                      begin
                        if(i=15) and (Players[CurrentPlayer].Boolean2 = True) then //if it waited for 15 seconds without a respawn, reset the place in the swamp
                          begin
                            If(LumbTele) then
                              begin
                                If(WalkToSwamp) then
                                  begin
                                    Continue;
                                end else
                                  begin
                                    NextPlayerCycle;
                                    Continue;
                                  end;
                            end else
                              begin
                                NextPlayerCycle;
                                Continue;
                            end;
                        end else
                          begin
                            if(i=15) then
                              begin
                                NextPlayerCycle;
                                Continue;
                            end else
                              begin
                                MaybeStrike:=True;
                                Continue;
                              end;
                          end;
                      end;
                    end;
                end;
            end;
        end;
      until(isfkeydown(12))//not only way it stops, see Function NextPlayerCycle
      writeln('User Stopped Script');
      ProgressReport;
    end.

    Error is:
    Line 376: [Error] (15779:1): Identifier expected in script C:\Program Files\SCAR 3.12\Scripts\Macrosoft Lumbridge Swamp Tar Collector.scar

    any idea what went wrong?

  2. #2
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you need 1 or 2 more ends in idontauto procedure
    should look like this u need to fix where the ends should be sinec im not good with standards
    SCAR Code:
    Procedure IDontAuto;
     begin
       wait(1000 + random(500));
       begin
         case Random(100) of
           1: AlmostLogout;
           7: PickUpMouse;
           17: RandomRClick;
           27: PickUpMouse
       end;
       Person := BitmapFromString(6, 6, 'beNpjYICAf2DAwIDCBYI3b94g' +
            'iwC5ly5dgqlifPTo0dGjR4EMBgRgROUiAQBy9SHO');
       if(FindBitmapsProgressiveTol(x, y, [Person], 10, 1, MMX1, MMY1, MMX2, MMY2))then
         begin
           FreeBitmap(Person);
           wait(1000 + Random(500));
           case Random(50) of
             1: TypeSend('I heard this is a good way to make mony');
             2: Typesend('Sry if i dont respond, I am doing hw :p');
             7: Typesend('Im bored...');
             5: Typesend('These sell for like 300-400gp on da forums right?');
         end;
        FreeBitmap(Person);
     end;

  3. #3
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You need to make sure for each begin you have an end, for each repeat you have an until and for each case you have an end. Here's the fixed script (you had numerous errors after that first one too):

    SCAR Code:
    {]|====================================================================================|[]
    []|        _________________________________________________                           |[]
    []|        || Macrosoft Lumbridge Swamp Tar Collector V.1 ||                           |[]
    []|        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\                           |[]
    []|                          Instructions                                              |[]
    []|                          <><><><><><>                                              |[]
    []| 1. You may start the script anywere, however it is recomended                      |[]
    []|    that you start in the Lumbridge Swamp, as the script will                       |[]
    []|    most likely run longer due to the fact that it uses Lumb Home Tele to           |[]
    []|    reset its place if it gets lost.                                                |[]
    []| 2. Use Runescape on Low Detail, and set it to V-Bright in the Options menu         |[]
    []| 3. Setup Players and other Stuff                                                   |[]
    []| 4. Do not set Players[].Integer1 and Players[].Integer2, I have not added that yet |[]
    []| 5. Please Post Proggies and Happy Autoing! Press f12 to manually end script.                                         |[]
    []|====================================================================================|[}

    program SwampTarCollector;

    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Magic.scar}
    //{.include SRL/SRL/Extended/xBitMap.scar}

    var
     STime: Array of Integer;
     PlayerUsed: Array of Boolean;
     LumbMins: Array of longint;
     TarCollected: Array of integer;
     i,n,x,y, TTarCollected, a,b,CTime, TimesSwitched, WalkBacks, Strikes: Integer;
     MaybeStrike: Boolean;
     Person: Integer;
    {-_-_-_-_Player Setup_-_-_-_-}
    {}Procedure DeclarePlayers;
    {} begin
    {}  HowManyPlayers := 10;
    {}  NumberOfPlayers(HowManyPlayers);
    {}  CurrentPlayer := 0; //Player to start on.
    {}
    {}  Players[0].Name := 'Username';
    {}  Players[0].Pass := 'Password';
    {}  Players[0].Nick := 'ame'; //A 3 to 4 letter section of your username that does not have any capitals
    {}  Players[0].Integers[0] := 100; //How much tar to collect before switching players?
    {}  Players[0].Integers[1] := 120;  //Maximum amount of time (in minutes) to auto on this player
    {}  Players[0].Booleans[0] := True;{If true, the player will become Active again
    {}
                                 //after 30 mins because it will be able to reset itself with
    {}                              //lumb home tele}
    {}  Players[0].Booleans[1] := True;{If true, the script will reset itself with lumb home tele
    {}
                               //if it gets lost}
    {}  Players[0].Active := True; //Will you be using this player to auto?
    {}
    {}
    {}
    {}  Players[1].Name := 'Username';
    {}  Players[1].Pass := 'Password';
    {}  Players[1].Nick := 'ame'; //A 3 to 4 letter section of your username that does not have any capitals
    {}  Players[1].Integers[0] := 500; //How much tar to collect before switching players?
    {}  Players[1].Integers[1] := 120;  //Maximum amount of time (in minutes) to auto on this player
    {}  Players[1].Booleans[0] := True;{If true, the player will become Active again
    {}
                                 //after 30 mins because it will be able to reset itself with
    {}                              //lumb home tele}
    {}  Players[1].Booleans[1] := True;{If true, the script will reset itself with lumb home tele
    {}
                                 //if it gets lost}
    {}  Players[1].Active := False; //Will you be using this player to auto?
    {}
    {}
    {}
    {}  Players[2].Name := 'Username';
    {}  Players[2].Pass := 'Password';
    {}  Players[2].Nick := 'ame';
    {}  Players[2].Integers[0] := 100;
    {}  Players[2].Integers[1] := 120;
    {}  Players[2].Booleans[0] := True;
    {}  Players[2].Booleans[1] := True;
    {}  Players[2].Active := False;
    {}
    {}
    {}  Players[3].Name := 'Username';
    {}  Players[3].Pass := 'Password';
    {}  Players[3].Nick := 'ame';
    {}  Players[3].Integers[0] := 100;
    {}  Players[3].Integers[1] := 120;
    {}  Players[3].Booleans[0] := True;
    {}  Players[3].Booleans[1] := True;
    {}  Players[3].Active := False;
    {}
    {}
    {}  Players[4].Name := 'Username';
    {}  Players[4].Pass := 'Password';
    {}  Players[4].Nick := 'ame';
    {}  Players[4].Integers[0] := 100;
    {}  Players[4].Integers[1] := 120;
    {}  Players[4].Booleans[0] := True;
    {}  Players[4].Booleans[1] := True;
    {}  Players[4].Active := False;
    {}
    {}
    {}  Players[5].Name := 'Username';
    {}  Players[5].Pass := 'Password';
    {}  Players[5].Nick := 'ame';
    {}  Players[5].Integers[0] := 100;
    {}  Players[5].Integers[1] := 120;
    {}  Players[5].Booleans[0] := True;
    {}  Players[5].Booleans[1] := True;
    {}  Players[5].Active := False;
    {}
    {}
    {}  Players[6].Name := 'Username';
    {}  Players[6].Pass := 'Password';
    {}  Players[6].Nick := 'ame';
    {}  Players[6].Integers[0] := 100;
    {}  Players[6].Integers[1] := 120;
    {}  Players[6].Booleans[0] := True;
    {}  Players[6].Booleans[1] := True;
    {}  Players[6].Active := False;
    {}
    {}
    {}  Players[7].Name := 'Username';
    {}  Players[7].Pass := 'Password';
    {}  Players[7].Nick := 'ame';
    {}  Players[7].Integers[0] := 100;
    {}  Players[7].Integers[1] := 120;
    {}  Players[7].Booleans[0] := True;
    {}  Players[7].Booleans[1] := True;
    {}  Players[7].Active := False;
    {}
    {}
    {}  Players[8].Name := 'Username';
    {}  Players[8].Pass := 'Password';
    {}  Players[8].Nick := 'ame';
    {}  Players[8].Integers[0] := 100;
    {}  Players[8].Integers[1] := 120;
    {}  Players[8].Booleans[0] := True;
    {}  Players[8].Booleans[1] := True;
    {}  Players[8].Active := False;
    {}
    {}
    {}  Players[9].Name := 'Username';
    {}  Players[9].Pass := 'Password';
    {}  Players[9].Nick := 'ame';
    {}  Players[9].Integers[0] := 100;
    {}  Players[9].Integers[1] := 120;
    {}  Players[9].Booleans[0] := True;
    {}  Players[9].Booleans[1] := True;
    {}  Players[9].Active := False;
    {}
    {}  SetLength(STime, HowManyPlayers);
    {}  SetLength(PlayerUsed, HowManyPlayers);
    {}  SetLength(LumbMins, HowManyPlayers);
    {}  SetLength(TarCollected, HowManyPlayers);
    {}end;

    Procedure ProgressReport;
     begin
       writeln('_-_-_-_-_-Macrosoft Lumbridge Swamp Tar Collector-_-_-_-_-_');
       writeln('_-_-_-_-_-_-_-_-_-_-_-Progress Report-_-_-_-_-_-_-_-_-_-_-_');
       writeln('');
       writeln('Worked for: ' + TimeRunning);
       writeln('Colected a total of ' + inttostr(TTarCollected) + ' swamp tar');
       begin
         For a:= 0 to HowManyPlayers -1 do
           begin
             if(PlayerUsed[a]=True) then
               writeln('Collected ' + inttostr(TarCollected[a])+' on ' + Players[a].Name)
           end;
       end;
       writeln('Switched Players ' + inttostr(TimesSwitched) + ' time(s)');
       writeln('Teleported to lumbridge and walked back ' + inttostr(WalkBacks) + ' time(s)');
       writeln('Post this progress report and any other comments or suggestions');
       writeln('on <a href="http://www.srl-forums.com/" target="_blank">http://www.srl-forums.com/</a> or suffer the title of leecher!');
       writeln('You Leech, You Die!');
    end;
    Function NoneActive: Boolean;
     begin
       begin
         for n:=0 to HowManyPlayers - 1 do
           begin
               begin
                 If(Players[n].Active) then
                   begin
                     result:=False;
                     Exit;
                   end;
               end;
             n:=n+1;
           end;
       end;
       Result:=True;
     end;


    Function ReActivatePlayers: Boolean;
     begin
        NoneActive;
        begin
          if(NoneActive) then
            begin
              for CurrentPlayer:=0 to HowManyPlayers - 1 do
                begin
                  if(Players[CurrentPlayer].Booleans[1]) then
                    begin
                      If(GetSystemTime - STime[CurrentPlayer]>=LumbMins[CurrentPlayer] * 6000) then
                        Players[CurrentPlayer].Active:=True;
                    end;
                    CurrentPlayer:=CurrentPlayer+1;
                end;
            end;
            NoneActive;
            begin
              If(NoneActive)then
                Result:= False
              else
                begin
                  Result:= True;
                end;
            end;
        end;
     end;

    Procedure NextPlayerCycle;
     begin
        logout;
        a:=0;
        Stime[CurrentPlayer]:=GetSystemTime;
        Players[CurrentPlayer].Active:=False;
        repeat
          a:=a+1;
          begin
            If(CurrentPlayer>HowManyPlayers - 1) then
              CurrentPlayer:=0
            else
              CurrentPlayer:=CurrentPlayer + 1;
          end;
          begin
            if(a=HowManyPlayers) then
              begin
                ReActivatePlayers;
                begin
                  if(ReActivatePlayers) then a:=0
                  else
                    begin
                      ProgressReport;
                      TerminateScript;
                    end;
                end;
              end;
          end;
        until(Players[CurrentPlayer].Active);
        TarCollected[CurrentPlayer]:=0;
        LoginPlayer;
        TimesSwitched:= TimesSwitched + 1;
    end;

    Function SwampCheck: Boolean;//checks if in the swamp
     begin
       begin
         if (not(FindColorTolerance(x, y, 7965518, MMX1, MMY1, MMX2, MMY2, 15)))
         and (not(FindColorTolerance(x, y, 6191915, MMX1, MMY1, MMX2, MMY2, 20)))then
           begin
             Result:= False;
           end else
             Result:= True;
        end;
     end;

    Procedure LogInIfNot;
     begin
       if(not(LoggedIn))then
         begin
           LoginPlayer;
           wait(1000 + random(100));
         end;
     end;

    Function LumbTele: Boolean;
     begin
       GameTab(7);
       wait(1000 + random(100));
       begin
         if (not(GetLumbridgeMins=0)) then
           begin
             LumbMins[CurrentPlayer]:= GetLumbridgeMins;
             Result:=False;
           end
         else
           Result:=True;
       end;
     end;
    Function WalkToSwamp: Boolean;
     begin
       RadialWalk( 608291, 176, 208, 67, 2, 2);
       wait(500 + random(50));
       Flag;
       FindColorTolerance(x, y, 8097105, MMX1, MMY1, MMX2, MMY2, 10);
       wait(100 + random(50));
       Mouse(x, y, 5, 5, True);
       i:=0;
       wait(5000 + random(500));
       repeat
         begin
           Wait(1000 +random(50));
           i:=i +1;
         end;
       until(FlagPresent)or(i=5);
       wait(100 + random(25));
       Flag;
       RadialWalk(6059563 , 166, 210, 54, 2, 2);
       Wait(500 + random(100));
       Flag;
       begin
         if(SwampCheck) then
           begin
             Writeln('Walked to Swamp Succesfully');
             WalkBacks:=WalkBacks +1;
             Result:=True
         end else
           begin
             Writeln('Didnt Walk to Swamp succesfully');
             Result:=False;
           end;
       end;
    end;

    Function PickUpTar: Boolean;
     begin
       begin         //the below finds the item dot on the minimap
         If(not(FindColorTolerance(x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10))) Then
         begin
           result:= False;
           Exit;
         end;
       end;
       Mouse(x, y, 5, 5, True);
       Wait(500);                     //now it walks to the item
       Flag;                          //and finds the swamp tar
       begin
         if FindObjCustom(x, y, ['ake', 'wamp', 'tar'], [3552827, 2434343, 3289655], 10) then
          begin
            case Random(3) of
              0: Mouse(x, y, 5, 5, True);
              1: Mouse(x, y, 5, 5, True);
              2: begin
                   Mouse(x, y, 10, 10, False);
                   ChooseOption('ake');
                 end;
          end;
            TarCollected[CurrentPlayer] := TarCollected[CurrentPlayer] +1;
            TTarCollected := TTarCollected + 1;
            Result:=True;
          end else
            Result:=False;
          end;
     end;
    Procedure IDontAuto;
     begin
       wait(1000 + random(500));
       begin
         case Random(100) of
           1: AlmostLogout;
           7: PickUpMouse;
           17: RandomRClick;
           27: PickUpMouse
         end;
       end;
       Person := BitmapFromString(6, 6, 'beNpjYICAf2DAwIDCBYI3b94g' +
            'iwC5ly5dgqlifPTo0dGjR4EMBgRgROUiAQBy9SHO');
       if(FindBitmapsProgressiveTol(x, y, [Person], 10, 1, MMX1, MMY1, MMX2, MMY2))then
         begin
           FreeBitmap(Person);
           wait(1000 + Random(500));
           case Random(50) of
             1: TypeSend('I heard this is a good way to make mony');
             2: Typesend('Sry if i dont respond, I am doing hw :p');
             7: Typesend('Im bored...');
             5: Typesend('These sell for like 300-400gp on da forums right?');
           end;
         end;
        FreeBitmap(Person);
     end;

    function FindFastRandoms: Boolean; //By WT-Fakawi. I edited some things to make it work for me :p
    var
      i: Integer;
    begin
      for i := 1 to 8 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          7: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                NextPlayerCycle;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
    end;

    begin
      ClearDebug;
      SetupSrl;
      ActivateClient;
      DeclarePlayers;
      LogInIfNot;
      TarCollected[CurrentPlayer]:=0;
      TimesSwitched:=0;
      WalkBacks:=0;
      Strikes:=0;
      TTarCollected:=0;
      MaybeStrike:=False;
      repeat
        SwampCheck;
        IDontAuto;
        begin
          if(FindFastRandoms) then
          Continue;
        end;
        FindNormalRandoms;
        begin
          If(not(SwampCheck))then
            begin
              LumbTele;
              begin
                If(not(LumbTele))then
                  Writeln('Player was not in swamp and was not able to tele to Lumbridge, Next Player...');
                  NextPlayerCycle;
                  Continue;
              end;
              begin
                FindFastRandoms;
                FindNormalRandoms;
                if(WalkToSwamp) then
                  writeln('Picking up tar')
                else
                  NextPlayerCycle;
                  Continue;
            end;
        end;
        begin
          wait(1000 + random(200));
          begin
            if(FindFastRandoms) then
              Continue;
          end;
          FindNormalRandoms;
          if(not(PickUpTar))then
            begin
              if(MaybeStrike=True) then
                begin
                  MaybeStrike:=False;
                  Strikes:=Strikes +1;
                  if(Strikes=3) then
                    begin
                      if(LumbTele) then
                        begin
                          if(WalkToSwamp) then
                            begin
                              Strikes:=0;
                              Continue;
                          end else
                            begin
                              NextPlayerCycle;
                              Strikes:=0;
                              Continue;
                            end;
                      end else
                        begin
                          NextPlayerCycle;
                          Strikes:=0;
                          Continue;
                        end;
                    end;
                end;
            end;
            begin
              if(not(FindColorTolerance( x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10))) Then
                begin
                  if(SwampCheck) Then
                    begin
                      i:=0;
                      repeat
                        wait(1000);//Wait for a swamp tar to respawn
                        i:=i+1;
                        begin
                          begin
                            if(FindFastRandoms) then
                              Continue;
                          end;
                          FindNormalRandoms;
                          case Random(30) of//antiban for when waiting
                            1: RandomRClick;
                            7: PickUpMouse;
                            10: BoredHuman;
                            17: AlmostLogout;
                          end;
                        end;
                      until(FindColorTolerance(x, y, 2105598, MMX1, MMY1, MMX2, MMY2, 10)) or (i=15);
                      begin
                        if(i=15) and (Players[CurrentPlayer].Booleans[2] = True) then //if it waited for 15 seconds without a respawn, reset the place in the swamp
                          begin
                            If(LumbTele) then
                              begin
                                If(WalkToSwamp) then
                                  begin
                                    Continue;
                                end else
                                  begin
                                    NextPlayerCycle;
                                    Continue;
                                  end;
                            end else
                              begin
                                NextPlayerCycle;
                                Continue;
                            end;
                        end else
                          begin
                            if(i=15) then
                              begin
                                NextPlayerCycle;
                                Continue;
                            end else
                              begin
                                MaybeStrike:=True;
                                Continue;
                              end;
                          end;
                      end;
                    end;
                end;
            end;
        end;
      end;
      until(isfkeydown(12))//not only way it stops, see Function NextPlayerCycle
      writeln('User Stopped Script');
      ProgressReport;
    end.
    :-)

  4. #4
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk, must have forgot one or two, thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  2. FindFastRandoms Help
    By uncfan1119 in forum OSR Help
    Replies: 3
    Last Post: 11-18-2007, 04:23 PM
  3. FindFastRandoms Causing runtime error
    By SirPa in forum OSR Help
    Replies: 2
    Last Post: 08-04-2007, 08:58 AM
  4. Error: Cannot Fix Script - Error Overgrowth - Begin Headdesking
    By PhantasmalScripter in forum OSR Help
    Replies: 6
    Last Post: 12-23-2006, 12:50 AM

Posting Permissions

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