Results 1 to 3 of 3

Thread: I need help with the declare players bit.

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

    Default I need help with the declare players bit.

    I added all the declareplayers

    SCAR Code:
    Procedure DeclarePlayers;
    begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;

        Players[0].Name := 'Usernamehere';
        Players[0].Pass := 'Passwordhere';
        Players[0].Nick := 'Nicknamehere'; //3 - 4 letters of YOUR username, example: sern
        Players[0].Active :=True;
    end;

    When i run my script it does everything nromal and when its gonna type username in it stuffs up, this is what is says:
    [Runtime Error] : Out Of Range in line 117 in script E:\Program Files\SCAR 2.0312\includes\srl\srl\core\Login.scar

    i need help on this.

    you can look in my script if you want..

    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
    Disguise = 'hello';
    RunDirection = 'E';
    Tree = 4026472;//Colour of tree.
    Treename = 'Willow';
    //
    //
    //
    //
    //
    //

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

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

    Procedure DeclarePlayers;
    begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;

        Players[0].Name := 'Usernamehere';
        Players[0].Pass := 'Passwordhere';
        Players[0].Nick := 'Nicknamehere'; //3 - 4 letters of YOUR username, example: sern
        Players[0].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
    case random(12)of
    0: RandomRClickEvery(2 + Random(13));
        1: HoverSkill('random', False);
        2: RandomChatEvery(10 + Random(5));
        3: MakeCompass('W');
        4: LeaveScreenEvery(5 + Random(5));
        5: DragItem(2, 2 + Random(18));
        6: LeaveScreenEvery(5 + Random(5));
        7: PickUpMouse;
        8: BoredEvery(9 + Random(24));
        9: DragItem(2, 2 + Random(18));
        10: GameTab(1 + Random(12));
        11: DoEmote(1 + Random(20));
     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');
       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;
                Logout;
                Exit;
              end;
            end;
          7:
            begin
              if InBlack then
              begin
                Result := True;
                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

     ClearDebug;
      ActivateClient;
      SetupSRL;
      SRLRandomsReport;
      DeclarePlayers;
      NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,UpChars);
      If (not(loggedIn)) then
          begin
           LoginPlayer;
           end;
      SetRun(true);
      Status('Set Run to on.');
      Writeln('We have set Run to on ');
          Status('Changing The chat.');
      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;
          If (not(loggedIn)) then
          begin
           LoginPlayer;
           end;
            NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
          ActivateClient;
          setup;
          FindRandoms;
          HighestAngle;
          Makecompass ('N')
          begin
          Repeat
          FindRandoms;
          AntiBanSystem;
           CuttingTree;
            NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
             FindHead;
           AttachHead;
           Drop;
           until (false)
           end;
           end.

    Please help me. thanks, Ben AKA bobbohobbo..

  2. #2
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    You forgot Declare players I put it in for ya. Should fix it

    SCAR Code:
    //-----------------------------------------------------------------//
    //               >> MAIN LOOP                                      //
    //-----------------------------------------------------------------//
    begin
         case random(3)of
        0 : wait (3000);
        1 : wait (3000);
        2 : wait (4000);
        3 : wait (2000);
       end
          SetupSRL;
          DeclarePlayers; ////////////////////////////////////////////////YOU FORGOT THIS :D
          If (not(loggedIn)) then
          begin
           LoginPlayer;
           end;
            NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
          ActivateClient;
          setup;
          FindRandoms;
          HighestAngle;
          Makecompass ('N')
          begin
          Repeat
          FindRandoms;
          AntiBanSystem;
           CuttingTree;
            NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
             FindHead;
           AttachHead;
           Drop;
           until (false)
           end;
           end.
    Sleeping...

  3. #3
    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)

Similar Threads

  1. declare players
    By i 69 ur nan in forum OSR Help
    Replies: 3
    Last Post: 01-06-2009, 07:14 PM
  2. Declare Players
    By 13om13e12 in forum OSR Help
    Replies: 2
    Last Post: 06-05-2008, 01:41 PM
  3. Need Help on declare players.
    By Raskolnikov in forum OSR Help
    Replies: 2
    Last Post: 11-16-2007, 11:02 PM
  4. Declare players?
    By ironlarreh in forum OSR Help
    Replies: 3
    Last Post: 11-12-2007, 09:55 PM

Posting Permissions

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