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?
Printable View
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?
Working for me :)
Just for comparing.SCAR Code:function LoggedIn: Boolean;
var
cx, cy: Integer;
begin
Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
end;
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.
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;
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
truee.... but i like the feeling of achevement you get when you make something that works :L
ummm
why did you put a variable in there? :confused:Code:function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
end;
Hybrid ftw
Code:function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
if (not (Result)) then
Result := LoggedIn;
end;