SRL Archive - SRL Archives

OnWelcomeScreen ~ Players.scar


TRiLeZ

2009-07-08 12:06:49

I just built a new function that would find if your on the Login Screen.
It will return true if you are on the Login Screen.
I know that there is a function called RSReady but that returns true if your on the Login Screen or LoggedIn. What about if your just on the Login Screen?

My function is also more accurate than RSReady because RSReady just finds purple (4038981) at 520, 146. If there is purple there in the MS while your logged in, it may think your on the on the welcome screen when your in game but that works with the function.

My function finds orange (3102893) in 745, 93 and 746, 94 which would be somewhere between the run energy button and the prayer button where if you were logged in, it would be brown.

Here is my function:

{*******************************************************************************
function OnLoginScreen: Boolean;
By: TRiLeZ
Description: Returns True if on Welcome Screen.
*******************************************************************************}

function OnLoginScreen: Boolean;
var
cx, cy: Integer;
begin
Result:= FindColor(cx, cy, 3102893, 745, 93, 746, 94);
end;

Edit: Oops, I put on WelcomeScreen as the title, could a MOD please change that to OnLoginScreen?

ZephyrsFury

2009-07-08 12:34:14

From: TRiLeZ
My function is also more accurate than RSReady because RSReady just finds purple (4038981) at 520, 146. If there is purple there in the MS while your logged in, it may think your on the on the welcome screen when your in game but that works with the function.


I like that. Thats part of being a good scripter - thinking about all situations where your function could fail. :)

Anyway where would this be useful? I can't really think of anything. RSReady is useful for waiting until the RS client or SMART has fully loaded so its more useful.

Also even if the purple (I remember picking a green colours though :S) was detected in the mainscreen, it would still return true to indicate RS was ready for autoing.

TRiLeZ

2009-07-08 12:38:32

From: ZephyrsFury
I like that. Thats part of being a good scripter - thinking about all situations where your function could fail. :)

Anyway where would this be useful? I can't really think of anything. RSReady is useful for waiting until the RS client or SMART has fully loaded so its more useful.

Also even if the purple (I remember picking a green colours though :S) was detected in the mainscreen, it would still return true to indicate RS was ready for autoing.


RSReady is the only function that checks if your on the login screen so people could say to just use that instead of this.