Results 1 to 2 of 2

Thread: Need help with antirandoms

  1. #1
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with antirandoms

    SCAR Code:
    program WoodWhacker;
    {.include srl/srl.scar}

    // This is my first script
    // Woodwhacker by Jahuro
    // V1.1

    var
      WoodLoads,i: Integer;
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then // Call it twice
              Result := True;
          11: if FindLamp(LampSkill) then // Maybe we missed it?
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;
          13: if FindTrade then
              Result := True;
          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          15: SaveToChatLog;
          16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;


    Const
    Color = 3162200;
    TreeName = 'Tree';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : ' + ScriptTime2(2))'------------[]');
      Writeln('Cut'+ IntToStr(WoodLoads) + ' Loads --[]');
      Writeln('[]-------------------------------------------[]');
    end;

    procedure Antiran;
    begin
      while(Chopping)do
      begin
        Wait(200);
        FindNormalRandoms;
      end;
    end;

    procedure ClickTree;
        begin
        repeat
        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));
        if(IsUpText('Chop down '+TreeName))
        then
        Mouse(x,y,0,0,true);
        wait(2000+random(50));
        until(InvFull);
        end;

        procedure Drop;
        begin
        DropAll;
        FindNormalRandoms;
        WoodLoads := WoodLoads + 1;
        end;

    begin
    setupsrl;
    DeclarePlayers;
    repeat
    ClickTree;
    Drop;
    Report;
    until false;
    end.

    It wont compile. And im pretty sure i dint setup the antirandoms right
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  2. #2
    Join Date
    Sep 2006
    Location
    In Finland
    Posts
    124
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have commented those lines that ive fixed...

    SCAR Code:
    program WoodWhacker;
    {.include srl/srl.scar}

    // This is my first script
    // Woodwhacker by Jahuro
    // V1.1

    {------------------------------------------------}
    {  __         __       _________       ________  }
    { |  \       /  |     /  _____  \     |  ____  \ }
    { |   \     /   |     | |     | |     | |____| | }
    { | |\ \   / /| |     | |     | |     |  ______/ }
    { | | \ \_/ / | |     | |     | |     |  ____  \ }
    { | |  \   /  | |     | |     | |     | |    | | }
    { | |   \_/   | |  _  | |_____| |  _  | |____| | }
    { |_|         |_| |_| \_________/ |_| |________/ }
    {------------------------------------------------}
    {    NOW IT COMPILES...KEEP UP THE GOOD WORK     }
    {------------------------------------------------}

    Const
    Color = 3162200;
    TreeName = 'Tree';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

    var WoodLoads,i: Integer;

    Function FindFastRandoms:Boolean;   // YOU FORGOT THE FUNCTION...
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then // Call it twice
              Result := True;
          11: if FindLamp(LampSkill) then // Maybe we missed it?
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;
          13: if FindTrade then
              Result := True;
          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          15: SaveToChatLog;
          16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;

    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : '+ScriptTime2(2));         // I DONT REMEMBER WHAT I FIXED HERE BUT NOW IT COMPILES
      Writeln('Cut'+ IntToStr(WoodLoads) + ' Loads');
      Writeln('[]-------------------------------------------[]');
    end;

    procedure ClickTree;
        begin
        repeat
        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));
        if(IsUpText('hop down '+TreeName))
        then
        Mouse(x,y,0,0,true);
        wait(2000+random(50));
        until(InvFull);
        end;

        procedure Drop;
        begin
        DropAll;
        FindNormalRandoms;
        FindFastRandoms;
        WoodLoads := WoodLoads + 1;
        end;

    begin
    setupsrl;
    DeclarePlayers;
    AntiBan;
    repeat
    ClickTree;
    Drop;
    Report;
    until false;
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SRL and Antirandoms.
    By Wizzup? in forum News and General
    Replies: 138
    Last Post: 06-01-2008, 01:24 AM
  2. Antirandoms
    By Adamb_135 in forum OSR Help
    Replies: 1
    Last Post: 04-24-2007, 11:58 PM
  3. AntiRandoms
    By antibinki in forum OSR Help
    Replies: 3
    Last Post: 04-02-2007, 01:58 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
  •