Results 1 to 3 of 3

Thread: Problems With My Woodcutting Script.

  1. #1
    Join Date
    Jun 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Problems With My Woodcutting Script.

    Below is my woodcutting script, it worked perfectly up until I made some changes, now it logs in and does nothing and I have no idea what is wrong with it. Can anyone help?


    Code:
    //---------------------------------------------------------//
    //                      In_Jeopardy's                      //
    //                    Normal Log Cutter                    //
    //                                                         //
    //                     *Instructions*                      //
    //   place character in an area that has lots of normal    //
    //   trees, use the crosshair to select the ruenscape      //
    //   client, set up lines 37 to 70 (and 79), press         //
    //   play and enjoy                                        //
    //   (have your axe equipped or it wont work)              //
    //                                                         //
    //                                                         //
    //                       *Features*                        //
    //         - will log in and out                           //
    //         - will switch players                           //
    //         - will cut a full load of normal logs           //
    //         - will drop logs when inventory is full         //
    //         - FindNormalRandoms                             //
    //                                                         //
    //                       *Credits*                         //
    //                     By In_Jeopardy                      //
    //               With help from Sumilion =]                //
    //      With some guidance on log dropping from JLewis     //
    //                                                         //
    //                                                         //
    //---------------------------------------------------------//
    
    
    program BasicTreeCutter;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\WoodCutting.scar}
    Var
      TempCount, CutMark, Mymark, MyTree, MyTime : integer;
      A: integer;
      frmDesign : TForm;
      Button1 : TButton;
    
    Const
      NumberOfUsers = 1;
      StartPlayer   = 0;
      Time          = 360000 ;     // Maximum amount of time you want it to spend on all accounts
    
      
    const
      Yew           = 3096640;
      Maple         = 20608;
      Willow        = 3166296;
      Oak           = 3303512;
      Normal        = 403492;
      Amount        = 5;             // number of loads
      
    Procedure DeclarePlayers;
    Begin
      HowManyPlayers  := NumberOfUsers;
      NumberOfPlayers( HowManyPlayers );
      CurrentPlayer := StartPlayer;
    
      Players[0].Name     := '';
      Players[0].Pass     := '';
      Players[0].Nick     := '';
      Players[0].Active   := True;
    End;
    
    procedure Setup;
    begin;
      SetupSRL;
      A:= 0
      MouseSpeed := 20;
      DeclarePlayers;
      Cleardebug;
      MyTree  := Normal;                 // Put name of tree here.
    end;
      
    procedure buttonclick(sender: TObject);
    begin
      Writeln('**Script Started**');
      frmDesign.Caption:= frmDesign.Caption + '.';
      frmDesign.ModalResult:= mrOk;
    end;
    
    procedure InitForm;
    begin
      frmDesign := CreateForm;
      frmDesign.Left := 100;
      frmDesign.Top := 100;
      frmDesign.Width := 200;
      frmDesign.Height := 180;
      frmDesign.Caption := 'Lets Begin!';
      frmDesign.Color := clBtnFace;
      frmDesign.Font.Color := clWindowText;
      frmDesign.Font.Height := -11;
      frmDesign.Font.Name := 'MS Sans Serif';
      frmDesign.Font.Style := [];
      frmDesign.Visible := False;
      frmDesign.PixelsPerInch := 96;
      Button1 := TButton.Create(frmDesign);
      Button1.OnClick:= @buttonclick;
      Button1.Parent := frmDesign;
      Button1.Left := 60;
      Button1.Top := 60;
      Button1.Width := 75;
      Button1.Height := 25;
      Button1.Caption := 'Begin Script';
      Button1.TabOrder := 8;
    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 colourpick0;
    begin;
      If FindColorSpiralTolerance(x, y, MyTree, 000, 000, 516, 337, 5) Then;
    begin;
      Mouse(x, y, 3, 5, true);
      TempCount := InvCount;
      MarkTime(CutMark);
    repeat
      FindNormalRandoms;
      Wait(200)
    Until(InvCount = TempCount +1) Or (TimeFromMark(CutMark) >= 10000)
    end;
    end;
    
    begin;
      Setup
      SafeInitForm
      SafeShowFormModal
      ActivateClient
    If Not( LoggedIn ) Then LoginPlayer;
      NextPlayer(true)
      ChatsOff
      wait(2000)
      highestangle;
      MakeCompass('N')
    repeat
      marktime(mymark);
    repeat
      colourpick0;
    until(InvFull) Or (TimeFromMark(cutMark) >= 150000)
    begin;
      DropAllLogs;
      A:=A+1
    end;
      Until(TimeFromMark(MyTime) >= Time) Or (A=Amount);
      NextPlayer (true)
    end.
    Every time you macro, you kill a bunny...

    Kill all of the bunnies

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    change your main loop to this:
    SCAR Code:
    begin;
      Setup
      SafeInitForm
      SafeShowFormModal
      ActivateClient
    If Not( LoggedIn ) Then LoginPlayer;
      NextPlayer(true)
      ChatsOff
      wait(2000)
      highestangle;
      MakeCompass('N')
    repeat
      marktime(mymark);
    repeat
      colourpick0;
    until(InvFull) Or (TimeFromMark(cutMark) >= 150000)
    begin;
      DropAllLogs;
      A:=A+1
    end;
      Until(TimeFromMark(MyTime) >= Time) Or (A=Amount);
      NextPlayer (true)
    end.

    and get rid of the form. its pointless.

  3. #3
    Join Date
    Jun 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, and I know that it's pointless, but I wanted to see if I could use it...
    Every time you macro, you kill a bunny...

    Kill all of the bunnies

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making your first woodcutting script.
    By shaunthasheep in forum OSR Intermediate Scripting Tutorials
    Replies: 131
    Last Post: 01-23-2009, 09:55 PM
  2. First woodcutting script help.
    By bondman in forum OSR Help
    Replies: 4
    Last Post: 11-15-2007, 03:27 AM
  3. need a woodcutting script for Scar 2.0
    By The Hunter in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 05-01-2007, 12:43 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
  •