SRL Archive - Help and Support

Welcome?


WhoCares357

2008-06-11 17:28:06

I recently wanted to try out my old alcher and I fired it up to find the debug screen overflowing with "Welcome." every two-three seconds. I know that has nothing to do with my own procedures because I searched the script for the word Welcome and nothing came up. Does any one know any SRL functions that might be responsible? I thought it might be the SRL Stats functions but I deleted them and still got the same response.

It happens somewhere in the beginning of the script because it doesn't do anything before (except for display my sig). It might be the LogIn function, but I don't know..

Iron Man

2008-06-11 18:16:04

Only thing I can think of is LoginPlayer, it writes in the debug "Welcome." Do you have a loop with LoginPlayer in it?

WhoCares357

2008-06-11 19:04:38

From: Iron man
Only thing I can think of is LoginPlayer, it writes in the debug "Welcome." Do you have a loop with LoginPlayer in it?


main loop:
begin
{//First Player StartUp\\}
StartUp;
LogIn;
Check;
{\\First Player StartUp//}

begin
repeat
if LoggedIn then
begin

{//Spell/Item Click\\}
if Spell then
begin
ItemClick;
SwitchNow;
end;
end;
{\\Spell/Item Click//}

{//Double-Check + Report\\}
if LoggedIn and not FailedCheck then
begin
FullAnti;
DReport;
end else
SwitchNow;
{\\Double-Check + Report//}

until(false);
end;
end.

LogIn procedure:
procedure LogIn;
begin
if not LoggedIn then
LogInPlayer;
Wait(200+random(500));
if Players[CurrentPlayer].Integers[1] <= 0 then
begin
CErr('Set the correct alch amount.');
LogOut;
SwitchNow;
end;
end;

SwitchNow procedure:
procedure SwitchNow;
begin
if not (LoggedIn) or (Items >= Players[CurrentPlayer].Integers[1]) then
begin
if LoggedIn then
clvl := GetSkillInfo('magic', false);
LogOut;
if (Items >= Players[CurrentPlayer].Integers[1]) then
begin
WriteLn('');
WriteLn('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
WriteLn('Alched all required for ' + Players[CurrentPlayer].Name);
WriteLn('Switching character.');
WriteLn('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
WriteLn('');
end;
if (Items >= Players[CurrentPlayer].Integers[1]) or not (LoggedIn) then
begin
DReport;
MySig;
NextPlayer(false);
FirstCheck := true;
Wait(100 + random(200));
Check;
Items := 0;
uxp := 0;
Failed := 0;
if Players[CurrentPlayer].Integers[1] <= 0 then
begin
CErr('Set the correct alch amount.');
LogOut;
Exit;
end;
end;
end;
end;

So, yes, it does keep trying to log in, but why will it not do it? I also tried setting Activate Client before login but it doesn't do that either.

Iron Man

2008-06-11 19:09:54

Try having a Wait(1000); before logging in. It always does that to me if I don't have a wait before I attempt to log in.

EDIT: Not sure if thats the problem, but it doesn't really hurt anything to try.

WhoCares357

2008-06-11 19:11:37

From: Iron man
Try having a Wait(1000); before logging in. It always does that to me if I don't have a wait before I attempt to log in.


Well here's the Startup procedure:
procedure StartUp;
begin
Wait(200+random(100));
ClearDebug;
FirstCheck := true;
ItemAlch := ItemToAlchName;
Failed := 0;
Total := 0;
uxp := 0;
txp := 0;
clvl := 0;
slvl := 0;
antiN := 0;
SetupSRL;
SRLID := YourSRLID;
SRLPassword := YourSRLPassword;
ScriptID := '726';
DeclarePlayers;
// NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
MySig;
Disguise('Poop n Such :: Index');
MouseSpeed := CustomMouseSpeed;
ActivateClient;
Wait(200+random(100));
end;

So it does wait a bit, but maybe not enough? Should I put the wait in the SwitchNow procedure, too?

I'll try it and get back to you.

WhoCares357

2008-06-11 19:18:36

You know what, nevermind. I think it was because I had RS on high quality. I didn't know there was a difference between the two on the login screen, but maybe there is. It works now.

Thanks for your help, iron man.

FreakyMonkey

2008-06-11 19:59:04

Haha, WhoCares glad your planning on updating the script, it was going from 5 stars to 3! ;)

MylesMadness

2008-06-11 20:12:29

I ALWAYS us high detail. It does that sometimes.