Results 1 to 9 of 9

Thread: Logout fixed

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default Logout fixed

    This will fully log out the player. I just added a GetColor/Mouse for the big X in the lobby. I also edited the ClickText from 'here' to 'obby'. I'm assuming I don't have the explain why.

    It can be further edited with a Boolean parameter to determine whether to fully logout, or just go to the lobby (would be useful for breaking and such). I didn't do this because I didn't know how many times Logout is used throughout SRL. I didn't want to cause a bunch of compiling errors.

    SCAR Code:
    function Logout: Boolean;
    var
      c, i: Integer;
    begin
      Result := (not (LoggedIn));
      if Result = True then
        Exit;
      if (SRL_Procs[srl_OnLogOut] <> nil) then
        SRL_Procs[srl_OnLogOut]();
      if GameTab(tab_LogOut) = False then
        Exit;
      Wait(200 + Random(100));
      while (LoggedIn) and (c < 10) do
      begin
        Inc(c);
        if(ClickText('obb', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
          for i := 0 to 10 do
          begin
            Wait(1000);
            if not(LoggedIn)then
              if (GetColor(688, 34) = 6388871) then // here :)
              begin
                Mouse(688, 34, 12, 12, True);
                Result := True;
                Exit;
              end;
          end;
      end;
    end;

    Comments?
    Last edited by Wanted; 03-10-2010 at 07:02 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    This will fully log out the player. I just added a GetColor/Mouse for the big X in the lobby. It can be further edited with a Boolean parameter to determine whether to fully logout, or just go to the lobby (would be useful for breaking and such). I didn't do this because I didn't know how many times Logout is used throughout SRL. I didn't want to cause a bunch of compiling errors.

    SCAR Code:
    function Logout: Boolean;
    var
      c, i: Integer;
    begin
      Result := (not (LoggedIn));
      if Result = True then
        Exit;
      if (SRL_Procs[srl_OnLogOut] <> nil) then
        SRL_Procs[srl_OnLogOut]();
      if GameTab(tab_LogOut) = False then
        Exit;
      Wait(200 + Random(100));
      while (LoggedIn) and (c < 10) do
      begin
        Inc(c);
        if(ClickText('obb', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
          for i := 0 to 10 do
          begin
            Wait(1000);
            if not(LoggedIn)then
              if (GetColor(688, 34) = 6388871) then // here :)
              begin
                Mouse(688, 34, 12, 12, True);
                Result := True;
                Exit;
              end;
          end;
      end;
    end;

    Comments?
    looks good, and I was thinking the same thing for (my version of) LogInPlayer, I have it always log the player completely out before it logs in again, even if its the same player so compiling issue's don't arise.
    “Ignorance, the root and the stem of every evil.”

  3. #3
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    looks good, and I was thinking the same thing for (my version of) LogInPlayer, I have it always log the player completely out before it logs in again, even if its the same player so compiling issue's don't arise.
    Exactly, if need be, other lobby functions can be made. It would be better for single player breaking, but I'll leave that up to the Dev's to decide. I'm sure they just want the logging in working before worrying about new functions.

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Lol, that was s useless post as you already had my attention from Blumblebee's thread. Again, I posted my thoughts.

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    I would like to have a ExitToLobby; procedure

  7. #7
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    I would like to have a ExitToLobby; procedure
    Update your srl, There is one!

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  8. #8
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    Update your srl, There is one!
    OH! Thanks

  9. #9
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    OH! Thanks
    Theres also a new function
    SCAR Code:
    // * function AtLobbyScreen: Boolean;                                       // * by Dgby714

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

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
  •