Results 1 to 9 of 9

Thread: AntiRandoms.scar

  1. #1
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default AntiRandoms.scar

    When I play my script it plays for any amount of time then I get an error in my antirandoms.scar .
    SCAR Code:
    [Runtime Error] : Exception: Access violation at address 006D4E35 in module 'scar.exe'. Read of address 00000030 in line 239 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
    which is this in antirandoms:
    SCAR Code:
    if (FindBitmapToleranceIn(Lamp, x, y, MIX1, MIY1, MIX2, MIY2, 40)) then
    And when I get this error, I dont have a lamp either?

  2. #2
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    can you post or attach the script you're using? it probably doesn't have to do with antirandoms.scar because I don't have a problem with mine. Is this a script you made or downloaded of the site? just curious

  3. #3
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    can you post or attach the script you're using? it probably doesn't have to do with antirandoms.scar because I don't have a problem with mine. Is this a script you made or downloaded of the site? just curious
    I made it, but I only has this problem starting yestarday, and it happens at random times, like after 1 minutes, or 1 hour.

    SCAR Code:
    {====================================================}
    {          Willow Chopper Plus Made By D1ZL3         }
    {                     Version 2.50                   }
    {          Start Either At The Trees Or In Bank      }
    {                Credits To Srl-Forums,              }
    {        Mormonman/006786 For Thourough Testing,     }
    {              And Blumblebee For Almost             }
    {              Everything In This Script             }
    {====================================================}


    program WillowChopperPlus;

    {.Include SRL\SRL.SCAR}
    {.include srl/srl/misc/Users.scar}
    {.include SRL/SRL/skill/WoodCutting.scar}

    var
      X, Y, D, AntiRandomz, TotalLogs, AntiBanz, Loads, Runz: Integer;
      BankLog, LogDTM, LogsCut, LogsChopped, ExperienceGained: Integer;

    {========================}
    {Enter Your SRL Stat Info}
    {========================}
    const
      YourSRLID = ''; //Your SRL ID, 4 digits long.
      YourSRLPW = ''; //Your Srl Password
      VersionNumber = '2.50'; //Leave Alone :)
    {=======================}
    {No more Editting Needed}
    {=======================}
    procedure LogCount;
    begin
      if not LoggedIn then Exit;
      LogDTM := DTMFromString('78DA639CCEC4C0C0C9C80002AC0C10E06A27C' +
           '12002A441A2FF8180B18F09CA43068C4824909E0354F39701BF9A' +
           '8540350204CC990854234A404D3B500D2F01354B816AB8F0AB010' +
           '0353C0A3A');
      LogsCut := ItemAmount('inv', 'dtm', LogDTM, []);
      TotalLogs:= (TotalLogs + LogsCut);
      LogsChopped := TotalLogs+1;
      Reportvars[0] := TotalLogs+1;
      ExperienceGained := TotalLogs*65;
      Reportvars[1] := TotalLogs*65;
      Loads := Runz;
      FreeDTM(LogDTM);
    end;

    procedure Report;
    begin
      ClearDebug;
      WriteLn('=====================================================================');
      WriteLn(Padr('|| Logs Chopped: ' + IntToStr(TotalLogs), 67) + '||');
      WriteLn(Padr('|| Experience Gained: ' + IntToStr(TotalLogs*65), 67) + '||');
      WriteLn(Padr('|| Loads Done: ' + IntToStr(Runz), 67) + '||');
      WriteLn(Padr('|| AntiBan: ' + IntToStr(AntiBanz), 67) + '||');
      WriteLn(Padr('|| AntiRandoms: ' + IntToStr(AntiRandomz), 67) + '||');
      WriteLn(Padr('|| Ran For: ' + TimeRunning, 67) + '||');
      WriteLn('=====================================================================');
      WriteLn('Thanks For Using This Script, Please Post This In The Proper Thread !');
      WriteLn('=====================================================================');
      SRLRandomsReport;
    end;

    procedure AntiRandoms;
    begin
      FindTalk;
      FindNormalRandoms;
      FindNonInventoryRandoms;
      FindLamp('woodcutting');
      if FindFight then
      begin
        RunAway('e', True, 1, 5000);
        Wait(10000+random(2000));
        Inc(AntiRandomz);
      end;
    end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then Exit;
      keydown(VK_DOWN);
      wait(200+random(125)+random(138));
      keyup(VK_DOWN);
      wait(random(232));
      case random(4) of
      0: PickUpMouse;
      1: RandomMovement;
      2: RandomRClick;
      3: BoredHuman;
      end;
    end;

    procedure FastAntiBan;
    begin
      if(not(LoggedIn))then Exit;
      case random(12) of
      0: PickUpMouse;
      1: RandomMovement;
      2: RandomRClick;
      3: BoredHuman;
      4: MakeCompass('n');
      5: MakeCompass('s');
      6: MakeCompass('e');
      end;
      begin
        MakeCompass('w');
      end;
    end;

    procedure Formz;
    begin
      SRLPlayerForm(True, ['Axe Weilded?'], ['Loads Per Player'], [], []);
    end;

    procedure FindSomeTalk;
    begin
      if(not(LoggedIn))then Exit;
      if(InChat('woodcutting'))or (InChat('wcing'))or (InChat('lvl'))or (InChat('level')) or (InChat('lvls?')) then
      case random(4) of
      0: TypeSend(IntToStr(GetSkillLevel(' woodcutting')));
      1: TypeSend('Only '+(IntToStr(GetSkillLevel('woodcutting'))+' ... and you?'));
      2: TypeSend('too low to say haha');
      3: TypeSend('Almost to '+(IntToStr(GetSkillLevel('woodcutting')+ 1)+' :)'));
      end;
    end;
    procedure RandomGameTab;
    begin
      if(not(LoggedIn))then Exit;
      case GameTab(Random(12)) of
      0:  begin
            if(Random(10) > 5) then
              Wait(400+Random(150));
              RandomRClick;
              Wait(100+Random(100));
          end;
      1:  begin
            if(Random(10) > 5) then
              Wait(400+Random(150));
              PickUpMouse;
              Wait(100+Random(100));
              GameTab(Random(12));
          end;
      end;
     Inc(AntiBanz);
    end;

    procedure CTPA; forward;

    procedure WalkToTrees; forward;

    procedure SetupPlayers;
    begin
      if YourSRLID = '' then
      begin
        WriteLn('Please enter your SRL ID/Password. - Create one at http://www.stats.srl-forums.com/')
        TerminateScript;
        if YourSRLPW = '' then
        begin
          WriteLn('Please enter your SRL ID/Password. - Create one at http://www.stats.srl-forums.com/')
          TerminateScript;
        end;
      end;
      ActivateClient;
      if not LoggedIn then LoginPlayer;
      MakeCompass('w');
      SetAngle(true);
      SetRun(true);
      FindAxe;
      FastAntiBan;
      WalkToTrees;
    end;

    procedure WalkToBank; forward;
    procedure ChopTrees; forward;

    procedure WalkToTrees;
    begin
      if(not(LoggedIn))then Exit;
      Wait(2000);
      SetRun(True);
      MakeCompass('w');
      Disguise('Walking To The Willows...');
      begin
        if invfull then
        MakeCompass('w');
        WalkToBank;
        Exit;
        begin
          MakeCompass('w');
          WriteLn('Couldnt Use AutoColorThis...Using WaterWalk');
          RadialWalk(FindWaterColor, 260, 350, 60, 5, 5);
          Wait(300+Random(200));
          ChopTrees;
          begin
            if not RadialWalk(FindWaterColor, 260, 350, 60, 5, 5)then
            WriteLn('Couldnt Use WaterWalk...Using Symbol');
            MakeCompass('w');
            LoadSymbolBitmapColor('fish');
            Symbolaccuracy :=5;
            wait(200+random(154));
            if FindSymbol(x,y,'fish')then
            wait(500+random(600));
            mouse(x,y,2,2,true);
            if not FindSymbol(x,y,'fish')then
            begin
              WriteLn('Couldn''t Find Fish Symbol, Logging Out...');
              TerminateScript;
            end;
          end;
        end;
      end;
    end;

    procedure DepositLogs;
    begin
      if(not(LoggedIn))then Exit;
      BankLog := DTMFromString('78DA63CC63626078C60006CC108AC1C7459A8' +
           '115483302F17F20604C01AAB9C38006189148205D0C547393809A' +
           '0AA09A3704D46402D57C20A02616A8E63901356540358FF0AB010' +
           '0245E0E0B');
      MakeCompass('n');
      OpenBank('db',false,false);
      Wait(100+Random(100));
      if (PinScreen) then
      begin
        InPin(Players[CurrentPlayer].PIN);
      end;
      if (BankScreen) then
      begin
        Disguise('Depositing Willows...');
        inc(Runz);
        Wait(500+Random(200));
        LogCount;
        Report;
        if(FindDTM(BankLog, X, Y, MIX1, MIY1, MIX2, MIY2))then
        Mouse(x, y, 5, 5, False);
        Wait(50+random(50));
        ChooseOption('-All');
        Wait(50+Random(50));
        if Players[CurrentPlayer].booleans[0] then
        Deposit(1,28, True);
        if not Players[CurrentPlayer].booleans[0] then
        Deposit(2, 28, True);
        MakeCompass('w');
        FreeDTM(BankLog);
        CloseBank;
        MakeCompass('w');
        Players[CurrentPlayer].Integers[10] := Players[CurrentPlayer].Integers[10]
          + 1;
      end;
    end;

    {============================}
    {Credits To WT-Fakawi And Ron}
    {     Some Edited By Me      }
    {============================}
    procedure DWalk(TheBank: string);
    var
      bx, by, TheDTM: Integer;
      WhichAngle: Extended;
    begin
      TheBank := LowerCase(TheBank);
      case TheBank of
        'feb': TheDTM := DTMFromString('78DA63AC67626088634001FFFFFD63F80FA41' +
            '9416C2060AC01AA4987C83141D5FCF9C3C4C0055503028CAD44A8' +
            'E924AC0600131E11B5');
        'fwb': TheDTM := DTMFromString('78DA636C676260086540038C0CFFC12403C37' +
            'F206004A98986C8304155FCF9C3C4C0055503D6D14C849A6EC26A' +
            '009F5A0EA1');
        'db': TheDTM := DTMFromString('78DA636C67626008644001FFFFFD63F80FA41' +
            '9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A204C35' +
            '22E86AC2F09B0300F8811153');
        'veb': TheDTM := DTMFromString('78DA63EC61626008624001FFFFFD63F80FA41' +
            '9416C2060EC00AA8982C83141D5FCF9C3C4C0055503028C138850' +
            'D343580D00122211A9');
        'vwb': TheDTM := DTMFromString('78DA63EC606260B066C000FF819811440301E' +
            '354A01A3B88381354FECF1F260611A81A1000AB3125428D2E7E35' +
            '0087F80E5E');
        'akb': TheDTM := DTMFromString('78DA636C606260F06140019D9D710CFF81342' +
            '310FF0702C652A01A37881C1354CD9F3F4C0C5C5035200056E345' +
            '841A3FFC6A002A3B0F97');
        else
        begin
          srl_Warn('FindBank', 'Invalid bank name', warn_Warning);
          Exit;
        end;
      end;

      if FindDtmRotated(TheDTM, bx, by, MMX1, MMY1, MMX2, MMY2, Radians(-30), Radians(30), 0.05,
            WhichAngle) then
          begin
            Mouse(bx, by+17, 2, 2, True);
            FFlag(0);
            MakeCompass('N');
            FreeDTM(TheDTM);
          end;
    end;

    Procedure WalkToBank;
    Begin
      if(not(LoggedIn))then Exit;
      begin
        if (invfull)then
        try
        begin
        DWalk('db');
        Disguise('Walking To Bank...');
        Wait(800+Random(200));
        DepositLogs;
        end;
        except
        begin
          if not FindSymbol(x, y, 'bank') then
          WriteLn('Couldn''t Find Bank, Logging Out');
          Report;
          LogOut;
          NextPlayer(True);
          if FindSymbol(x, y, 'bank') then
          Wait(200+Random(100));
          Mouse(x, y, 5, 5, True);
          Disguise('Walking To Bank...');
          WriteLn('Couldnt Properly Walk, Using Symbols');
          Wait(800+Random(200));
          DepositLogs;
        end;
        End else
          writeln(' ');
      end;
    end;

    procedure ChopTrees;
    begin
      if not FindObjTPA(x, y, 6391421, 10, 20, 10, 10, 1,['hop','illow'])then
      RadialWalk(FindWaterColor, 260, 350, 60, 5, 5);
      repeat
        repeat
        if FindObjTPA(x, y, 6391421, 10, 20, 10, 10, 1,['hop','illow'])then
        CTPA;
        FindEnt(x,y, True);
        Case random(2) of
         0 : begin
               FindEnt(x,y, True);
               if IsUpText('hop') then
               begin
                 Mouse(x, y, 2, 2, False);
                 Disguise('Chopping Willows...');
                 Wait(300 + Random(243));
                 ChooseOption('hop');
                 Wait(5000 + Random(1854));
                 RandomGameTab;
                 AntiRandoms;
                 FindEnt(x,y, True);
                 FindNormalRandoms;
                 FindBirdsNest;
                 FastAntiBan;
                 if FindObjTPA(x, y, 6391421, 10, 20, 10, 10, 1,['hop','illow'])then
                 FindEnt(x,y, True);
                 Mouse(x, y, 2, 2, True);
               end;
              end;
         1 : begin
               FindEnt(x,y, True);
               if IsUpText('hop') then
               begin
                 Mouse(x, y, 2, 2, True);
                 Disguise('Chopping Willows...');
                 Wait(300 + Random(243));
                 ChooseOption('hop');
                 RandomGameTab;
                 AntiRandoms;
                 FindNormalRandoms;
                 FindBirdsNest;
                 Wait(5000 + Random(1976));
               end;
             end;
          end;
       until invfull;
       until(Players[CurrentPlayer].Integers[0] >= Players[CurrentPlayer].Integers[0]);
       SetupPlayers;
    end;

    procedure CTPA;
    var
      D1TPA : TPointArray;
      D1Point : TPoint;

    begin
      FindColorsTolerance(D1TPA, 6391421, MSx1, MSy1, MSx2, MSy2, 5);
      if Length(D1TPA) = 0 then FindColorsTolerance(D1TPA, 6391421, MSX1, MSY1, MSX2, MSY2, 5);
      for d := 1 to Low(D1TPA)do
      begin
        D1Point := D1TPA[d]
        MMouse (D1Point.x, D1Point.y, 1, 1);
        if (IsUpTextMultiCustom(['hop', 'illow'])) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 3, 3, True);
          Wait(5500+random(250));
        end;
      Wait(5500+random(350));
      end;
    end;

    procedure MainLoop;
    begin
      repeat
        repeat
          WalkToTrees;
          FindSomeTalk;
          ChopTrees;
          FindSomeTalk;
          WalkToBank;
          LogCount;
          Report;
          DepositLogs;
        until (Players[CurrentPlayer].Integers[10] >= Players[CurrentPlayer].Integers[0])
        begin
          NextPlayer(True);
          SetupPlayers;
        end;
        If AllPlayersInactive then Break;
      until(AllPlayersInactive);
      Report;
      WriteLn('All Players Inactive');
    end;

    begin
      SetUpSRL;
      ScriptID := '1097';
      SRLID := YourSRLID;
      SRLPassword := YourSRLPW;
      Formz;
      SymbolAccuracy := 0.45;
      SetupPlayers;
      repeat
      MainLoop;
      until(false);
      SendSRLReport;
    end.

  4. #4
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    Sorry, I don't know what could be causing that. You're up to date with your Rev? you have 28? The only thing I could think of to stop that error is to take out FindLamp('woodcutting'); but that might make your script not solve the lamp random, but I don't know, it might still get solved, because I see lots of good scripts with out FindLamp even in the script, like Wizzup?'s essence miner for example. Sorry I couldn't help tell you why exactly you're getting the error, maybe a member or someone can help.

  5. #5
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    Sorry, I don't know what could be causing that. You're up to date with your Rev? you have 28? The only thing I could think of to stop that error is to take out FindLamp('woodcutting'); but that might make your script not solve the lamp random, but I don't know, it might still get solved, because I see lots of good scripts with out FindLamp even in the script, like Wizzup?'s essence miner for example. Sorry I couldn't help tell you why exactly you're getting the error, maybe a member or someone can help.
    its no problem i repped you anyways. Yeah it might still work without findlamp, I'll give it a try, and thanks for all the help.

  6. #6
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    no problem I just wish I could've helped more, tell me if taking out FindLamp fixes the problem and if the script still works without it(I don't see why it wouldn't), and thanks for rep, wasn't needed but thanks anyway =).

  7. #7
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    no problem I just wish I could've helped more, tell me if taking out FindLamp fixes the problem and if the script still works without it(I don't see why it wouldn't), and thanks for rep, wasn't needed but thanks anyway =).
    I took it out and Im still getting the problem.

  8. #8
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    is your srl rev up to date? if so I have no clue what's wrong.

    EDIT: I was looking in Antirandoms.scar and I saw that you don't need to put in FindLamp, it's already in FindNormalRandom; but I haven't found an answer yet, I'll try to keep looking, I don't get what it could be yet though.

  9. #9
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    is your srl rev up to date? if so I have no clue what's wrong.
    Yup its up to date. It still didnt work because FindNormalRandoms; aalready has findlamp in it.

    Edit: I got it fixed. The reason was because I accidentally tried finding randoms twice and I guess that screwed it up

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. out of range in AntiRandoms.scar HuH?
    By kor in forum OSR Help
    Replies: 5
    Last Post: 05-21-2008, 11:24 AM
  2. Problem with antirandoms.scar
    By orion pax in forum OSR Help
    Replies: 0
    Last Post: 10-25-2007, 06:03 PM
  3. AntiRandoms.scar
    By Floor66 in forum OSR Help
    Replies: 19
    Last Post: 10-24-2007, 05:31 PM

Posting Permissions

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