Results 1 to 5 of 5

Thread: Need help with my script

  1. #1
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default Need help with my script

    Problems currently having:
    1. How do i make the script keep repeating?
    2. I keep getting these errors for some reason..

    [Runtime Error] : Out Of Range in line 406 in script E:\Program Files\SCAR 2.0312\includes\srl\srl\core\AntiBan.scar - I think when it was trying to do something on runescape but it wasnt on the runescape silent thing.

    [Runtime Error] : Out Of Range in line 464 in script E:\Program Files\SCAR 2.0312\includes\srl\srl\core\AntiRandoms\AntiRando ms.scar - not sure what happen here

    [Runtime Error] : Out Of Range in line 13 in script E:\Program Files\SCAR 2.0312\includes\srl\srl\core\AntiRandoms\Box.scar
    Successfully compiled - This one happen when a box random event came


    anyone help me on these errors im having



    SCAR Code:
    //  :::>>>>>>> BobboHobbo Productions <<<<<<<::::
    //      This Script was made from Me and got help from many guides
    //                 Thank you to people who created guide
    //                          to have helped me
    //                        [Instructions]
    //                     1. Setup Lines 14-16
    //                     2. I made this mainly for willows
    //                        so wc where thers only willows
    //                        (Near lumbridge chickens)
    program PowerCutte;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\woodcutting.scar}
    {.include SRL\SRL\extended\xantiban.scar}
    const
    RunDirection= 'E';
    Tree = 4026472;//Colour of tree.
    Treename = 'Willow';
    //
    //
    //
    //
    //
    //

    /////////////////////////////////////////////////////////////
    //         >>>Declare Your players.

                          //       DELCARE PLAYERS AINT WORKING!!
    /////////////////////////////////////////////////////////////

    procedure DeclarePlayers;
    begin
         HowManyPlayers := 2;
         CurrentPlayer:= 0;
         NumberOfPlayers(HowManyPlayers);

         Players[0].Name :='Your Username';
         Players[0].Pass :='Your Password';
         Players[0].Nick :='Nickname';  //3 letters of your username, example jonno you would choose onn.
         Players[0].Active:= True;

         Players[1].Name :='Your Username';
         Players[1].Pass :='Your Password';
         Players[1].Nick :='Nickname'; //3 letters of your username, example jonno you would choose onn.
         Players[1].Active:= True;
         end;


    /////////////////////////////////////////////////////////////
    //              >> Cuttin the tree                         //
    /////////////////////////////////////////////////////////////



    procedure CuttingTree;
     begin
      if FindColorSpiral(x, y, Tree, 0, 0, 517, 339) then
      MMouse(x, y, 1, 1);
      if FindObj(x,y,'ill',Tree,10) then
      Mouse(x, y, 1, 1, true);
      Writeln('Cutting a tree ');
         case random(10)of
        0 : wait (1000);
        1 : wait (2000);
        2 : wait (3000);
        3 : wait (1000);
        4 : wait (2500);
        5 : wait (1544);
        6 : wait (3453);
        7 : wait (1343);
        8 : wait (1232);
        9 : wait (2743);
        10 : wait (2342);
        end
      FindHead;
      AttachHead;
       end;
    /////////////////////////////////////////////////////////////
    //              >> Anti Ban                                //
    /////////////////////////////////////////////////////////////

    procedure AntiBanSystem;
    Begin
    Antiban;
    PickUpMouse;
    case random(12)of
    0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('random', False);
        2: RandomChatEvery(10 + Random(5));
        3: RotateEvery(20 + Random(10));
        4: LeaveScreenEvery(5 + Random(5));
        5: HoverEvery(15 + Random(5), 'random');
        6: MessageFriendEvery;
        7: PickUpMouse;
        8: BoredEvery(9 + Random(24));
        9: DragItem(1, 1 + Random(18));
        10: GameTab(1 + Random(12));
        11: DoEmote(1 + Random(20));
        12: PolyGlotTalk;
     end;
     end;


    /////////////////////////////////////////////////////////////
    //            >> Dropping the Logs                         //
    /////////////////////////////////////////////////////////////
    procedure Drop;
     begin
      if (InvFull) then
      wait(10000);
      Writeln('Droping the Logs ');
      DropAllLogs;
      Writeln('Dropped All logs ');
         case random(4)of
        0 : Makecompass('S');
        1 : MakeCompass('E');
        2 : MakeCompass('W');
        3 : MakeCompass('n');
        4 : wait (1000);
       end
       end;
    /////////////////////////////////////////////////////////////
    //             >> Taking care of the ents!                  //
    /////////////////////////////////////////////////////////////

           procedure EntFinder;
    var
      EX, EY: integer;
      FX, FY: integer;
      SafeEntWait: LongInt;

    begin
      Status('Checking For Ent')
        if (FindObjMultiText(EX, EY, Treename, Treename, Treename, Tree, 2)) then
      begin
        MMouse(EX, EY, 0, 0)
          if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
        begin
          Status('Ent Found');
          MouseFindFlag(645, 83, 2, 2);
          MarkTime(SafeEntWait)
            repeat
            FTWait(5)
              FindNormalRandoms;
            if not (LoggedIn) then
              NextPlayer(False);
          until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
            EntsAvoided := EntsAvoided + 1
        end;
      end;
    end;



    /////////////////////////////////////////////////////////////
    //             >> Taking care of randoms                   //
    /////////////////////////////////////////////////////////////
    function FindFastRandoms: Boolean; //Function by WT-Fakawi
    var
      i: Integer;
    begin
      for i := 1 to 8 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;
          7:
            begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
    end;

    procedure FindRandoms;
    begin
      FindFastRandoms;
      FindNormalRandoms;
      Wait(20)
        FindTalk;
      Wait(20)
        EntFinder;
      if (FindFight) then
      begin
        RunAwayDirection(RunDirection);
        Wait(8000 + Random(2000));
        RunBack;
      end;
      Wait(20)
        FindTalk;
    end;

    /////////////////////////////////////////////////////////////
    //             >>> The Setup of the script                 //
    /////////////////////////////////////////////////////////////
    procedure setup;
     begin
      SetupSRL;
      SetRun(true);
      Writeln('We have set Run to on ');

      SetChat('Hide', 1);
      SetChat('Off', 2);
      SetChat('Off', 3);
       end;

    //-----------------------------------------------------------------//
    //               >> MAIN LOOP                                      //
    //-----------------------------------------------------------------//
    begin
         case random(3)of
        0 : wait (3000);
        1 : wait (3000);
        2 : wait (4000);
        3 : wait (2000);
       end
     setupSRL;
     ActivateClient;

           setup;
           FindRandoms;
          HighestAngle;
          Makecompass ('N')
          FindAxeHeadColor;
          Repeat
          FindRandoms;
          AntiBanSystem;
           CuttingTree;
           until(InvFull);
           Drop;
            Repeat
            FindRandoms;
            AntiBanSystem;
           CuttingTree;
           until(InvFull);
           AntiBanSystem;
           FindRandoms;
           Drop;
              end.

  2. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just put like this:
    SCAR Code:
    begin
    SetupSRL;
    activateclient;
    setup;
    repeat
    AntiBanSystem;
    repeat
    CuttingTree;
    until(InventoryFull)
    Drop;
    Randoms;
    until(loads=0)
    end.
    Also you should use FindObj-function for finding objects.
    FindObj(x,y,'hop',TreeColor,10)

  3. #3
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

  4. #4
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    look in the woodcutting file in SRL for a Findaxe procedure

  5. #5
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

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
  •