SRL Archive - Bugs

R_LoggedIn


Press Play

2010-07-12 03:46:46

{*******************************************************************
Function LoginIndex: Integer;
By:
Description: Uses the LoginIndex hook.
2 = Logged Out, 4 = Logging Into Lobby, 6 = Lobbby,
8 = logging into game, 9 = Logged In. Reaches 10 at
some points, but with no significance.

********************************************************************}


I've been having trouble with R_LoggedIn. It has been returning false even though I'm logged in. I suggest changing it to:
{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex >= 9);
end;

Although I don't know what the integers above 9 represent so I can't be sure if it would be accurate. This is what I'm using at the moment.
Maybe this could be looked into further by one of the devs?

Thanks:) hope this helps

JPHamlett

2010-07-12 16:00:59

The 9 represents the integer returned by the loginindex hook and judging by that you can tell if your player is login or not

to figure out the number you have to look at the RS client to figure out the number

This is the code from the client for loginindex


{
super.a(-17312, "js5connect_outofdate");
fp.w = 14;
return;
}

Now if you look at


fp.w = 14;


then that tells you that the R_loggedin should be


{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex = 14);
end;

but RSBOt has it as


{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex = 10 or 11);
end;

so id go with rsbots way of doing it

i luffs yeww

2010-07-12 16:06:58

Why does R_LoggedIn (I'm sure others do, too) use 14 instead of the actual hook? It would make much more sense to something like


{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex = HOOK_LOGGED_IN);
end;

or something. I don't see why that wouldn't work.

Also, why are there three people who made LoggedIn? :p Seems silly to me. It's not like it took three people to figure out the hook (or was there?) :p.

JPHamlett

2010-07-12 16:30:46

From: i luffs yeww
Why does R_LoggedIn (I'm sure others do, too) use 14 instead of the actual hook? It would make much more sense to something like


{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex = HOOK_LOGGED_IN);
end;

or something. I don't see why that wouldn't work.

Also, why are there three people who made LoggedIn? :p Seems silly to me. It's not like it took three people to figure out the hook (or was there?) :p.


Well Drags just kinda put his name on all of the functions in reflection even ones he didnt change and IDK abut the other too

And the reason why


{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex = HOOK_LOGGED_IN);
end;

wont work is because there is no hook for HOOK_LOGGED_IN cause if you look at the actual client there isnt a hook to figure out if your loggin in they do exactly what we do just in their coding language

Method

2010-07-12 16:37:15

From: J_Pizzle
…


Please learn what you're talking about before suggesting something as silly as this.

HyperSecret

2010-07-12 16:39:13

From: i luffs yeww

Also, why are there three people who made LoggedIn? :p Seems silly to me. It's not like it took three people to figure out the hook (or was there?) :p.


Haha that is funny. Some people just want to have their name in the include somewhere. Method was the one who originally made the function but the other two maybe editted a variable or something stupid like that and wanted their name there so they added it.

JPHamlett

2010-07-12 16:45:50

From: Method
Please learn what you're talking about before suggesting something as silly as this.



Is there a HOOK_LOGGED_IN or w/e leffs yew posted or was it something else


jsut quoteing me and putting … doesn't help me learn what i said wrong

MylesMadness

2010-07-12 16:46:50

From: Method
Please learn what you're talking about before suggesting something as silly as this.
He didn't suggest anything…

Method

2010-07-12 16:58:54

From: MylesMadness
He didn't suggest anything…


It sure looks to me like he suggested comparing the game state field to the number 14 to determine if the client is logged in without knowing that the number 14 has nothing to do with being logged in or not.

MylesMadness

2010-07-12 17:24:50

From: Method
It sure looks to me like he suggested comparing the game state field to the number 14 to determine if the client is logged in without knowing that the number 14 has nothing to do with being logged in or not.
Oh, I though you were referring to the post above yours. I'm sorry

TRiLeZ

2010-07-12 18:05:56

Here's what I came up with:
  • 1, 2: Initial Loading of the Client
  • 3: Login Screen
  • 5: Logging In
  • 7: Lobby
  • 9: Entering RuneScape from the Login/Lobby
  • 10: Logged In
  • 11: Loading new Region
  • 14: Error loading Client
  • Others: Unknown

Press Play

2010-07-12 18:59:28

So, should the function be:
{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := (LoginIndex >= 9) and (not (LoginIndex =14));
end;

does that even work? :S I'm not sure if you can do that. Otherwise:
{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
if (LoginIndex >= 9) and (not (LoginIndex = 14)) then
Result := True;
end;

It also depends on whether we want to include '9' or not.

Method

2010-07-12 23:15:54

{*******************************************************************
Function R_LoggedIn: Boolean;
By: Method / Drags111 / Zyt3x
Description: Returns true if you're logged in.
********************************************************************}
function R_LoggedIn: Boolean;
begin
Result := LoginIndex = 10 or LoginIndex = 11;
end;

i luffs yeww

2010-07-13 02:07:08

I know there's no "HOOK_LOGGED_IN." >_> Of course there's not. But why can't we have a function for associating each constant/variable with Hooks.simba?