Results 1 to 10 of 10

Thread: Having problems with LoggedIn

  1. #1
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Having problems with LoggedIn

    I'm running SCAR 3.21 and the latest SRL Dev revision, LoggedIn is returning false some times when it shouldn't causing mass chaos in my scripts :S

    is anyone else experiencing this or a have a good quick fix/alternative for this?

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

    Default

    Working for me
    SCAR Code:
    function LoggedIn: Boolean;
    var
      cx, cy: Integer;
    begin
      Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
    end;
    Just for comparing.

  3. #3
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Seems to work but I'm still getting havoc in my script.... ughh this just doesn't seem possible how this is happening. Maybe it only fails rarely??

    I think it's because when you get a SMART white screen thing it picks you up as being logged in.

  4. #4
    Join Date
    Sep 2008
    Location
    Chicago
    Posts
    224
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It really should have a failsafe in my opinion. Maybe something like this:

    Code:
    function LoggedIn: Boolean;
    var
      cx, cy, i: Integer;
    begin
      for i:=0 to 2 do
      begin
        Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
        if Result then
          exit;
        Wait(250);
      end;
    end;

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Heysus View Post
    It really should have a failsafe in my opinion. Maybe something like this:

    Code:
    function LoggedIn: Boolean;
    var
      cx, cy, i: Integer;
    begin
      for i:=0 to 2 do
      begin
        Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
        if Result then
          exit;
        Wait(250);
      end;
    end;
    That and it's the same color as WHITE which is extremely common to be picked up falsely by lag or by SMART's annoying white screen... I think the color should be changed to the red part of the report button and have that wait in there.... this is causing mass havoc in certain scenarios.

    I made this

    SCAR Code:
    {*******************************************************************************
    function LoggedIn: Boolean;
    By: IceFire908.
    Description: Detects if you're logged in and compensates for white screen lag,
    general lag, and false detections.
    *******************************************************************************}


    function LoggedIn: Boolean;
    var
      P: TPoint;
      I: Byte;
    begin
      for I := 1 to 10 do
      begin
        Result := FindColor(P.X, P.Y, 2302834, 404, 481, 514, 502);
        if (not (Result)) then
          Result := FindColor(P.X, P.Y, 3816406, 404, 481, 514, 502);
        if (Result) then
          Exit;
        Wait(200);
      end;
    end;

  6. #6
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function PlayerLoggedIn : Boolean;
    var
      i : Integer;
    begin
      i := GetMe.Combat
      if i <> 0 then Result := True;
    end;

    I made this after LoggedIn kept on screwing up my scripts. havent had an issue since :P
    Lance. Da. Pants.

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by lancerawks aka Lance View Post
    SCAR Code:
    function PlayerLoggedIn : Boolean;
    var
      i : Integer;
    begin
      i := GetMe.Combat
      if i <> 0 then Result := True;
    end;

    I made this after LoggedIn kept on screwing up my scripts. havent had an issue since :P
    That only works for reflection, and if you're using reflection, you might as well use R_LoggedIn.

  8. #8
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    truee.... but i like the feeling of achevement you get when you make something that works :L
    Lance. Da. Pants.

  9. #9
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lancerawks aka Lance View Post
    truee.... but i like the feeling of achevement you get when you make something that works :L
    ummm

    Code:
    function PlayerLoggedIn : Boolean;
    begin
      Result := (GetMe.Combat > 0);
    end;
    why did you put a variable in there?

    Hybrid ftw

    Code:
    function PlayerLoggedIn : Boolean;
    begin
      Result := (GetMe.Combat > 0);
      if (not (Result)) then
        Result := LoggedIn;
    end;

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

    Default

    Quote Originally Posted by IceFire908 View Post
    ummm

    Code:
    function PlayerLoggedIn : Boolean;
    begin
      Result := (GetMe.Combat > 0);
    end;
    why did you put a variable in there?

    Hybrid ftw

    Code:
    function PlayerLoggedIn : Boolean;
    begin
      Result := (GetMe.Combat > 0);
      if (not (Result)) then
        Result := LoggedIn;
    end;
    Quote Originally Posted by senrath View Post
    That only works for reflection, and if you're using reflection, you might as well use R_LoggedIn.
    Please, this.
    :-)

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
  •