Results 1 to 8 of 8

Thread: Woodcutter Script Help.

  1. #1
    Join Date
    May 2009
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Woodcutter Script Help.

    Here is my script:

    SCAR Code:
    program AutoWillowcutter;
    {.include SRL/SRL.Scar}
     {.include SRL/SRL/Skill/Woodcutting.Scar}

    Var
     x, y, i, Dropped : Integer;

    Const
     WieldAxe = 'False'; //Are you weilding an axe?

    Procedure AntiBan;
     RandomCompass : TStringArray;
    Begin
      RandomCompass := ['E', 'S', 'W'];
      MakeCompass(RandomCompass);
      Wait(2500 + Random(1000));
      MakeCompass('N');
      Case Random(50) Of
        0: BoredHuman;
        1: RandomMovement;
        2: PickUpMouse;
        3,4: HoverSkill('random', False);
        5: MMouse(Random(X), Random(Y), 0, 0);
      End;
    End;

    Procedure Cutter;
    Var
     WillowColors : Array [0..4] of Integer;
    Begin
     WillowColors[0] := 3163964
     WillowColors[1] := 4025190
     WillowColors[2] := 4021327
     WillowColors[3] := 4286041
     WillowColors[4] := 3299411
     Repeat
      For i := 0 To 4 Do
       If FindObj(x, y, 'illo', WillowColors[i], 30) Then
       Begin
        Mouse(x, y, 2, 3, True);
        Wait(5000 + Random(2500));
       End;
      AntiBan;
     Until(InvFull);
    End;

    Procedure Dropper;
    Begin
     case WieldAxe of
      'True' : Begin
                For i := 1 to 28 Do
                Begin
                 DropItem(i);
                 inc(Dropped);
                End;
               End;
               
      'False' : Begin
                For i := 2 to 28 Do
                Begin
                 DropItem(i);
                 inc(Dropped);
                End;
               End;
     End;
    End;

    Procedure MainLoop;
    Begin
     SetUpSRL;
     ActivateClient;
     SetAngle(True);
     SetRun(True);
     Repeat
      Cutter;
      If InvFull Then
      Begin
       Dropper;
      End;
     Until (not LoggedIn);
     if (not LoggedIn) then
     Begin
      Exit;
     End;
    End;

    Begin
     MainLoop;
    End.

    Here is the error:

    Code:
    Line 12: [Error] (16960:1): 'BEGIN' expected in script
    The code says that I am missing a, 'Begin'. I do not see where though.

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    var
    --RandomCompass: TStringArray;

  3. #3
    Join Date
    May 2009
    Posts
    54
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  4. #4
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And by the way you need to change this:
    SCAR Code:
    WillowColors : Array [0..4] of Integer;

    to this:
    SCAR Code:
    WillowColors : Array [0..5] of Integer;

    Because it is looking for 5 colors.

  5. #5
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Dark Arcana View Post
    And by the way you need to change this:
    SCAR Code:
    WillowColors : Array [0..4] of Integer;

    to this:
    SCAR Code:
    WillowColors : Array [0..5] of Integer;

    Because it is looking for 5 colors.
    No, 0..4 is what he wants. 0..5 would be if he was looking for SIX colors, not five.

  6. #6
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No look
    SCAR Code:
    WillowColors[0] := 3163964//1
     WillowColors[1] := 4025190//2
     WillowColors[2] := 4021327//3
     WillowColors[3] := 4286041//4
     WillowColors[4] := 3299411//5

    Shouldn't it be 5?

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Dark Arcana View Post
    No look
    SCAR Code:
    WillowColors[0] := 3163964//1
     WillowColors[1] := 4025190//2
     WillowColors[2] := 4021327//3
     WillowColors[3] := 4286041//4
     WillowColors[4] := 3299411//5

    Shouldn't it be 5?
    No. Check the numbers. 0 through 4 is five numbers. 0 through 5 is six numbers. He has five, so he wants 0..4.

  8. #8
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    No. Check the numbers. 0 through 4 is five numbers. 0 through 5 is six numbers. He has five, so he wants 0..4.
    Oh okay, sorry

    Edit: I was thinking of cases.
    Last edited by Dark Arcana; 05-31-2009 at 12:56 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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