Results 1 to 5 of 5

Thread: [Runtime Error] : Exception: Access violation at address 00726778 in module 'scar.exe

  1. #1
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Runtime Error] : Exception: Access violation at address 00726778 in module 'scar.exe

    Umm, I got that when I was running my willow Abuser,
    SCAR Code:
    program Willow_Chopper;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}

      var
      frmDesign : TForm;
      Username : TEdit;
      Password : TEdit;
      SmartWorld : TEdit;
      TreeBaseColor : TEdit;
      Start : TButton;
      Loads : TEdit;
      x , y , cx , cy , i , TreesChopped , loadsdone : Integer;
      loadz : string;
      RuneAxe, MiniMapWillow,TreeBaseColors : Integer;

    const
    ///Set up your colors below///
    WillowColor1 = 3238237;

    CurrentVersion  =  '2.0';// no need to change this.

    yourSRLID='4480';

    yourSRLPW='joejoe';

    WillowColor2 = 1915188;

    BoothColor1 = 805217;//You have to set these colors If it cannot find the bank booth

    BoothColor2 = 2709872;

    SmartWorldNumber = 125;

    Procedure LoadBitmaps;
    begin
      RuneAxe := BitmapFromString(26, 29, 'beNq9lU1LAlEUhr27yEZthNr6E' +
         '6JdRUWJhJiGWUyYfQzpwJAVFhItWggtWgRBi6B/2yNnSjM/bt5Ll7NQvD7zvu' +
         'e+504s9r9L9ZUp6mo/8XCcfAndj7v0T/IUT1G3h4nH05TQikEr7zez1YvNgxN' +
         'qyzun+KoNVO2jZMdPvTbd8uV9oX5DAaR2zsJcLQAVLjpsW8pkJqLCPQebT/V5' +
         'aAiDwN8pOIJCmz4NYdh8Dro08bherq6VPCBT0BCGTZo20HaYgtKmqcaugzCxK' +
         'ful+LxSqAiqseBQApyYjW9hX5zer8jjWIU2bMMQm/3Cfm8Qmg7Kz88hjP6/Xb' +
         'uj26I0UFE2EDbCZm9poKIRkGDonf44lLcdl2l6b6XNaWRjIBiG9wbCxvZfF1V' +
         'anWWgbAmr5eJkw4awKBucppX+Z5dnyIYtm2SDgbIhLBoosiGvAHOaZMOKzcpG' +
         'Nxu2TlOaZssmTWM8bdj8032lu0xRnzKQjKw=');

           Minimapwillow := BitmapFromString(9, 11, 'beNpjYCASyEfIQxCy' +
         'oISTDBABBfXTVIFIN0QBWRyIgCIQKQgiUsrCRgSCgGqAXIgUxGQzHTEgwupC8' +
         'qSIBQCNIhaH');



    end;


    procedure GetAxe;
     var
      Coordinate : Tpoint;
     begin
         If (Not(FindAxe)) Then
         begin
         if FindObjCustom(coordinate.x, coordinate.y, ['booth', 'ooth'], [BoothColor1, BoothColor2], 3) then
          begin
          repeat
          Status('Banking');
          Mouse(coordinate.x,coordinate.y,2,2,false)
          chooseoption('Use-quickly')
          wait(1000)
          until(bankscreen)
          end;
     fixbank;
     WithDraw(1,1,1)
     CloseBank;
      //The Below procedure is mine. I am not using it because it was giving me errors.
      {if FindBitmapToleranceIn(RuneAxe, x, y,4, 6, 464, 297, 255) then
       begin
       Mouse(x,y,2,2,true);
       writeln('We have found the axe, unbanking it now.')
      end else
       begin
       Writeln('We could not find the axe, logging out now.')
       logout;}

       
       end;
      end;

    {*******************************************************************************
    procedure Withdraw(Col, Row, Amount: Integer);
    by: Odie5533/Stupid3ooo/Starblaster100 fix by Town
    Description: Withdraws Amount at Column/Row.
    *******************************************************************************}


    {procedure Withdraw(col, row, Amount: Integer);

    Var
      BBox: TBox;

    begin
      BBox := BankIndexToMSBox(BankPointToIndex(Point(Col, Row)));
      If Amount = 1 Then
      Begin
        MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
        Wait(RandomRange(50, 150));
      End
      Else
      Begin
        MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
        if (Amount = 5) or (Amount = 10) then
          ChooseOption('Withdraw ' +IntToStr(Amount))
        else if Amount = 0 then
          ChooseOption('Withdraw All')
        else
        begin
          ChooseOption('Withdraw X');
          Wait(1000 + Random(100));
          TypeSend(IntToStr(Amount) + Chr(13));
        end;
      End;
    end;  }




    Procedure SetupFormz(sender: tobject);
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := Username.text;
      Players[0].Pass := Password.text;
      Players[0].Nick := 'ndwi';
      Players[0].Active :=True;
      Loads.text := loadz;
      FrmDesign.ModalResult := Mrok;

    end;

    Procedure InitForm;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 656;
    frmDesign.Top := 223;
    frmDesign.Width := 220;
    frmDesign.Height := 248;
    frmDesign.Caption := 'Willow Chopper';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -14;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := False;
    frmDesign.PixelsPerInch := 120;
    Username := TEdit.Create(frmDesign);
    Username.Parent := frmDesign;
    Username.Left := 8;
    Username.Top := 8;
    Username.Width := 113;
    Username.Height := 24;
    Username.TabOrder := 8;
    Username.Text := 'Username';
    Password := TEdit.Create(frmDesign);
    Password.Parent := frmDesign;
    Password.Left := 8;
    Password.Top := 48;
    Password.Width := 113;
    Password.Height := 24;
    Password.TabOrder := 9;
    Password.Text := 'Password';
    Start := TButton.Create(frmDesign);
    Start.Parent := frmDesign;
    Start.Left := 8;
    Start.Top := 168;
    Start.Width := 97;
    Start.Height := 25;
    Start.Caption := 'Start';
    Start.TabOrder := 12;
    Start.OnClick := @SetupFormz;
    Loads := TEdit.Create(frmDesign);
    Loads.Parent := frmDesign;
    Loads.Left := 120;
    Loads.Top := 48;
    Loads.Width := 89;
    Loads.Height := 24;
    Loads.TabOrder := 13;
    Loads.Text := 'Loads';
    end;

    Procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    Procedure ShowFormModal;
    begin
      frmDesign.ShowModal;
    end;

    Procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;





    {****************************************************************************}
    {Procedure BankWalk                                                          }
    {By: Wade007                                                                 }
    {Description: This will walk to to the bank                                  }
    {****************************************************************************}


    Procedure BankWalk;
      var
     Banks: Tpoint;
     begin
      if(FindSymbol(Banks.x,Banks.y,'bank'))then
      SymbolAccuracy := 0.2;
       begin
       writeln('Walking To bank!')
       Mouse(Banks.x,Banks.y,2,2,true)
       flag;
       FindNormalRandoms;
      end;
    end;
    {****************************************************************************
    Procedure WillowWalk
    By: Wade007
    Description: This will walk you to willows.
    {****************************************************************************}


    Procedure WillowWalk;
      var
      Fish : Tpoint;
     begin
      TreeBaseColors := AutoColorThis(MiniMapWillow,255,MMX1,MMY1,MMX2,MMY2)
      RadialWalk(TreeBaseColors,150,270,50,5,5)
      flag;
      if(FindSymbol(Fish.x,Fish.y,'Fish'))then
      SymbolAccuracy := 0.2;
       begin
       writeln('Walking To Willows!')
       Mouse(Fish.x,Fish.y,2,2,true)
       flag;
       FindNormalRandoms;
      end;
      {If(Not(LoggedIn)) then LoginPlayer;
      setangle(true);
      RadialWalk(TreeBaseColor1,180,270,50,5,5)
      Status('Walking to willows')
      writeln('Walking to willows')}


     end;
    {*****************************************************************************
    function InFight: Boolean;
    By: WT-Fakawi
    Description: Returns as True if in fight.
    *****************************************************************************}


    function InFight: Boolean;
    var
      x, y : Integer;
    begin
      Result := (FindColor(x, y, 65280, 230, 130, 280, 180) or FindColor(x, y, 255,
        230, 130, 280, 180))
    end;
    {****************************************************************************
    Procedure Depositing
    By: the find and open bank part is by Wade007 and the deposit part is by frozen_soul
    Description: This will deposit your logs.
    *****************************************************************************}



    procedure Depositing;
      begin
        if FindObjCustom(cx, cy, ['booth', 'ooth'], [BoothColor1, BoothColor2], 3) then
          begin
          repeat
          Status('Banking');
          Mouse(cx,cy,2,2,false)
          chooseoption('Use-quickly')
          wait(1000)
           until(bankscreen)
             Begin
               for i := 2 to 28 do
                Begin
                 if ExistsItem(i) then
                  Begin
                   MouseItem(i, false);
                   ChooseOption('ll');
                   Wait(1000 + random(500));
                  end;
                end;
            Mouse(485, 41, 4, 4, True);
            Wait(500 + random(250));
      end;
           {case random(2) of       //Use this if the banking doesn't work.
              1: Deposit(2, 28, 2)
              2: Deposit(2, 28, 2)
              end;}

          closebank;
          FindNormalRandoms;
          loadsdone := loadsdone+1
          WillowWalk;
      end;
    end;

    {****************************************************************************
    Procedure: ChopDemWillows
    By: Wade007
    Description: This Chops trees (DUH!)
    *****************************************************************************}



    Procedure ChopDemWillows;
     var tries:Integer;
     Coord :Tpoint;
     Begin
     SetAngle(True)
     
       if FindObjCustom(coord.x, coord.y, ['Willow', 'llow'], [WillowColor1, WillowColor2], 3) then
         begin
         Status('Chopping Willows');
         if(FindEnt(coord.x, coord.y, True))then exit;
         {Mouse(cx,cy,2,2,False)
         ChooseOption('hop')
         flag;}

                case random(2) of
              0: begin
               mouse(coord.x,coord.y,2,2,false);
              chooseoption('hop');
              flag;
              end;
              1: begin
               Mouse(coord.x,coord.y,2,2,true)
              end;
           end;
         Wait(+random(800))
         TreesChopped := TreesChopped+1
         FindNormalRandoms;
     end else
      begin
        tries := tries+1;
        if (tries = 30)then
         begin
          Writeln('Could not find any trees :(')
          Writeln('Try changing the colors.')
         {NextPlayer(false);}
       end;
      end;
    end;

    procedure Ent_phrases;
    begin
      case random(18) of
        0: Typesend('arg! stupied ent!');
        1: Typesend('lol, lil nub ent');
        2: Typesend('hahaha funny lil ent');
        3: Typesend('tree got mad, hahaha');
        4: Typesend('ents are funny');
        5: Typesend('O M G, stupied ent');
        6: Typesend('ffs dumb ent');
        7: Typesend('rofl ent got mad');
        8: Typesend('lamo, ent gone crazzy');
        9: Typesend('huhh.....');
        10: Typesend('ents are pointless to rs');
        11: Typesend('Why did jagex make ents?');
        12: Typesend('huh....ents are so useless');
        13: Typesend('hahaha, stupied lil ent');
        14: Typesend('oooo, an ent!');
        15: Typesend('aarrgg, dumb ent');
        16: Typesend('E N T !');
        17: Typesend('ffs, an ent');
      end;
    end;

    // Actual ent FINDING by Sumilion - from Woodcutting.scar
    // Everything else edited by Osmm
    function FFindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
    var
      arUpTextEntColorPoints: TPointArray;
      x, y, EntTime, tcts: Integer;
    begin
      if not(LoggedIn)then exit;
      GetMousePos(x, y);
      if(x <> fx)or(y <> fy)then
      mmouse(fx, fy, 0, 0);
      if(IsUpText('Chop'))then
      begin
        tcts := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorspeed2Modifiers(0.4, 0.4);
        FindColorsTolerance(arUpTextEntColorPoints, 51657, 80, 6, 127, 20, 5);
        Result := Length(arUpTextEntColorPoints) > 10;
        ColorToleranceSpeed(tcts);
      end;
      if(result)then
        begin
          MarkTime(EntTime);
          WriteLn('Ent Found!!');
          Writeln('Waiting for it to go away.');
          begin
            case random(2) of
              0: begin
                   mouse(627, 86, 5, 5, true);
                   mouse(627, 86, 10, 10, true);
                   Ent_phrases;
                   wait(750 + random(750));
                   GameTab(4);
                   wait(750 + random(750));
                   FindNormalRandoms;
                 end;
              1: begin
                   DoEmote(4);
                   wait(750 + random(750));
                   Ent_phrases;
                   wait(750 + random(750));
                   Hoverskill('woodcutting', false);
                   wait(750 + random(750));
                 end;
            end;
          end;
          begin
          if (TimeFromMark(EntTime) < 35000) then
            case random(2) of
              0: begin
                   if Random(10) > 8 then
                   Hoverskill('woodcutting', false);
                 end;
            end;
          end;
          Inc(EntsAvoided);
        end;
    end;

    {****************************************************************************
    Procedure Proggy
    By: Wade007
    Description: This will print a proggy to the debug box.
    *****************************************************************************}


    Procedure Proggy;
    begin
      Writeln('Thank you for using')
      Writeln('             |\     /|(  ___  )(  __  \ (  ____ \(  __   )(  __   )/ ___  \ ')
      Writeln('             | )   ( || (   ) || (  \  )| (    \/| (  )  || (  )  |\/   )  )')
      Writeln('             | | _ | || (___) || |   ) || (__    | | /   || | /   |    /  / ')
      Writeln('             | |( )| ||  ___  || |   | ||  __)   | (/ /) || (/ /) |   /  / ')
      Writeln('             | || || || (   ) || |   ) || (      |   / | ||   / | |  /  /   ')
      Writeln('             | () () || )   ( || (__/  )| (____/\|  (__) ||  (__) | /  /')
      Writeln('             (_______)|/     \|(______/ (_______/(_______)(_______) \_/      ''s Willow chopper')
      Writeln('Willow Chopper by wade007 has run for ' +TimeRunning)
      Writeln('Willow Chopper has Chopped ' +intToStr(TreesChopped)+ ' Trees')
      Writeln('We have done'+inttostr(loadsdone)+'loads')
    end;


    Procedure BrokenAxe;
    begin
        If (Inchat('axe') or Inchat('broken')) then
        begin
        BankWalk;
        if FindObjCustom(cx, cy, ['booth', 'ooth'], [BoothColor1, BoothColor2], 3) then
          begin
          repeat
          Status('Banking');
          Mouse(cx,cy,2,2,false)
          chooseoption('Use-quickly')
          wait(1000)
           until(bankscreen)
             Begin
               for i := 1 to 28 do
                Begin
                 if ExistsItem(i) then
                  Begin
                   MouseItem(i, false);
                   ChooseOption('ll');
                   Wait(1000 + random(500));
                  end;
                end;
               end;
             end;

          WillowWalk;
        end;
    end;



    {****************************************************************************
    Procedure: Running
    By: Wade007
    Description: This TINY procedure will run away if it is in a fight.
    *****************************************************************************}


    Procedure Running;
    begin
      If (InFight) then
        begin
        Writeln('We have found a fight! Running away!')
        Status('Running');
        BankWalk;
        wait(2000)
        WillowWalk;
        end else
         begin
         Exit;
         end;
       end;




    {****************************************************************************
    Procedure: SetUp
    By: Wade007
    Description: this will run when it is start up....
    *****************************************************************************}



    procedure SetUp;
    begin
      If(Not(LoggedIn)) then LoginPlayer;
      If (FindAxe) then
       begin
       Writeln('I have found your axe, continuing.')
       end else
        begin
        GetAxe;
        end;
      ScriptID := '651';
      if not(yourSRLID = '') then SRLID := yourSRLID;
      if not(yourSRLPW = '') then SRLPassword := yourSRLPW;
      ReportVars[1] := Treeschopped;
      ReportVars[2] := LoadsDone;
      SRLRandomsReport;
      If (GetPage('http://wade007.freehostia.com/Version.txt')) > '2.0' then
      begin
        Writeln('Hmm... Your version is not up to date. please get the new update from the topic.')
        Writeln('I hope to have a direct download link for this in the near future.')
        logout;
      end else
       begin
         writeln('You have the latest version, Continueing.')
       end;
    end;


    Procedure Randoms;
    begin
    SolvePinball;
    FindTalk;
    SolveSandWich
    end;


    {****************************************************************************
    MAIN LOOP
    Description: This is where it all begins...
    *****************************************************************************}



    begin
      SmartSetupEx((SmartWorldNumber),false,false);
        SetTargetDC(SmartGetDC);
       SetupSRL;
      SafeInitForm;
      SafeShowFormModal;
     SetUp;
      repeat
      If (not (loggedIn)) then loginplayer;
      WillowWalk;
      FindNormalRandoms;
       repeat
       ChopDemWillows;
      { Randoms;  }
       Running;
       FindNormalRandoms;
       Until(InvFull);
      Running;
      bankWalk;
      wait(100)
      depositing;
      SetUp;
      ClearDebug;
      Proggy;
      i := +1
     until(inttostr(loadsdone) = loadz)
      ClearDebug;
      Proggy;
     end.
    Any ideas? I assume it got that when it was trying to autocolor the tree...(DUH)

  2. #2
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Have you loaded all the bitmaps, DTMs, etc. you're trying to use?

  3. #3
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think so, I will check

    EDIT: I forgot to put it in the main loop, Thanks!

  4. #4
    Join Date
    Jun 2007
    Location
    ENGLAND
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Double check everything is where it should be e.g. Procedures, Var, and Const you could even check your MainLoop for issues.

  5. #5
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    exppo, READ THE TOPIC. i fixed it already!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-19-2008, 04:20 PM
  2. Replies: 2
    Last Post: 12-31-2007, 09:41 AM
  3. Replies: 8
    Last Post: 12-23-2007, 11:11 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
  •