Results 1 to 6 of 6

Thread: My script error

  1. #1
    Join Date
    Aug 2007
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My script error

    Hi i am making my first script its kind of choper and i have error
    Code:
    //________________________________________________________________\\
    //                         SapettoTreeChopDrop                    \\
    //                                                                \\
    //               Chops Normal Trees and drops them.               \\                                             \\
    //               Position ypur player near Trees.                 \\                               \\
    //                                                                \\                                                                \\
    //________________________________________________________________\\
    
    program SapettoTreeChopDrop;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}
    
    const
      TreeColora = 3308653;
      TreeColorb = 2114621;
      TreeColorc = 1720889;
    
    var
      x, y, Logs: Integer;
    
    
    procedure Chop;
    begin
      repeat
        if(not(LoggedIn))then
        Exit;
        if
        FindColorTolerance(x,y,TreeColora,3,3,551, 231,6) or
        FindColorTolerance(x,y,TreeColorb,3,3,551, 231,6) or
        FindColorTolerance(x,y,TreeColorc,3,3,551, 231,6) then
        begin
        MoveMouseSmoothEx(x,y,3,9,7,25,15)
        if IsUpTextMulti('hop', 'own', 'ree') then
        mouse(x,y,1,1,true)
        wait(400+random(200))
      until(InvFull);
      end;
      end;
    
    procedure Drop;
      begin
      if(not(LoggedIn))then
      Exit;
      Logs := DTMFromString('78DA6314636060E06700036608C5D09C62C32' +
           '007A41981F83F10304A001952A86A40B23035609E3090E020A046' +
           '1E48F01250C385E91E0C353C404292801A6920C18A5F0D0076AD0' +
           '717');
      repeat
      if(FindDTM(Logs,x,y,MIX1, MIY1, MIX2, MIY2)) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('rop');
        Wait(600+Random(500))
      end;
      Until(not(FindDTM(Logs, x, y, MIX1, MIY1, MIX2, MIY2)))
      end;
    
      procedure FindRandoms;
      begin
      FindNormalRandoms;
      FindEnt(x, y, true);
      if (FindFight) then
      begin
        MakeCompass('N');
        RunTo('N', True);
        Wait(7000 +Random(2000));
        RunBack;
      end;
    end;
    
    Function FindFastRandoms: Boolean;   // By WT-Fakawi.
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
           10: Respond;
        end;
        wait(1);
      end;
    end;
    
    
    
    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
    
      case Random(4) of
    
        1: begin
             HoverSkill('Woodcutting', false);
             wait(2000+random(500));
             GameTab(4);
           end;
    
        2: begin
             HoverSkill('Firemaking', false);
             wait(2000+random(500));
             GameTab(4);
           end;
    
        3: PickUpMouse;
    
        4: begin
             GameTab(1 + Random(12));
             wait(500+random(1000));
             GameTab(4);
           end;
        5: case random(4) of
              1: TypeSend('I am better at fishing');
              2: TypeSend('I am sleppy');
              3: TypeSend('grr i am very good!');
              4: TypeSend('Wc levels?');
            end;
    end;
    
    
    begin
    SetUpSRL;
    ClearDebug;
    repeat
    Chop;
    Drop;
    end.

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Add Until() to ur repeats.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have forgotton one end on the anti ban:

    SCAR Code:
    //________________________________________________________________\\
    //                         SapettoTreeChopDrop                    \\                   \\
    //                                                                \\
    //               Chops Normal Trees and drops them.              \\                                             \\
    //               Position ypur player near Trees.                                                \\
    //                                                                \\                                                                \\
    //________________________________________________________________\\

    program SapettoTreeChopDrop;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}

    const
      TreeColora = 3308653;
      TreeColorb = 2114621;
      TreeColorc = 1720889;

    var
      x, y, Logs: Integer;

    procedure FindRandoms;
      begin
      FindNormalRandoms;
      FindEnt(x, y, true);
      if (FindFight) then
      begin
        MakeCompass('N');
        RunTo('N', True);
        Wait(7000 +Random(2000));
        RunBack;
      end;
    end;

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
           10: Respond;
        end;
        wait(1);
      end;
    end;



    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;

      case Random(4) of

        1: begin
             HoverSkill('Woodcutting', false);
             wait(2000+random(500));
             GameTab(4);
           end;

        2: begin
             HoverSkill('Firemaking', false);
             wait(2000+random(500));
             GameTab(4);
           end;

        3: PickUpMouse;

        4: begin
             GameTab(1 + Random(12));
             wait(500+random(1000));
             GameTab(4);
           end;
        5: case random(4) of
              1: TypeSend('I am better at fishing');
              2: TypeSend('I am sleppy');
              3: TypeSend('grr i am very good!');
              4: TypeSend('Wc levels?');
            end;
        end;
    end;

    procedure Chop;
    Begin
      repeat
        if(not(LoggedIn))then
        Exit;
        FindColorTolerance(x,y,TreeColora,3,3,551, 231,6);
        FindColorTolerance(x,y,TreeColorb,3,3,551, 231,6);
        FindColorTolerance(x,y,TreeColorc,3,3,551, 231,6);

        mouse(x,y,2,2,true);
        wait(2000+random(2500));
        until(InvFull);
      end;

    procedure Drop;
      begin
      if(not(LoggedIn))then
      Exit;
      Logs := DTMFromString('78DA6314636060E06700036608C5D09C62C32' +
           '007A41981F83F10304A001952A86A40B23035609E3090E020A046' +
           '1E48F01250C385E91E0C353C404292801A6920C18A5F0D0076AD0' +
           '717');
      repeat
      if(FindDTM(Logs,x,y,MIX1, MIY1, MIX2, MIY2)) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('rop');
        Wait(600+Random(500))
      end;


    begin
    SetUpSRL;
    ClearDebug;
    repeat
    Choping;
    Drop;

    end.
    one other tip, make a array from the tree colors
    like this (some other bugs fixed tough):
    SCAR Code:
    //________________________________________________________________\\
    //                         SapettoTreeChopDrop                    \\                   \\
    //                                                                \\
    //               Chops Normal Trees and drops them.              \\                                             \\
    //               Position ypur player near Trees.                                                \\
    //                                                                \\                                                                \\
    //________________________________________________________________\\

    program SapettoTreeChopDrop;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}

    var
      x, y, Logs: Integer;

    var TreeColor: array[1..3] of Integer;

    procedure LoadTreeColors;
    begin
      TreeColor[1]:= 3308653;
      TreeColor[2]:= 2114621;
      TreeColor[3]:= 1720889;
    end;

    procedure FindRandoms;
      begin
      FindNormalRandoms;
      FindEnt(x, y, true);
      if (FindFight) then
      begin
        MakeCompass('N');
        RunTo('N', True);
        Wait(7000 +Random(2000));
        RunBack;
      end;
    end;

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
           10: Respond;
        end;
        wait(1);
      end;
    end;



    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;

      case Random(4) of

        1: begin
             HoverSkill('Woodcutting', false);
             wait(2000+random(500));
             GameTab(4);
           end;

        2: begin
             HoverSkill('Firemaking', false);
             wait(2000+random(500));
             GameTab(4);
           end;

        3: PickUpMouse;

        4: begin
             GameTab(1 + Random(12));
             wait(500+random(1000));
             GameTab(4);
           end;
        5: case random(4) of
              1: TypeSend('I am better at fishing');
              2: TypeSend('I am sleppy');
              3: TypeSend('grr i am very good!');
              4: TypeSend('Wc levels?');
            end;
        end;
    end;

    procedure Chop;
    var
      T : Integer;
    Begin
      if(not(LoggedIn))then Exit;
      for T:= 1 To 3 do
      begin
        if  FindColorTolerance(x,y,TreeColor[T],3,3,551, 231,6) then
        begin
          mouse(x,y,2,2,true);
          wait(2000+random(2500));
          Exit;
        end;
      end;
    end;

    procedure Drop;
      begin
      if(not(LoggedIn))then
      Exit;
      Logs := DTMFromString('78DA6314636060E06700036608C5D09C62C32' +
           '007A41981F83F10304A001952A86A40B23035609E3090E020A046' +
           '1E48F01250C385E91E0C353C404292801A6920C18A5F0D0076AD0' +
           '717');
      repeat
      if(FindDTM(Logs,x,y,MIX1, MIY1, MIX2, MIY2)) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('rop');
        Wait(600+Random(500))
      end;
      Until(Not(FindDTM(Logs,x,y,MIX1, MIY1, MIX2, MIY2)))
      FreeDTM(logs);
    end;


    begin
      SetUpSRL;
      ClearDebug;
      LoadTreeColors;
      repeat;
        repeat;
          Chop;
        Until(invFull);
      Drop;
      until(False);
    end.

  4. #4
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    this script looks simple and good =) good job bro

  5. #5
    Join Date
    Aug 2007
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I eddited the old errors and now i have new in line 36 ...
    I cant find mistake

    PS rikjess sorry for my noob question but how cani make arrow from the tree colours is there any tut

  6. #6
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sapetto View Post
    I eddited the old errors and now i have new in line 36 ...
    I cant find mistake

    PS rikjess sorry for my noob question but how cani make arrow from the tree colours is there any tut
    sorry type mistake.. allready shaw him
    array. btw,, ive eddit my post. made a array from it and fixed the other bugs. gl with him

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Error: Cannot Fix Script - Error Overgrowth - Begin Headdesking
    By PhantasmalScripter in forum OSR Help
    Replies: 6
    Last Post: 12-23-2006, 12:50 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
  •