Results 1 to 6 of 6

Thread: Why is srl in thread different than svn?

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default Why is srl in thread different than svn?

    The login.scar from svn (line 439-580)
    SCAR Code:
    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
        Wait(500);

        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');
        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
        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;


    login.scar from thread (line 439-593)
    SCAR Code:
    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
        Wait(500);

        T := GetSystemTime;
        while (not(FindColor(Tx, Ty, 0, 8, 458, 45, 470))) and (GetSystemTime - T < 5000) do
          Wait(100);
        if (FindColor(Tx, Ty, 0, 8, 458, 45, 470)) then
          if (not(FindTextTpa(0, 0, 7, 457, 137, 475, Players[CurrentPlayer].Nick, SmallChars, Nothing))) then      //Double check if logged in player is what we think it is
          begin
            WriteLn('Logged In Player is not in Players array.');
            LogOut;
            Wait(1000 + Random(1000));
            LoginPlayer;
            Exit;
          end;

        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');
        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
        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;


    Oh Hai Dar

  2. #2
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The only difference I see is this bit.

    SCAR Code:
    T := GetSystemTime;
        while (not(FindColor(Tx, Ty, 0, 8, 458, 45, 470))) and (GetSystemTime - T < 5000) do
          Wait(100);
        if (FindColor(Tx, Ty, 0, 8, 458, 45, 470)) then
          if (not(FindTextTpa(0, 0, 7, 457, 137, 475, Players[CurrentPlayer].Nick, SmallChars, Nothing))) then      //Double check if logged in player is what we think it is
          begin
            WriteLn('Logged In Player is not in Players array.');
            LogOut;
            Wait(1000 + Random(1000));
            LoginPlayer;
            Exit;

    It should be fine, because That little snippit of code was causing some people problems, so they opted to just delete it. Perfectly fine.
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  3. #3
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    but the thing is, when I started to use scar again (after a 3 month break) I installed srl 20 (which is the one with out the login player array) and the problem is there, so I had to download the one on the thread and remove it.
    Oh Hai Dar

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by M_A_I_N_FTW View Post
    but the thing is, when I started to use scar again (after a 3 month break) I installed srl 20 (which is the one with out the login player array) and the problem is there, so I had to download the one on the thread and remove it.
    Some people experience the error and others do not. For example, the one from revision 20 works fine for me, so i use it as-is. Other people have to use the modified one for some reason. Use whichever works for you.
    :-)

  5. #5
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    http://freddy1990.com/snapshots/srl/
    Guaranteed to be the same as SVN.

  6. #6
    Join Date
    May 2008
    Posts
    266
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I never had to download any fix from thread. Well whatever works for you!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Yet another Sig Thread!
    By SonOfSheep in forum Graphics and Multimedia
    Replies: 7
    Last Post: 08-21-2008, 11:29 PM
  2. The If..Then Thread!
    By R0b0t1 in forum The Bashing Club / BBQ Pit
    Replies: 32
    Last Post: 12-03-2007, 04:06 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
  •