Results 1 to 13 of 13

Thread: Login.Scar changed yet not working.

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Login.Scar changed yet not working.

    Hello everyone, posted this on SMART thread but no answer =/

    Anyways, replacing Login.Scar with Lee Hok Lins (thats how u spell it I think? ) version. But it hasn't worked for me. It has the same problem (red mouse hovers over "please login" at the welcome screen. No script is actually logging in. Please help, thanks!

  2. #2
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by faster789 View Post
    Hello everyone, posted this on SMART thread but no answer =/

    Anyways, replacing Login.Scar with Lee Hok Lins (thats how u spell it I think? ) version. But it hasn't worked for me. It has the same problem (red mouse hovers over "please login" at the welcome screen. No script is actually logging in. Please help, thanks!
    double check and see if its the same

  3. #3
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by d1s3l View Post
    double check and see if its the same
    lol, yes it's the same. I've tried at least 6 times.

  4. #4
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by faster789 View Post
    lol, yes it's the same. I've tried at least 6 times.
    Ok ill try my script and if it works I'll give you mine, it might work? :P

    Edit: K mine works, sorry for treating you stupid but you went program files/scar/includes/srl/srl/core/login right? Sorry I'd have no idea if this doesn't work.

  5. #5
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    it should work, but here's mine, I know it works, I been using it.

    Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               ยป Login Routines                              --//
    //-----------------------------------------------------------------//
    // * function  RSReady: Boolean;                      // * by ZephyrsFury
    // * Procedure LoginScreenMusic(State: Variant);      // * by Wizzup?
    // * procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );  // * by ZephyrsFury
    // * procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fl, gt, cs: string);    // * by ZephyrsFury
    // * procedure SetAutoingDefaults;                    // * by ZephyrsFury
    // * procedure Logout;                                // * by Starblaster100 and Raymond
    // * procedure LoginPlayer;                           // * by SRL Developers
    // * procedure RandomNextPlayer(Active: Boolean);     // * by Dankness, Ron and Raymond
    // * procedure NextPlayer(Active: Boolean);           // * by Dankness, Ron and Raymond
    // * procedure CheckUserNicks;                        // * by Sumilion and Raymond
    
    { var SRL_Logs: Integer;
      Description: Variables needed for some login functions. }
    { var RandomPlayer, GraphicsSet: Boolean;
      Description: Variables needed for some login functions. }
    var
      SRL_Logs: Integer;
      RandomPlayer, GraphicsSet: Boolean;
    
    procedure NextPlayer(Active: Boolean); forward;
    procedure RandomNextPlayer(Active: Boolean); forward;
    
    {*******************************************************************************
    function RSReady: Boolean;
    By: ZephyrsFury
    Description: Returns true if we are ready to auto (on loginscreen or logged in).
      Useful for waiting until RS has fully loaded.
    *******************************************************************************}
    
    function RSReady: Boolean;
    begin
      Result := (LoggedIn) or (GetColor(520, 146) = 4038981);
    end;
    
    {*******************************************************************************
    Procedure LoginScreenMusic(State: Variant);
    By: Wizzup?
    Description: Takes Boolean(True, False) or Integer(1..5) as arguments.
      1 or True = Off, 5 or False = Max.
          1   2   3   4   5
        <-o---o---o---o---o->
    *******************************************************************************}
    
    Procedure LoginScreenMusic(State: Variant);
    
    Var
       RealState: Variant;
       x: Extended;
    
    Begin
      if (LoggedIn) then Exit;
      if (CountColor(7750, 346, 356, 416, 369) <> 119) and (GetColor(520, 135) = 4038981) then
      begin
        TypeByte(vk_Escape);
        Wait(100);
      end;
      if (CountColor(7750, 346, 356, 416, 369) <> 119) then Exit;
      Case VarType(State) Of
      11: RealState := (State + 1) * 4;
      3: If InRange(State, 1, 5) Then
           RealState := State - 1;
         Else
           RealState := 0;
      End;
      x := (425.0 - 337.0) * RealState / 4.0 + 339.0;
      If CountColorTolerance(1647966, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
        If CountColorTolerance(991349, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
          Mouse(Round(x), RandomRange(375, 385), 0, 0, True);
    
    End;
    
    {*******************************************************************************
    procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );
    By: ZephyrsFury
    Description: Sets audio options through the login screen.
    Use: Enter the desired Setting for the desired Option. Make option 0 for no change.
      EG. Login_SetAudio(1, 5, 2, NoChange);
    
                            1   2   3   4   5
      Volume, SFX, Area:  <-o---o---o---o---o->
    *******************************************************************************}
    
    procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: TSMSetting);
    var
      II, Tx, Ty, T: Integer;
      Pts: TIntegerArray;
    begin
      if (LoggedIn) then Exit;
      TypeByte(vk_Escape);
      T := GetSystemTime;
      while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
        Wait(100);
      if (CountColor(7750, 346, 373, 416, 386) = 119) then
        MouseBox(334, 362, 426, 371, 1)
      else
        Exit;
      Wait(100);
      Pts := [Volume, SFX, Area];
      for II := 0 to 2 do
      begin
        if (Pts[II] = 0) then Continue;
        if (not(InRange(Pts[II], 0, 5))) then
        begin
          srl_Warn('Login_SetAudio', 'Points must be between 0 and 5', warn_AllVersions);
          Continue;
        end;
        Tx := 337 + Round((425 - 337) * (Pts[II] - 1) / 4);
        Ty := Round(3.5 * II * II + 46.5 * II + 245);
        if (GetColor(Tx, Ty) <> 1121100) then
          Mouse(Tx + 2, Ty - 14, 0, 0, True);
        Wait(50);
      end;
      if (GetColor(337, 389) = 181) and (SMSetting = Stereo) then
        Mouse(421, 385, 10, 10, True)
      else
      if (GetColor(426, 389) = 181) and (SMSetting = Mono) then
        Mouse(332, 385, 10, 10, True);
      Wait(100);
      TypeByte(vk_Escape);
    end;
    
    {*******************************************************************************
    procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
    By: ZephyrsFury
    Description: Sets graphic options in the login screen.
    Use: Enter the desired Setting for the desired Option.
      Leave as 0 for no change of brightness and '' for no change in anything else.
    
      Parameter    Option                Setting
        Brightness   Brightness            1 - 4 (0 for no change)
        vl           Visible Levels        Current / All
        rr           Remove Roofs          Always / Selectively
        gd           Ground Decoration     Off / On
        td           Texture Detail        Low / High
        ia           Idle Animations       Few / Many
        fe           Flickering Effects    Off / On
        gt           Ground Textures       Few / Many
        cs           Chracter Shadows      Off / On
    
                        1   2   3   4
      Brightness:   <---o---o---o---o--->
    
    EG. Login_SetGraphics(2, 'current', '', 'off', 'low', 'few', '', 'few', 'off');
    
    For Autoing:
    Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    *******************************************************************************}
    
    procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
    var
      Settings, PosSettings, OptionName: TStringArray;
      II, T, W, tCol, x, y, mSpeed: Integer;
      TB: TBox;
      P: TPoint;
    begin
      if (LoggedIn) then Exit;
      Settings := [vl, rr, gd, td, ia, fe, gt, cs];
      PosSettings := ['Current', 'All', 'Always', 'Selectively', 'Off', 'On', 'Low',
        'High', 'Few', 'Many', 'Off', 'On', 'Few', 'Many', 'Off', 'On'];
      OptionName := ['Visible levels', 'Remove roofs', 'Ground decoration', 'Texture detail',
        'Idle animations', 'Flickering effects', 'Ground textures', 'Character shadows'];
      TypeByte(vk_Escape);
      T := GetSystemTime;
      while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
        Wait(100);
      if (CountColor(7750, 346, 373, 416, 386) = 119) then
        MouseBox(321, 338, 443, 346, 1)
      else
        Exit;
      mSpeed := MouseSpeed;
      MouseSpeed := 25;
      Wait(100);
      if (Brightness > 4) then
        srl_Warn('Login_SetGraphics', 'Brightness must be between 0 and 4', warn_AllVersions)
      else
      if (Brightness <> 0) then
      begin
        P := Point(89 + (Brightness - 1) * 21, 266);
        if (GetColor(P.x, P.y) <> 1121100) then
          Mouse(P.x - 3, P.y - 17, 6, 6, True);
      end;
      for II := 0 to 7 do
      begin
        TB.x1 := 67 + 130 * ((II + 1) mod 5);
        TB.y1 := 245 + 60 * ((II + 1) div 5);
        TB.x2 := TB.x1 + 109;
        TB.y2 := TB.y1 + 15;
        if (not(InStrArrEx(Capitalize(Settings[II]), [PosSettings[II * 2], PosSettings[II * 2 + 1]], W))) then
        begin
          srl_Warn('Login_SetGraphics', 'Invalid Setting: ' + Settings[II] + ' for Option: ' + OptionName[II] + '.', warn_AllVersions);
          Continue;
        end;
        tCol := (W mod 2) * 16777088 + 127;
        if (not(FindColor(x, y, tCol, TB.x1, TB.y1, TB.x2, TB.y2))) then
        begin
          Mouse(TB.x1 + 10, TB.y1 + 3, 10, 7, True);
          if (FindColor(x, y, tCol, TB.x1, TB.y2 + 1, TB.x2, TB.y2 + 1 + 51)) then
            Mouse(x, y, 10, 7, True)
          else
            MouseBox(TB.x1 + 10, TB.y1 + 3, TB.x2 - 40, TB.y2 - 3, 1);
        end;
      end;
      Wait(100);
      TypeByte(vk_Escape);
      MouseSpeed := mSpeed;
    end;
    
    {*******************************************************************************
    procedure SetAudioOff;
    By: ZephyrsFury
    Description: Sets the Audio to off (1 for each bar). Works logged in and out.
    *******************************************************************************}
    
    procedure SetAudioOff;
    begin
      if (LoggedIn) then
        SetAudio(1, 1, 1, NoChange)
      else
        Login_SetAudio(1, 1, 1, NoChange);
    end;
    
    {*******************************************************************************
    procedure SetAutoingDefaults;
    By: ZephyrsFury
    Description: Sets the graphic options for best SRL compatibility. Works both logged in and out.
    *******************************************************************************}
    
    procedure SetAutoingDefaults;
    begin
      if (LoggedIn) then
        SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off')
      else
        Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    end;
    
    {*******************************************************************************
    procedure Logout;
    By: Starblaster100 / Raymond
    Description: Logs you out.
    *******************************************************************************}
    
    function Logout: Boolean;
    var
      c, i: Integer;
    begin
      Result := (not (LoggedIn));
      if Result = True then
        Exit;
      if GameTab(14) = False then
        Exit;
      Wait(200 + Random(100));
      while (LoggedIn) and (c < 10) do
      begin
        Inc(c);
        if(ClickText('here', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
          for i := 0 to 10 do
          begin
            Wait(1000);
            if not(LoggedIn)then
            begin
              Result := True;
              Exit;
            end;
          end;
      end;
    end;
    
    {*******************************************************************************
    procedure LoginPlayer;
    By: SRL Developers
    Description: Logs in the Player[CurrentPlayer]. Detects most Client Login Errors
    *******************************************************************************}
    
    procedure LoginPlayer;
    var
      Mark, Attempts: Integer;
      Actions: TVariantArray;
      RetryLogin: Boolean;
    label
      ProcStart;
    begin
      ActivateClient;
      Wait(100);
    
      if (GetColor(212, 327) = 238301) then    //At Click To Play screen
      begin
        Wait(1000 + Random(3000));
        MouseBox(227, 337, 555, 364, 1);
        MarkTime(Mark);
        while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
          Wait(1000 + Random(1000));
      end;
      if (not(RSReady)) then
      begin
        MarkTime(Mark);
        while (not(RSReady)) do
        begin
          Wait(100);
          if (TimeFromMark(Mark) > 180000) then
          begin
            WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
            TerminateScript;
          end;
        end;
        WriteLn('Welcome to Runescape.');
      end;
    
      LoginScreenMusic(True);
      if (not(GraphicsSet)) then
      begin
        SetAutoingDefaults;
        GraphicsSet := True;
      end;
      ProcStart:
    
      if (not(LoggedIn)) then
      begin
        if (not(Players[CurrentPlayer].Active)) then
        begin
          WriteLn('Player is not Active...');
          NextPlayer(False);
          Exit;
        end;
        Wait(900 + random(60));
    
        //Click 'Log In' on main menu
        while (GetColor(343, 175) <> 7750) do
        begin
          MouseBox(360, 180, 400, 185, 1);
          Wait(100 + Random(100));
        end;
    
        //Type Username
        Mouse(315, 272, 10, 5, True);
        while (CountColor(7750, 311, 269, 452, 284) > 13) do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        for Mark := 0 to 3 do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        Wait(100 + Random(200));
        WriteLn(Capitalize(Players[CurrentPlayer].Name));
        TypeSend(Players[CurrentPlayer].Name);
        Wait(100+random(50));
    
        //Type Password
        Mouse(315, 334, 10, 5, True);
        while (CountColor(7750, 311, 337, 452, 352) > 13) do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        for Mark := 0 to 3 do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        Wait(100 + Random(200));
        TypeSend(Players[CurrentPlayer].Pass);
        Wait(500 + Random(300));
    
        if (not(FindTextTPA(12509695, 0, 288, 205, 475, 247, 'login', StatChars, Nothing))) then   //If 'enter' from typesend didn't log us in
        begin
          MouseBox(355, 359, 403, 372, 1);  //Click 'login' login screen
          Wait(250 + random(100));
        end;
    
        MarkTime(Mark);
        repeat
          SetLength(Actions, 0);
    
          if (TimeFromMark(Mark) > 60000) then
            Actions := ['One minute has passed...', 0, 2, 'NextPlayer', 'Login Failed']
          else
          case (CountColor(12509695, 288, 205, 475, 247)) of   //Number of text colour points
            //   Actions := ['WriteLn Text', TimeToWait, NumberOfRetries, 'FinalAction', 'PlayerStatus'];
            760: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'NextPlayer', ''];
            536: Actions := ['Login limit exceeded. Please wait 1 minute and try again.', 60000, 2, 'NextPlayer', ''];
            711: Actions := ['Your account has been disabled', 0, 0, 'NextPlayer', 'Acc Disabled'];
            598: Actions := ['Invalid Username \ Password', 0, 2, 'NextPlayer', 'Wrong User/Pass'];
            917: Actions := ['Not a Members Account', 0, 0, 'NextPlayer', 'Non-member'];
            408: Actions := ['World is full.', 5000, 20, 'Terminate', ''];
            623: Actions := ['Your account is already logged in', 5000, 0, 'RandomNextPlayer', ''];
            555: Actions := ['The Server is being updated.', 60000, 4, 'Terminate', 'Server Updating'];
            218: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
            335: Actions := ['Unable to connect Login Server offline.',(20000) + Random(6000), 4, 'Terminate', 'Login Server Offline'];
            512: Actions := ['RuneScape has been updated. Script Terminated.', 0, 0, 'Terminate', 'RS Updated'];
            489: Actions := ['Connection timed out.', 0, 4, 'Terminate', 'Connection Timed Out'];
            737: Actions := ['You are standing in a members-only area.', 0, 0, 'NextPlayer', 'In Mems-Only Area'];
            //10: Actions := ['Error loading your profile.', 5000, 10, 'NextPlayer', 'Profile Loading Failed']; // Error loading your profile. Will attempt to re-login 5 more times.)
            //11: Actions := ['Login server rejected session.', 1000, 10, 'NextPlayer', 'Login Serv. Rejected'];  // Login server rejected session.
          end;
    
          if (Length(Actions) > 0) then
          begin
            WriteLn(Actions[0]);
            Wait(Actions[1] + Random(100));
            if (Actions[2] <> 0) then
              if (Attempts < Actions[2]) or (Actions[2] = -1) then
              begin
                RetryLogin := True;
                Break;
              end;
            if (Actions[4] <> '') then
              Players[CurrentPlayer].Loc := Actions[4];
            case Actions[3] of
              'NextPlayer': NextPlayer(False);
              'RandomNextPlayer': RandomNextPlayer(True);
              'Terminate': TerminateScript;
            end;
            Exit;
          end;
          Wait(100);
        until(GetColor(212, 327) = 238301);
    
        if (RetryLogin) then
        begin
          RetryLogin := False;
          Inc(Attempts);
          goto ProcStart;
        end;
    
        if (GetColor(212, 327) = 238301) then
        begin
          Wait(1000 + Random(2000));
          MouseBox(227, 337, 555, 364, 1);
        end;
        MarkTime(Mark);
        while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
          Wait(1000 + Random(1000));
      end;
    
      if (LoggedIn) then
      begin
        PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
        if Length(Players[CurrentPlayer].NickTPA) < 2 then
        begin;
          Writeln('Creating the NickTPA.');
          if Players[CurrentPlayer].Nick <> '' then
            Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
          else
          begin;
            Writeln('Nickname isn''t set, taking the username instead..');
            Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Name, UpChars);
          end;
        end;
        AddToSRLLog('Current player: ' + Capitalize(Players[CurrentPlayer].Name));
      end;
    end;
    
    {*******************************************************************************
    procedure RandomNextPlayer(Active: Boolean);
    By: Dankness based on WT-Fawki's NextPlayer and modified by Ron and by Raymond
    Description: Picks Random Player that is Active and Logs in
    *******************************************************************************}
    
    procedure RandomNextPlayer(Active: Boolean);
    var
      LastPlayer: Integer;
    begin
      WriteLn('NextPlayer');
      LastPlayer := CurrentPlayer;
      Players[CurrentPlayer].Active := Active;
      Logout;
      PlayerCurTime := (GetSystemTime div 1000);
      Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
        ((PlayerCurTime - PlayerStartTime) / 60);
      repeat
        if (AllPlayersInactive) then Wait(60000);
        if (PlayersActive = 1) then Break;
        CurrentPlayer := Random(HowManyPlayers);
        Wait(100);
      until (Players[CurrentPlayer].Active) and (LastPlayer <> CurrentPlayer);
      SRL_Logs := SRL_Logs + 1;
      LoginPlayer;
    end;
    
    {*******************************************************************************
    procedure NextPlayer(Active: Boolean);
    By: Dankness and modified by Ron and by Raymond
    Description: Logs in the next player.
    Boolean: True - Current player is ok. False - Current player is false.
    *******************************************************************************}
    
    procedure NextPlayer(Active: Boolean);
    begin
      if RandomPlayer then
        RandomNextPlayer(Active)
      else
      begin
        WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
        Players[CurrentPlayer].Active := Active;
        Logout;
        PlayerCurTime := (GetSystemTime div 1000);
        Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
          ((PlayerCurTime - PlayerStartTime) / 60);
        CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
        while Players[CurrentPlayer].Active = False do
        begin
          CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
          if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
        end;
        SRL_Logs := SRL_Logs + 1;
        LoginPlayer;
      end;
    end;
    
    {*******************************************************************************
    procedure CheckUserNicks;
    By: Sumilion / Raymond
    Description: Checks if all nicks are set correct.
    *******************************************************************************}
    
    procedure CheckUserNicks;
    var
      CorrectString: string;
      i: Integer;
      Wrong : Boolean;
      Str : String;
    begin
      for i := 0 to HowManyPlayers - 1 do
      begin
        if (not(Players[CurrentPlayer].Active)) then Continue;
        Wrong := False;
        if (Players[i].Nick = '') then
        begin
          Wrong := True;
          Str := 'WARNING : Please fill in your nickname.';
        end;
        if (Players[i].Nick <> LowerCase(Players[i].Nick)) then
        begin
          Wrong := True;
          Str := 'WARNING : Please Uncapitalise your nickname.';
        end;
        if (pos(Players[i].Nick, LowerCase(Players[i].Name)) = 1) then
        begin
          Wrong := True;
          Str := 'WARNING : Dont use the first letter in your nick.';
        end;
        if (pos(' ', Players[i].Nick) > 0) then
        begin
          Wrong := True;
          Str := 'WARNING : Dont use spaces in your Nick.';
        end;
        CorrectString := Capitalize(Players[i].Name);
        if not (Pos(LowerCase(Players[i].Nick), CorrectString) > 0) then
        begin
          Wrong := true;
          Str := 'WARNING : Nick does NOT match the name.';
        end;
        if Wrong then
        begin;
          Writeln('--');
          Writeln(Str);
          if (Length(Players[i].Name) > 0) then
            Writeln('Warning occured with player : ' + Players[i].Name);
          Writeln('For more information, visit http://www.villavu.com/forum/showthread.php?t=5410');
        end;
      end;
    end;

  6. #6
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Sorry guys, still not working
    I even re-downloaded scar and srl. Still not working, -_-
    Any help would be appreciated. +rep!

  7. #7
    Join Date
    Oct 2007
    Location
    england
    Posts
    200
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    same thing happens 4 me i think we will just hav to wait till new update but u can start the script logged in 4 now its easy enoth apart from when ur useing smart.

    edit:
    found an updated version of login.scar tht works 4 me
    replace c/program files/scar 3.15/includes/srl/core/login.scar
    with this:
    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               ยป Login Routines                              --//
    //-----------------------------------------------------------------//
    // * function  RSReady: Boolean;                      // * by ZephyrsFury
    // * Procedure LoginScreenMusic(State: Variant);      // * by Wizzup?
    // * procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );  // * by ZephyrsFury
    // * procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fl, gt, cs: string);    // * by ZephyrsFury
    // * procedure SetAutoingDefaults;                    // * by ZephyrsFury
    // * procedure Logout;                                // * by Starblaster100 and Raymond
    // * procedure LoginPlayer;                           // * by SRL Developers
    // * procedure RandomNextPlayer(Active: Boolean);     // * by Dankness, Ron and Raymond
    // * procedure NextPlayer(Active: Boolean);           // * by Dankness, Ron and Raymond
    // * procedure CheckUserNicks;                        // * by Sumilion and Raymond

    { var SRL_Logs: Integer;
      Description: Variables needed for some login functions. }

    { var RandomPlayer, GraphicsSet: Boolean;
      Description: Variables needed for some login functions. }

    var
      SRL_Logs: Integer;
      RandomPlayer, GraphicsSet: Boolean;

    procedure NextPlayer(Active: Boolean); forward;
    procedure RandomNextPlayer(Active: Boolean); forward;

    {*******************************************************************************
    function RSReady: Boolean;
    By: ZephyrsFury
    Description: Returns true if we are ready to auto (on loginscreen or logged in).
      Useful for waiting until RS has fully loaded.
    *******************************************************************************}


    function RSReady: Boolean;
    begin
      Result := (LoggedIn) or (GetColor(520, 146) = 4038981);
    end;

    {*******************************************************************************
    Procedure LoginScreenMusic(State: Variant);
    By: Wizzup?
    Description: Takes Boolean(True, False) or Integer(1..5) as arguments.
      1 or True = Off, 5 or False = Max.
          1   2   3   4   5
        <-o---o---o---o---o->
    *******************************************************************************}


    Procedure LoginScreenMusic(State: Variant);

    Var
       RealState: Variant;
       x: Extended;

    Begin
      if (LoggedIn) then Exit;
      if (CountColor(7750, 346, 356, 416, 369) <> 119) and (GetColor(520, 135) = 4038981) then
      begin
        TypeByte(vk_Escape);
        Wait(100);
      end;
      if (CountColor(7750, 346, 356, 416, 369) <> 119) then Exit;
      Case VarType(State) Of
      11: RealState := (State + 1) * 4;
      3: If InRange(State, 1, 5) Then
           RealState := State - 1;
         Else
           RealState := 0;
      End;
      x := (425.0 - 337.0) * RealState / 4.0 + 339.0;
      If CountColorTolerance(1647966, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
        If CountColorTolerance(991349, Round(x) - 5, 375, Round(x) + 5, 385, 20) < 5 Then
          Mouse(Round(x), RandomRange(375, 385), 0, 0, True);

    End;

    {*******************************************************************************
    procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: (Stereo, Mono, NoChange) );
    By: ZephyrsFury
    Description: Sets audio options through the login screen.
    Use: Enter the desired Setting for the desired Option. Make option 0 for no change.
      EG. Login_SetAudio(1, 5, 2, NoChange);

                            1   2   3   4   5
      Volume, SFX, Area:  <-o---o---o---o---o->
    *******************************************************************************}


    procedure Login_SetAudio(Volume, SFX, Area: Integer; SMSetting: TSMSetting);
    var
      II, Tx, Ty, T: Integer;
      Pts: TIntegerArray;
    begin
      if (LoggedIn) then Exit;
      TypeByte(vk_Escape);
      T := GetSystemTime;
      while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
        Wait(100);
      if (CountColor(7750, 346, 373, 416, 386) = 119) then
        MouseBox(334, 362, 426, 371, 1)
      else
        Exit;
      Wait(100);
      Pts := [Volume, SFX, Area];
      for II := 0 to 2 do
      begin
        if (Pts[II] = 0) then Continue;
        if (not(InRange(Pts[II], 0, 5))) then
        begin
          srl_Warn('Login_SetAudio', 'Points must be between 0 and 5', warn_AllVersions);
          Continue;
        end;
        Tx := 337 + Round((425 - 337) * (Pts[II] - 1) / 4);
        Ty := Round(3.5 * II * II + 46.5 * II + 245);
        if (GetColor(Tx, Ty) <> 1121100) then
          Mouse(Tx + 2, Ty - 14, 0, 0, True);
        Wait(50);
      end;
      if (GetColor(337, 389) = 181) and (SMSetting = Stereo) then
        Mouse(421, 385, 10, 10, True)
      else
      if (GetColor(426, 389) = 181) and (SMSetting = Mono) then
        Mouse(332, 385, 10, 10, True);
      Wait(100);
      TypeByte(vk_Escape);
    end;

    {*******************************************************************************
    procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
    By: ZephyrsFury
    Description: Sets graphic options in the login screen.
    Use: Enter the desired Setting for the desired Option.
      Leave as 0 for no change of brightness and '' for no change in anything else.

      Parameter    Option                Setting
        Brightness   Brightness            1 - 4 (0 for no change)
        vl           Visible Levels        Current / All
        rr           Remove Roofs          Always / Selectively
        gd           Ground Decoration     Off / On
        td           Texture Detail        Low / High
        ia           Idle Animations       Few / Many
        fe           Flickering Effects    Off / On
        gt           Ground Textures       Few / Many
        cs           Chracter Shadows      Off / On

                        1   2   3   4
      Brightness:   <---o---o---o---o--->

    EG. Login_SetGraphics(2, 'current', '', 'off', 'low', 'few', '', 'few', 'off');

    For Autoing:
    Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    *******************************************************************************}


    procedure Login_SetGraphics(Brightness: Integer; vl, rr, gd, td, ia, fe, gt, cs: string);
    var
      Settings, PosSettings, OptionName: TStringArray;
      II, T, W, tCol, x, y, mSpeed: Integer;
      TB: TBox;
      P: TPoint;
    begin
      if (LoggedIn) then Exit;
      Settings := [vl, rr, gd, td, ia, fe, gt, cs];
      PosSettings := ['Current', 'All', 'Always', 'Selectively', 'Off', 'On', 'Low',
        'High', 'Few', 'Many', 'Off', 'On', 'Few', 'Many', 'Off', 'On'];
      OptionName := ['Visible levels', 'Remove roofs', 'Ground decoration', 'Texture detail',
        'Idle animations', 'Flickering effects', 'Ground textures', 'Character shadows'];
      TypeByte(vk_Escape);
      T := GetSystemTime;
      while (CountColor(7750, 346, 373, 416, 386) <> 119) and (GetSystemTime - T < 5000) do
        Wait(100);
      if (CountColor(7750, 346, 373, 416, 386) = 119) then
        MouseBox(321, 338, 443, 346, 1)
      else
        Exit;
      mSpeed := MouseSpeed;
      MouseSpeed := 25;
      Wait(100);
      if (Brightness > 4) then
        srl_Warn('Login_SetGraphics', 'Brightness must be between 0 and 4', warn_AllVersions)
      else
      if (Brightness <> 0) then
      begin
        P := Point(89 + (Brightness - 1) * 21, 266);
        if (GetColor(P.x, P.y) <> 1121100) then
          Mouse(P.x - 3, P.y - 17, 6, 6, True);
      end;
      for II := 0 to 7 do
      begin
        TB.x1 := 67 + 130 * ((II + 1) mod 5);
        TB.y1 := 245 + 60 * ((II + 1) div 5);
        TB.x2 := TB.x1 + 109;
        TB.y2 := TB.y1 + 15;
        if (not(InStrArrEx(Capitalize(Settings[II]), [PosSettings[II * 2], PosSettings[II * 2 + 1]], W))) then
        begin
          srl_Warn('Login_SetGraphics', 'Invalid Setting: ' + Settings[II] + ' for Option: ' + OptionName[II] + '.', warn_AllVersions);
          Continue;
        end;
        tCol := (W mod 2) * 16777088 + 127;
        if (not(FindColor(x, y, tCol, TB.x1, TB.y1, TB.x2, TB.y2))) then
        begin
          Mouse(TB.x1 + 10, TB.y1 + 3, 10, 7, True);
          if (FindColor(x, y, tCol, TB.x1, TB.y2 + 1, TB.x2, TB.y2 + 1 + 51)) then
            Mouse(x, y, 10, 7, True)
          else
            MouseBox(TB.x1 + 10, TB.y1 + 3, TB.x2 - 40, TB.y2 - 3, 1);
        end;
      end;
      Wait(100);
      TypeByte(vk_Escape);
      MouseSpeed := mSpeed;
    end;

    {*******************************************************************************
    procedure SetAudioOff;
    By: ZephyrsFury
    Description: Sets the Audio to off (1 for each bar). Works logged in and out.
    *******************************************************************************}


    procedure SetAudioOff;
    begin
      if (LoggedIn) then
        SetAudio(1, 1, 1, NoChange)
      else
        Login_SetAudio(1, 1, 1, NoChange);
    end;

    {*******************************************************************************
    procedure SetAutoingDefaults;
    By: ZephyrsFury
    Description: Sets the graphic options for best SRL compatibility. Works both logged in and out.
    *******************************************************************************}


    procedure SetAutoingDefaults;
    begin
      if (LoggedIn) then
        SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off')
      else
        Login_SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    end;

    {*******************************************************************************
    procedure Logout;
    By: Starblaster100 / Raymond
    Description: Logs you out.
    *******************************************************************************}


    function Logout: Boolean;
    var
      c, i: Integer;
    begin
      Result := (not (LoggedIn));
      if Result = True then
        Exit;
      if GameTab(14) = False then
        Exit;
      Wait(200 + Random(100));
      while (LoggedIn) and (c < 10) do
      begin
        Inc(c);
        if(ClickText('here', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
          for i := 0 to 10 do
          begin
            Wait(1000);
            if not(LoggedIn)then
            begin
              Result := True;
              Exit;
            end;
          end;
      end;
    end;

    {*******************************************************************************
    procedure LoginPlayer;
    By: SRL Developers
    Description: Logs in the Player[CurrentPlayer]. Detects most Client Login Errors
    *******************************************************************************}


    procedure LoginPlayer;
    var
      Mark, Attempts: Integer;
      Actions: TVariantArray;
      RetryLogin: Boolean;
    label
      ProcStart;
    begin
      ActivateClient;
      Wait(100);

      if (GetColor(212, 327) = 238301) then    //At Click To Play screen
      begin
        Wait(1000 + Random(3000));
        MouseBox(227, 337, 555, 364, 1);
        MarkTime(Mark);
        while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
          Wait(1000 + Random(1000));
      end;
      if (not(RSReady)) then
      begin
        MarkTime(Mark);
        while (not(RSReady)) do
        begin
          Wait(100);
          if (TimeFromMark(Mark) > 180000) then
          begin
            WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
            TerminateScript;
          end;
        end;
        WriteLn('Welcome to Runescape.');
      end;

      LoginScreenMusic(True);
      if (not(GraphicsSet)) then
      begin
        SetAutoingDefaults;
        GraphicsSet := True;
      end;
      ProcStart:

      if (not(LoggedIn)) then
      begin
        if (not(Players[CurrentPlayer].Active)) then
        begin
          WriteLn('Player is not Active...');
          NextPlayer(False);
          Exit;
        end;
        Wait(900 + random(60));

        //Click 'Log In' on main menu
        while (GetColor(343, 175) <> 7750) do
        begin
          MouseBox(360, 180, 400, 185, 1);
          Wait(100 + Random(100));
        end;

        //Type Username
        Mouse(315, 272, 10, 5, True);
        while (CountColor(7750, 311, 269, 452, 284) > 13) do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        for Mark := 0 to 3 do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        Wait(100 + Random(200));
        WriteLn(Capitalize(Players[CurrentPlayer].Name));
        TypeSend(Players[CurrentPlayer].Name);
        Wait(100+random(50));

        //Type Password
        Mouse(315, 334, 10, 5, True);
        while (CountColor(7750, 311, 337, 452, 352) > 13) do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        for Mark := 0 to 3 do
        begin
          KeyDown(vk_Back);
          Wait(10 + Random(10));
          KeyUp(vk_Back);
          Wait(50 + Random(50));
        end;
        Wait(100 + Random(200));
        TypeSend(Players[CurrentPlayer].Pass);
        Wait(500 + Random(300));

        if (not(FindTextTPA(12509695, 0, 288, 205, 475, 247, 'login', StatChars, Nothing))) then   //If 'enter' from typesend didn't log us in
        begin
          MouseBox(355, 359, 403, 372, 1);  //Click 'login' login screen
          Wait(250 + random(100));
        end;

        MarkTime(Mark);
        repeat
          SetLength(Actions, 0);

          if (TimeFromMark(Mark) > 60000) then
            Actions := ['One minute has passed...', 0, 2, 'NextPlayer', 'Login Failed']
          else
          case (CountColor(12509695, 288, 205, 475, 247)) of   //Number of text colour points
            //   Actions := ['WriteLn Text', TimeToWait, NumberOfRetries, 'FinalAction', 'PlayerStatus'];
            760: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'NextPlayer', ''];
            536: Actions := ['Login limit exceeded. Please wait 1 minute and try again.', 60000, 2, 'NextPlayer', ''];
            711: Actions := ['Your account has been disabled', 0, 0, 'NextPlayer', 'Acc Disabled'];
            598: Actions := ['Invalid Username \ Password', 0, 2, 'NextPlayer', 'Wrong User/Pass'];
            917: Actions := ['Not a Members Account', 0, 0, 'NextPlayer', 'Non-member'];
            408: Actions := ['World is full.', 5000, 20, 'Terminate', ''];
            623: Actions := ['Your account is already logged in', 5000, 0, 'RandomNextPlayer', ''];
            555: Actions := ['The Server is being updated.', 60000, 4, 'Terminate', 'Server Updating'];
            218: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
            335: Actions := ['Unable to connect Login Server offline.',(20000) + Random(6000), 4, 'Terminate', 'Login Server Offline'];
            512: Actions := ['RuneScape has been updated. Script Terminated.', 0, 0, 'Terminate', 'RS Updated'];
            489: Actions := ['Connection timed out.', 0, 4, 'Terminate', 'Connection Timed Out'];
            737: Actions := ['You are standing in a members-only area.', 0, 0, 'NextPlayer', 'In Mems-Only Area'];
            //10: Actions := ['Error loading your profile.', 5000, 10, 'NextPlayer', 'Profile Loading Failed']; // Error loading your profile. Will attempt to re-login 5 more times.)
            //11: Actions := ['Login server rejected session.', 1000, 10, 'NextPlayer', 'Login Serv. Rejected'];  // Login server rejected session.
          end;

          if (Length(Actions) > 0) then
          begin
            WriteLn(Actions[0]);
            Wait(Actions[1] + Random(100));
            if (Actions[2] <> 0) then
              if (Attempts < Actions[2]) or (Actions[2] = -1) then
              begin
                RetryLogin := True;
                Break;
              end;
            if (Actions[4] <> '') then
              Players[CurrentPlayer].Loc := Actions[4];
            case Actions[3] of
              'NextPlayer': NextPlayer(False);
              'RandomNextPlayer': RandomNextPlayer(True);
              'Terminate': TerminateScript;
            end;
            Exit;
          end;
          Wait(100);
        until(GetColor(212, 327) = 238301);

        if (RetryLogin) then
        begin
          RetryLogin := False;
          Inc(Attempts);
          goto ProcStart;
        end;

        if (GetColor(212, 327) = 238301) then
        begin
          Wait(1000 + Random(2000));
          MouseBox(227, 337, 555, 364, 1);
        end;
        MarkTime(Mark);
        while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
          Wait(1000 + Random(1000));
      end;

      if (LoggedIn) then
      begin
        PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
        if Length(Players[CurrentPlayer].NickTPA) < 2 then
        begin;
          Writeln('Creating the NickTPA.');
          if Players[CurrentPlayer].Nick <> '' then
            Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
          else
          begin;
            Writeln('Nickname isn''t set, taking the username instead..');
            Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Name, UpChars);
          end;
        end;
        AddToSRLLog('Current player: ' + Capitalize(Players[CurrentPlayer].Name));
      end;
    end;

    {*******************************************************************************
    procedure RandomNextPlayer(Active: Boolean);
    By: Dankness based on WT-Fawki's NextPlayer and modified by Ron and by Raymond
    Description: Picks Random Player that is Active and Logs in
    *******************************************************************************}


    procedure RandomNextPlayer(Active: Boolean);
    var
      LastPlayer: Integer;
    begin
      WriteLn('NextPlayer');
      LastPlayer := CurrentPlayer;
      Players[CurrentPlayer].Active := Active;
      Logout;
      PlayerCurTime := (GetSystemTime div 1000);
      Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
        ((PlayerCurTime - PlayerStartTime) / 60);
      repeat
        if (AllPlayersInactive) then Wait(60000);
        if (PlayersActive = 1) then Break;
        CurrentPlayer := Random(HowManyPlayers);
        Wait(100);
      until (Players[CurrentPlayer].Active) and (LastPlayer <> CurrentPlayer);
      SRL_Logs := SRL_Logs + 1;
      LoginPlayer;
    end;

    {*******************************************************************************
    procedure NextPlayer(Active: Boolean);
    By: Dankness and modified by Ron and by Raymond
    Description: Logs in the next player.
    Boolean: True - Current player is ok. False - Current player is false.
    *******************************************************************************}


    procedure NextPlayer(Active: Boolean);
    begin
      if RandomPlayer then
        RandomNextPlayer(Active)
      else
      begin
        WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
        Players[CurrentPlayer].Active := Active;
        Logout;
        PlayerCurTime := (GetSystemTime div 1000);
        Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
          ((PlayerCurTime - PlayerStartTime) / 60);
        CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
        while Players[CurrentPlayer].Active = False do
        begin
          CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
          if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
        end;
        SRL_Logs := SRL_Logs + 1;
        LoginPlayer;
      end;
    end;

    {*******************************************************************************
    procedure CheckUserNicks;
    By: Sumilion / Raymond
    Description: Checks if all nicks are set correct.
    *******************************************************************************}


    procedure CheckUserNicks;
    var
      CorrectString: string;
      i: Integer;
      Wrong : Boolean;
      Str : String;
    begin
      for i := 0 to HowManyPlayers - 1 do
      begin
        if (not(Players[CurrentPlayer].Active)) then Continue;
        Wrong := False;
        if (Players[i].Nick = '') then
        begin
          Wrong := True;
          Str := 'WARNING : Please fill in your nickname.';
        end;
        if (Players[i].Nick <> LowerCase(Players[i].Nick)) then
        begin
          Wrong := True;
          Str := 'WARNING : Please Uncapitalise your nickname.';
        end;
        if (pos(Players[i].Nick, LowerCase(Players[i].Name)) = 1) then
        begin
          Wrong := True;
          Str := 'WARNING : Dont use the first letter in your nick.';
        end;
        if (pos(' ', Players[i].Nick) > 0) then
        begin
          Wrong := True;
          Str := 'WARNING : Dont use spaces in your Nick.';
        end;
        CorrectString := Capitalize(Players[i].Name);
        if not (Pos(LowerCase(Players[i].Nick), CorrectString) > 0) then
        begin
          Wrong := true;
          Str := 'WARNING : Nick does NOT match the name.';
        end;
        if Wrong then
        begin;
          Writeln('--');
          Writeln(Str);
          if (Length(Players[i].Name) > 0) then
            Writeln('Warning occured with player : ' + Players[i].Name);
          Writeln('For more information, visit http://www.villavu.com/forum/showthread.php?t=5410');
        end;
      end;
    end;
    Quote Originally Posted by ham? View Post
    i didnt merder the fukin english language it im just talkin gangsta!!
    which none of u would no coz ur all fukin nerds

  8. #8
    Join Date
    Aug 2008
    Location
    NC
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks pool, worked flawlessly

  9. #9
    Join Date
    Apr 2007
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've got the same problem, ill se if any of these work when I get home from skl. thanks

  10. #10
    Join Date
    Apr 2007
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok good it worked! yay now i can run whatever I want! thanks a lot, how do I +rep?

  11. #11
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You press the little blue check mark on the upper right of a post

    ~Sir

  12. #12
    Join Date
    Nov 2008
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The login.scar is not the only thing you need to change, you need to download new CAResponder (may not have anything with the login.scar to do, but still) and Worlds.ini, but i don't know why it doesn't work for you to change the Login.scar.


    ~D-M

  13. #13
    Join Date
    Dec 2008
    Location
    England,United Kingdom
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you the 3rd login.scar worked fine for me i can now run all the scripts i have thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Not Logging In (changed Login file)
    By Queso in forum OSR Help
    Replies: 3
    Last Post: 07-08-2008, 03:38 PM
  2. Login functions not working
    By Metagen in forum OSR Help
    Replies: 4
    Last Post: 07-17-2007, 03:03 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
  •