SRL Archive - SRL Suggestions

LoggedIn fix


NCDS

2011-04-12 10:08:08

Almost seems like the RS client got smaller…

Anyways, here's the fixed LoggedIn: (Still checks for white text on Report Abuse button)

function LoggedIn: Boolean;
begin
Result := (GetColor(472, 490) = 16777215);
end;

There are still a few other things that need to be done, but I need to take a shower quick, then I'll get to them and post here.

New Gametab consts: (Added tab_FriendChat but left tab_Ignore to avoid breaking anything.)

const
tab_Combat = 21;
tab_Diary = 22;
tab_Task = 22;
tab_Stats = 23;
tab_Quest = 24;
tab_Inv = 25;
tab_Equip = 26;
tab_Prayer = 27;
tab_Magic = 28;
tab_Objectives = 29;
tab_Friends = 30;
tab_Ignore = 30;
tab_FriendChat = 31;
tab_Clan = 32;
tab_Options = 33;
tab_Emotes = 34;
tab_Music = 35;
tab_Notes = 36;
tab_LogOut = 37;

Sir R. M8gic1an

2011-04-12 10:15:18

From: NCDS
Almost seems like the RS client got smaller…

Anyways, here's the fixed LoggedIn: (Still checks for white text on Report Abuse button)

function LoggedIn: Boolean;
begin
//White text on Report Abuse Button
Result := (GetColor(472, 490) = 16777215);
end;

There are still a few other things that need to be done, but I need to take a shower quick, then I'll get to them and post here.


Just adding a line of comment.

~RM

NCDS

2011-04-12 10:47:24

The Gametab functions seem to still work fine. I've edited the first post with an updated list of consts for the tabs.

If anyone notices anything else that's broken feel free to post it here and I'll see what I can do. I'll continue to look around as well, but that's all I see right now.

Gu3st...

2011-04-12 11:56:21

What if we re-make the loggedin function so that it works in the tutorial too?
When you have to choose clothes for the character, that button is not visible

Icyx

2011-04-12 12:13:50

Hmm, this sort of works for me.
It detects me as logged in now, it just doesn't detect the tinderbox in my inventory anymore. (Using Ultimate Burner 0.2)

E: Script specific bug. My other scripts are working now. Thanks for the fix! :D

NCDS

2011-04-12 12:20:30

That would be script specific though as there is nothing to bot in Tut island, no?

I don't think something like that would need to be covered in SRL. Although, if it was just as accurate and quick then I don't see what it would hurt.

Just my opinion though.

Markus

2011-04-12 12:21:20

Ignore should be 30, not 31 because it's merged with friends.

Gu3st...

2011-04-12 12:21:30

From: NCDS
That would be script specific though as there is nothing to bot in Tut island, no?

I don't think something like that would need to be covered in SRL. Although, if it was just as accurate and quick then I don't see what it would hurt.

Just my opinion though.


But a lot of SRL's functions has a if not LoggedIn then exit; check in them and wont work on the tut

Echo_

2011-04-12 12:28:56

Thanks, I remember getting errors with LoggedIn when I was using the webclient. I'll test that script again when I get home ;)

NCDS

2011-04-12 12:33:57

From: Zyt3x
But a lot of SRL's functions has a if not LoggedIn then exit; check in them and wont work on the tut

I don't think there are any functions that check for loggedin that would be called during the part where the current LoggedIn function wouldn't work.

From: Markus
Ignore should be 30, not 31 because it's merged with friends.

Right, my bad. Changed it.

towinthiswar

2011-04-12 14:41:17

Sorry for another noob question, but where is the LoggedIn function for me to fix this? I've searched through all the includes and searched these forums, but haven't come up with an answer.

autoerforlife

2011-04-12 14:47:09

From: towinthiswar
Sorry for another noob question, but where is the LoggedIn function for me to fix this? I've searched through all the includes and searched these forums, but haven't come up with an answer.

login:
simba/includes/SRL/SRL/core/login.scar
gametab:
simba/includes/SRL/SRL/core/gametab.scar

works fine thanks:D

towinthiswar

2011-04-12 14:50:54

From: autoerforlife
login:
simba/includes/SRL/SRL/core/login.scar
gametab:
simba/includes/SRL/SRL/core/gametab.scar

works fine thanks:D


Haha I literally just found it right before you replied. Thanks for the quick response though! Now let's see if I can get this bad boy working.

HarryJames

2011-04-12 15:05:03

I found the loggedIn in players.scar

simba/includes/SRL/SRL/core/players.scar

Not sure why it doesn't match yours?

YoHoJo

2011-04-12 15:21:48

From: HarryJames
I found the loggedIn in players.scar

simba/includes/SRL/SRL/core/players.scar

Not sure why it doesn't match yours?


THANK YOU! I couldn't find it!

HarryJames

2011-04-12 15:35:39

/blame lordsaturn

Coh3n

2011-04-12 15:47:26

For any of you who couldn't find a function, use Simba's function list search feature! YoHoJo, I think I've told you this a few times. :p All you have to do is have SRL included in the script that's open and search the function in the search bar at the bottom of the function list. When it pops up, double click it and the file will open.

Also, committed. Thanks!

autoerforlife

2011-04-12 18:11:15

From: HarryJames
I found the loggedIn in players.scar

simba/includes/SRL/SRL/core/players.scar

Not sure why it doesn't match yours?


Oh i guess i made a mistake in my post:duh: so login must be players:o

Coh3n

2011-04-12 19:53:51

That's reflection, has nothing to do with this thread. You should post about it in the Reflection section.

Bixby Sayz

2011-04-13 19:52:35

I am getting some truly bizarre behavior since the update. I am now getting this error when banking:

** Warning in GameTab: GameTab 25 is not a valid tab number.**


I narrowed it down to the routine InvCount when it sets the gametab.

But if I call InvCount directly as a test, no error. How can it both exhibit the behavior, and not depending on where it's called from?

Think I might reinstall.

Edit: Found the issue. this:
    Gametab(tab_Inv);
needs to be changed to this in a zillion places:
 if not BankScreen then
Gametab(tab_Inv);
I was not getting the message prior to the latest update, so I assume the Inventory Tab icon stayed visible when the bank screen was open prior to the update? The issue does not occur when in the Enter Pin screen.

Coh3n

2011-04-14 00:22:55

From: Bixby Sayz

I was not getting the message prior to the latest update, so I assume the Inventory Tab icon stayed visible when the bank screen was open prior to the update? The issue does not occur when in the Enter Pin screen.

I'm almost positive the tab showed, but I guess I'm wrong.

Perhaps try adding something like this to gameTab itself:

if (i = TAB_INV) then
if (bankScreen) then
exit;