SRL Archive - Help

Loss of SRL Focus?


Harry

2007-08-27 10:22:16

Does IE/your RS client seem to lose focus (not being able to type on rs on the login window)? Well, Sumilion told me about a way to fix it, you need to go to Login.scar, Line 105, should be procedure LoginPlayer;, replace it with this one:


{*******************************************************************************
procedure LoginPlayer;
By: WT-Fakawi
Description: Logs in the Player[CurrentPlayer]. Detects most Client Login Errors
*******************************************************************************}

procedure LoginPlayer;
var
ClickHereToPlay, x, y, tx, ty,
CHx, CHy, c, tmpMask, LastPlayer, Mark: Integer;
begin

ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
if (not (LoggedIn)) then
begin
// Beginning player not active...
if (not (Players[CurrentPlayer].Active)) then
begin
WriteLn('Current player is not Active...');
LastPlayer := CurrentPlayer;
repeat
CurrentPlayer := Random(HowManyPlayers);
Wait(100);
until (Players[CurrentPlayer].Active);
end;
x := 150;
y := 173;
FindWindowBySize(766, 504);
Wait(1000);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);
tmpMask := CreateBitmapMaskFromText('Username', upchars);
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
begin
Wait(25 + Random(50));
Mouse(x + 24, y + 3, 3, 0, True);
Wait(25 + Random(50));
WriteLn(Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
Mouse(327, 272, 0, 0, True);
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
end;
ClickOption('Login', 1);
// Waiting for Connecting to Server...
MarkTime(Mark);
while FindText(tx, ty, '...', upchars, 240, 180, 530, 240) do
begin
Wait(100);
if TimeFromMark(Mark) > 20000 then Break;
end;
MarkTime(Mark);
repeat
Wait(1000);
// Enter your username and password. If all failed...
if FindText(tx, ty, 'nter you', upchars, 240, 180, 530, 240) then
begin
WriteLn('Enter your username and Password');
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Your account is already logged in.
if FindText(tx, ty, 'lready', upchars, 240, 180, 530, 240) then
begin
WriteLn('Your account is already logged in');
LastPlayer := CurrentPlayer;
repeat
CurrentPlayer := Random(HowManyPlayers);
Wait(100);
until (Players[CurrentPlayer].Active) and (CurrentPlayer <> LastPlayer);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Invalid Username. 3 attempts. If fails, you haven't set your username/pass correct
if FindText(tx, ty, 'nvalid', upchars, 240, 180, 530, 240) then
begin
WriteLn('Invalid Username.');
SRL_Attempts := SRL_Attempts + 1;
if SRL_Attempts > 3 then
begin
Players[CurrentPlayer].loc := 'L/P ERROR';
NextPlayer(False);
end;
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Login attempts exceeded. Please wait 1 minute and try again.
if FindText(tx, ty, 'excee', upchars, 240, 180, 530, 240) then
begin
WriteLn('Login attempts exceeded. Please wait 1 minute and try again.');
Wait(60000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// World is full.
if FindText(tx, ty, 'full', upchars, 240, 180, 530, 240) then
begin
WriteLn('World is full.');
Wait(3000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Unable to connect. Login Server offline.
if FindText(tx, ty, 'offl', upchars, 240, 180, 530, 240) then
begin
WriteLn('Unable to connect Login Server offline.');
Wait((6000) + Random(6000));
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Error Connecting.
if FindText(tx, ty, 'rror', upchars, 240, 180, 530, 240) then
begin
WriteLn('Error Connecting.');
Wait(10000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Error loading your profile. Will attempt to re-login 5 more times.)
if FindText(tx, ty, 'ontact', upchars, 240, 180, 530, 240) then
begin
WriteLn('Error loading your profile.');
Wait(2000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Login server rejected session.
if FindText(tx, ty, 'reject', upchars, 240, 180, 530, 240) then
begin
WriteLn('Login server rejected session.');
Wait(1000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Runescape has been updated.
if FindText(tx, ty, 'reload', upchars, 240, 180, 530, 240) then
begin
WriteLn('ERROR. RuneScape has been updated. Script Terminated.');
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
TerminateScript;
end else
// The Server is being updated. Please wait 1 minute.
if FindText(tx, ty, 'updat', upchars, 240, 180, 530, 240) then
begin
WriteLn('The Server is being updated.');
Wait(60000);
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end else
// Your account has been disabled.
if FindText(tx, ty, 'disabled', upchars, 420, 180, 500, 220) then
begin
WriteLn('Your account has been disabled');
Players[CurrentPlayer].loc := 'DISABLED';
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
NextPlayer(False);
Exit;
end else
// Waiting for Profile to be Transferred
if FindText(tx, ty, 'trans', upchars, 240, 180, 530, 240) then
begin
WriteLn('Waiting for your Profile to be Transferred');
Wait(2500);
end else
// You need a Members account...
if FindText(tx, ty, 'member', upchars, 240, 180, 530, 240) then
begin
WriteLn('You need a Members account...');
Players[CurrentPlayer].loc := 'Non-Member';
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
NextPlayer(False);
end else
// Welcome to RuneScape. If all failed...
if FindText(tx, ty, 'elcom', upchars, 240, 180, 530, 240) then
begin
WriteLn('Welcome.');
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
LoginPlayer;
Exit;
end;

if TimeFromMark(Mark) > 180000 then
begin
WriteLn('three minutes have passed');
WriteFileString(TheFile, Chr(13) + 'THREE MINUTES HAVE PASSED!!!' +
Chr(13));
{ if (FindClient) then
FindWindowBySize(766, 504); }
ActivateClient;
ClickOption('Cancel', 1);
ClickOption('Exist', 1);
end;
until (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390,
5)) or FindColor(CHx, CHy, 723587, 555, 10, 575, 30);
Wait(1000 + Random(500));
if (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5)) then
Mouse(CHx, CHy, 50, 20, True) else Writeln('Found Compass'); // Clicks randomly on the button
repeat
Wait(1000);
c := c + 1;
until (LoggedIn) or (c >= 600);
end;
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
if LoggedIn then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
if NickNameBMP <> 0 then
FreeBitmap(NickNameBMP);
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick,
upchars); // Screenname

{ if(usenewrespond)then
AutoText[3].Trigger[0]:=Players[CurrentPlayer].Nick; }

WriteFileString(TheFile, Chr(13) + UpperCase(Players[CurrentPlayer].Name) +
Chr(13)); //* Save NAME to file
end;
end;

If you can not find out where to put this, then just live with your SRL you got, all that really changed was ActivateClient; to FindWindowBySize(766, 504); .

Sticky might be nice, I have seen a lot of people with this error :D

-Harry

the scar noob

2007-08-27 14:26:18

lol thanks, i had that problem too until today when i downloaded FireFox :)

Bourdou!

2007-08-27 14:43:28

That is why firefox is bomb ;)

newb cheater

2007-08-29 08:34:49

Thank you, Been looking for a way to fix this.

THANKS A LOT MUCH APPRECIATED!!

star troop69

2007-09-01 06:08:59

thanks alot, well deseved sticky.

Rikje

2007-09-01 16:08:40

Thx for posting fix :)

mat_de_b

2007-09-01 17:11:38

Cant you just use SCSS?

Birfday_Cake

2007-09-01 20:06:10

[Offtopic] mat_de_b… you post a lot lol. Your longevity is small, like mine. But you have a LOT of posts lol. 6.52 per day. And you've only been here for 23 days.. Unless you were here before and just made a new account cause you were banned or something. [/Offtopic]

Yes! Thank you so much this… I downloaded firefox to fix it, but I hate it.

Thanks :)

Harry

2007-09-01 20:37:50

I hate FireFox too, I use it for browsing, but for macroing…. it is a no-no :p I say this mostly because of those 'Firefox updates' they have sometimes, they will pop up and cover RS window :$

jhildy

2007-09-01 22:47:51

[offtopic]I HATE THOSE FREAKING UPDATE THINGS[/offtopic]
sorry for caps

yea thats great i think it should be stickied until there is an appropriate fix out for it. I auto on vmware SCSS and it works fine.

Harry

2007-09-01 22:59:06

@jhildy: Here is fix to the updated 'problem':


// Runescape has been updated.
if FindText(tx, ty, 'reload', upchars, 240, 180, 530, 240) then
begin
WriteLn('ERROR. RuneScape has been updated. Script Terminated.');
FreeBitmap(tmpMask);
FreeBitmap(ClickHereToPlay);
//TerminateScript;
repeat
Wait(300);
until(IsKeyDown('g'));
FindRS;
LoginPlayer;
Exit;
end else

Just pop into lines 261-274 :D then when JagSex updates the game, you will just have to: 1. re open rapescune, hold down the key g (or whatever you specify in until(IsKeyDown('g')); ) for a few seconds, then your script will run again :D

Nose Smasher

2007-09-02 00:08:28

Awesome. I love the power of the Search button… Thank you.


Jus a question - do you guys think IE or FireFox is better for auto-ing?? Or another client?

Dudenow12

2007-09-02 20:30:50

From: nose_smasher

Just a question - do you guys think IE or FireFox is better for auto-ing?? Or another client?


I use SCSS cause its doesn't use as much memory. Also, I think WT-Fawaki likes SCSS cause he suggests to use it when using some of his scripts

mickaliscious

2007-09-02 21:25:23

I can never get SCSS to work but its probably only because of my piece of junk computer.

1qaz

2007-09-02 22:25:26

Sweet ty i needed this but i use SCSS cuz that works fine lol

belgin fish

2007-09-03 10:39:43

thanks man! this is great know i know how to get it to work :D

cptn

2007-09-03 14:43:19

Ty! no more errors in my scripts

John55

2007-09-03 19:40:56

Thanks a lot, my screen would always get messed up.

inkd

2007-09-05 20:17:28

From: hy71194
I hate FireFox too, I use it for browsing, but for macroing…. it is a no-no :p I say this mostly because of those 'Firefox updates' they have sometimes, they will pop up and cover RS window :$


same here, 8 out of 10 times you wake up with the updating pop-up screen… anways thnx for posting the fix ive changed the login.scar file so hopefully should work :D :garfield:

Bourdou!

2007-09-05 20:34:19

eh, I have it set so it only tells me about updates when I start up firefox. Anyway, this does work, tried it on the RS client ;)

Derkel

2007-09-05 21:10:20

A Small Problem has now been fixed =) Kudos

Bob Smith

2007-09-13 04:53:03

From: inkd
same here, 8 out of 10 times you wake up with the updating pop-up screen… anways thnx for posting the fix ive changed the login.scar file so hopefully should work :D :garfield:


Ae! Thats just pathetic k?
Go tools –> options –> Advanced –> Update –> Untick automatically check for updates…
Also I just checked my update history last update was 31st July…

da scripter

2007-09-15 14:10:51

omg ty! i hate this problem it happens all the time when i use ie

nething

2007-09-19 00:35:20

W00t Hy (harry) is teh 1337sauce. Tysm for your help.

PwNZoRNooB

2007-09-19 12:41:05

I've used firefox whole the time and no problems at all :)

lolpie

2007-09-22 20:59:54

It doesn't work for me? I get errors about Mouse, FindText, etc…

I'm running SRL 4 and SCAR 3.11

Harry

2007-09-22 21:01:23

Wha..? You just put this into your Login.scar and it should work fine.. it does for me :S

lolpie

2007-09-22 21:02:24

Woops, wrong thread. Ignore that message

Harry

2007-09-22 21:04:08

I was gonna say.. an SRL member getting errors like that..!

q3ick

2007-09-23 10:28:56

THANK YOU SO MUCH! this has been bothering me for ages

Timothegreat

2007-09-23 21:25:32

nice job finding the fix. really helped me

12345678

2007-09-24 21:57:16

THANKS i have been having this prob for so long

goider

2007-11-10 22:23:49

From: Bourdou!
eh, I have it set so it only tells me about updates when I start up firefox. Anyway, this does work, tried it on the RS client ;)


same thing here, firefox is the sex, plus i have teh sexy mods abouts it….
its so much safer then IE, keeps so much crap off your cookies etc.:f:

Harry

2007-11-10 22:43:15

From: goider
same thing here, firefox is the sex, plus i have teh sexy mods abouts it….
its so much safer then IE, keeps so much crap off your cookies etc.:f:


:O An SRL member bumping old topics? What has this world come to?! :p (Well, at least it was a topic that I made.. :sasmokin: )
09-24-2007, 09:57 PM