View Full Version : Having problems with LoggedIn
Wanted
08-20-2009, 11:54 PM
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?
Zyt3x
08-20-2009, 11:59 PM
Working for me :)
function LoggedIn: Boolean;
var
cx, cy: Integer;
begin
Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
end;
Just for comparing.
Wanted
08-21-2009, 12:09 AM
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.
Heysus
08-21-2009, 12:22 AM
It really should have a failsafe in my opinion. Maybe something like this:
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;
Wanted
08-21-2009, 12:28 AM
It really should have a failsafe in my opinion. Maybe something like this:
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
{************************************************* ******************************
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;
Lance
08-21-2009, 06:31 AM
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
senrath
08-21-2009, 06:41 AM
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.
Lance
08-21-2009, 09:06 AM
truee.... but i like the feeling of achevement you get when you make something that works :L
Wanted
08-21-2009, 09:10 AM
truee.... but i like the feeling of achevement you get when you make something that works :L
ummm
function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
end;
why did you put a variable in there? :confused:
Hybrid ftw
function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
if (not (Result)) then
Result := LoggedIn;
end;
Method
08-21-2009, 10:50 AM
ummm
function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
end;
why did you put a variable in there? :confused:
Hybrid ftw
function PlayerLoggedIn : Boolean;
begin
Result := (GetMe.Combat > 0);
if (not (Result)) then
Result := LoggedIn;
end;
That only works for reflection, and if you're using reflection, you might as well use R_LoggedIn.
Please, this.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.