Results 1 to 9 of 9

Thread: Srl function

  1. #1
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default Srl function

    Hello, on "login.scar"... for function "LoginPlayer"... where can I enter my username and password.

    cant find where to enter these.

    On otherspecs function "LoginPlayerToLob" clearly states enter username and enter password.

    [Im barely writing scripts with SRL]
    [Ive gotten the basics down but i really want to use the most out of SRL]
    [Ive been off and on programming with SCAR for around 2.5 years]
    {2.5 lol}
    {(around 30 months) \\off and on [[30%off...]]}
    ---do the math---im no master---

  2. #2
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You must use the function, Declare players.
    This is where you fill in your details.

    Simba Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name := 'Username';
        Pass := 'Password';
        Nick := 'Nickname'; // Three/Four letters of your name
        Active := True;
      end;
    end;
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  3. #3
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program logIn;
    {$i SRL/SRL.scar}

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

      with Players[0] do
      begin
        Name := 'Username';
        Pass := 'Password';
        Nick := 'Nickname'; // Three/Four letters of your name
        Active := True;
      end;
    end;

    begin
    SetupSRL;
    DeclarePlayers;
    LogInPlayer;
    end.

    You need to use a declare function
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  4. #4
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    thanks uhm which file name is this just because i like knowing where to look for reference...

    for example the LoginPlayer function was found in file login.scar

    (!please?)

    like is this SRL or just something you have to know
    well it can be both but mainly SRL?
    Last edited by wantonman; 04-17-2011 at 09:51 AM.

  5. #5
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    It's a script. Scripts use the files inside the SRL include. The files in the SRL Include are not stand alone scripts - they are a library of functions used to create scripts.

  6. #6
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    well thanks for helping me out with that script its 3 a.m. so im acting fishy lol...

  7. #7
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, you have to use the code i posted in your script but it uses login.scar
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  8. #8
    Join Date
    Feb 2009
    Location
    AZ, USA
    Posts
    460
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't have to use any function called "DeclarePlayers", that's just what most people call it. You just need to call NumberOfPlayers(somenumber) and then declare the usernames, passwords, etc under the Players variable(s), and most people choose to have that in a procedure called DeclarePlayers at the beginning of the script..
    Is your account in an old-school random? Help SRL-OSR solve randoms!

  9. #9
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Ah I see, I found the NumberOfPlayers function in the players.scar file. now i assume that I still would need to use the LoginPlayer function after Ive declarerd my player.

    with that being said im thinking that the LoginPlayer function will use the NumberOfPlayers funtion for its username and password correct me if im wrong...



    MR.TROLL ive enterd your script exactly as you have it filled it out completly but smart doesnt log in instead just sits there

    update: by adding RSReady; everything works... cool noice

    my undestanding of SRL went up 2%
    Last edited by wantonman; 04-17-2011 at 08:40 PM.

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
  •