View Full Version : Login.scar
Punkgi
04-08-2009, 07:47 PM
can anyone give me that file with the working easter update or not? thanks.
Richard
04-08-2009, 07:58 PM
antti mies created a fix that you can just add to a script:
procedure LoginPlayerFix;
var
Mark, Attempts: Integer;
Actions: TVariantArray;
RetryLogin: Boolean;
label
ProcStart;
begin
ActivateClient;
Wait(100);
TypeByte(vk_Escape);
if (GetColor(212, 327) = 238301) then //At Click To Play screen
begin
Wait(1000 + Random(3000));
MouseBox(227, 337, 555, 364, 1);
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
if (not(RSReady)) then
begin
MarkTime(Mark);
while (not(RSReady)) do
begin
Wait(100);
if (TimeFromMark(Mark) > 180000) then
begin
WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
TerminateScript;
end;
end;
WriteLn('Welcome to Runescape.');
end;
LoginScreenMusic(True);
if (not(GraphicsSet)) then
begin
SetAutoingDefaults;
GraphicsSet := True;
end;
ProcStart:
if (not(LoggedIn)) then
begin
if (not(Players[CurrentPlayer].Active)) then
begin
WriteLn('Player is not Active...');
NextPlayer(False);
Exit;
end;
Wait(900 + random(60));
//Click 'Log In' on main menu
while (GetColor(343, 175) <> 7750) do //while (GetColor(343, 174) <> 7750) do
begin
MouseBox(360, 180, 400, 185, 1);
Wait(100 + Random(100));
end;
//Type Username
Mouse(315, 272, 10, 5, True);
while (CountColor(7750, 311, 269, 452, 284) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
WriteLn(Capitalize(Players[CurrentPlayer].Name));
TypeSend(Players[CurrentPlayer].Name);
Wait(100+random(50));
//Type Password
Mouse(315, 334, 10, 5, True);
while (CountColor(7750, 311, 337, 452, 352) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
TypeSend(Players[CurrentPlayer].Pass);
Wait(500 + Random(300));
if (not(FindTextTPA(12509695, 0, 288, 205, 475, 247, 'login', StatChars, Nothing))) then //If 'enter' from typesend didn't log us in
begin
MouseBox(355, 359, 403, 372, 1); //Click 'login' login screen
Wait(250 + random(100));
end;
MarkTime(Mark);
repeat
SetLength(Actions, 0);
if (TimeFromMark(Mark) > 60000) then
Actions := ['One minute has passed...', 0, 2, 'NextPlayer', 'Login Failed']
else
case (CountColor(12509695, 288, 205, 475, 247)) of //Number of text colour points
// Actions := ['WriteLn Text', TimeToWait, NumberOfRetries, 'FinalAction', 'PlayerStatus'];
760: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'NextPlayer', ''];
536: Actions := ['Login limit exceeded. Please wait 1 minute and try again.', 60000, 2, 'NextPlayer', ''];
711: Actions := ['Your account has been disabled', 0, 0, 'NextPlayer', 'Acc Disabled'];
598: Actions := ['Invalid Username / Password', 0, 2, 'NextPlayer', 'Wrong User/Pass'];
787: Actions := ['Not a Members Account', 0, 0, 'NextPlayer', 'Non-member'];
408: Actions := ['World is full.', 5000, 20, 'Terminate', ''];
623: Actions := ['Your account is already logged in', 5000, 0, 'RandomNextPlayer', ''];
555: Actions := ['The Server is being updated.', 60000, 4, 'Terminate', 'Server Updating'];
218: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
335: Actions := ['Unable to connect Login Server offline.',(20000) + Random(6000), 4, 'Terminate', 'Login Server Offline'];
512: Actions := ['RuneScape has been updated. Script Terminated.', 0, 0, 'Terminate', 'RS Updated'];
489: Actions := ['Connection timed out.', 0, 4, 'Terminate', 'Connection Timed Out'];
737: Actions := ['You are standing in a members-only area.', 0, 0, 'NextPlayer', 'In Mems-Only Area'];
//10: Actions := ['Error loading your profile.', 5000, 10, 'NextPlayer', 'Profile Loading Failed']; // Error loading your profile. Will attempt to re-login 5 more times.)
//11: Actions := ['Login server rejected session.', 1000, 10, 'NextPlayer', 'Login Serv. Rejected']; // Login server rejected session.
end;
if (Length(Actions) > 0) then
begin
WriteLn(Actions[0]);
Wait(Actions[1] + Random(100));
if (Actions[2] <> 0) then
if (Attempts < Actions[2]) or (Actions[2] = -1) then
begin
RetryLogin := True;
Break;
end;
if (Actions[4] <> '') then
Players[CurrentPlayer].Loc := Actions[4];
case Actions[3] of
'NextPlayer': NextPlayer(False);
'RandomNextPlayer': RandomNextPlayer(True);
'Terminate': TerminateScript;
end;
Exit;
end;
Wait(100);
until(GetColor(266, 69) = 1647915);//changed
if (RetryLogin) then
begin
RetryLogin := False;
Inc(Attempts);
goto ProcStart;
end;
if (GetColor(266, 69) = 1647915) then//changed
begin
Wait(1000 + Random(2000));
MouseBox(210, 410, 560, 450, 1);//changed
end;
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
if (LoggedIn) then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
if Length(Players[CurrentPlayer].NickTPA) < 2 then
begin;
Writeln('Creating the NickTPA.');
if Players[CurrentPlayer].Nick <> '' then
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
else
begin;
Writeln('Nickname isn''t set, taking the username instead..');
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Name, UpChars);
end;
end;
AddToSRLLog('Current player: ' + Capitalize(Players[CurrentPlayer].Name));
end;
end;
Punkgi
04-08-2009, 08:05 PM
antti mies created a fix that you can just add to a script:
procedure LoginPlayerFix;
var
Mark, Attempts: Integer;
Actions: TVariantArray;
RetryLogin: Boolean;
label
ProcStart;
begin
ActivateClient;
Wait(100);
TypeByte(vk_Escape);
if (GetColor(212, 327) = 238301) then //At Click To Play screen
begin
Wait(1000 + Random(3000));
MouseBox(227, 337, 555, 364, 1);
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
if (not(RSReady)) then
begin
MarkTime(Mark);
while (not(RSReady)) do
begin
Wait(100);
if (TimeFromMark(Mark) > 180000) then
begin
WriteLn('It has been 3 minutes and Runescape is not yet ready... Terminating.');
TerminateScript;
end;
end;
WriteLn('Welcome to Runescape.');
end;
LoginScreenMusic(True);
if (not(GraphicsSet)) then
begin
SetAutoingDefaults;
GraphicsSet := True;
end;
ProcStart:
if (not(LoggedIn)) then
begin
if (not(Players[CurrentPlayer].Active)) then
begin
WriteLn('Player is not Active...');
NextPlayer(False);
Exit;
end;
Wait(900 + random(60));
//Click 'Log In' on main menu
while (GetColor(343, 175) <> 7750) do //while (GetColor(343, 174) <> 7750) do
begin
MouseBox(360, 180, 400, 185, 1);
Wait(100 + Random(100));
end;
//Type Username
Mouse(315, 272, 10, 5, True);
while (CountColor(7750, 311, 269, 452, 284) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
WriteLn(Capitalize(Players[CurrentPlayer].Name));
TypeSend(Players[CurrentPlayer].Name);
Wait(100+random(50));
//Type Password
Mouse(315, 334, 10, 5, True);
while (CountColor(7750, 311, 337, 452, 352) > 13) do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
for Mark := 0 to 3 do
begin
KeyDown(vk_Back);
Wait(10 + Random(10));
KeyUp(vk_Back);
Wait(50 + Random(50));
end;
Wait(100 + Random(200));
TypeSend(Players[CurrentPlayer].Pass);
Wait(500 + Random(300));
if (not(FindTextTPA(12509695, 0, 288, 205, 475, 247, 'login', StatChars, Nothing))) then //If 'enter' from typesend didn't log us in
begin
MouseBox(355, 359, 403, 372, 1); //Click 'login' login screen
Wait(250 + random(100));
end;
MarkTime(Mark);
repeat
SetLength(Actions, 0);
if (TimeFromMark(Mark) > 60000) then
Actions := ['One minute has passed...', 0, 2, 'NextPlayer', 'Login Failed']
else
case (CountColor(12509695, 288, 205, 475, 247)) of //Number of text colour points
// Actions := ['WriteLn Text', TimeToWait, NumberOfRetries, 'FinalAction', 'PlayerStatus'];
760: Actions := ['Too many incorrect logins.', 5 * 60000, 2, 'NextPlayer', ''];
536: Actions := ['Login limit exceeded. Please wait 1 minute and try again.', 60000, 2, 'NextPlayer', ''];
711: Actions := ['Your account has been disabled', 0, 0, 'NextPlayer', 'Acc Disabled'];
598: Actions := ['Invalid Username / Password', 0, 2, 'NextPlayer', 'Wrong User/Pass'];
787: Actions := ['Not a Members Account', 0, 0, 'NextPlayer', 'Non-member'];
408: Actions := ['World is full.', 5000, 20, 'Terminate', ''];
623: Actions := ['Your account is already logged in', 5000, 0, 'RandomNextPlayer', ''];
555: Actions := ['The Server is being updated.', 60000, 4, 'Terminate', 'Server Updating'];
218: Actions := ['Error Connecting.', 20000, 9, 'Terminate', 'Error Connecting'];
335: Actions := ['Unable to connect Login Server offline.',(20000) + Random(6000), 4, 'Terminate', 'Login Server Offline'];
512: Actions := ['RuneScape has been updated. Script Terminated.', 0, 0, 'Terminate', 'RS Updated'];
489: Actions := ['Connection timed out.', 0, 4, 'Terminate', 'Connection Timed Out'];
737: Actions := ['You are standing in a members-only area.', 0, 0, 'NextPlayer', 'In Mems-Only Area'];
//10: Actions := ['Error loading your profile.', 5000, 10, 'NextPlayer', 'Profile Loading Failed']; // Error loading your profile. Will attempt to re-login 5 more times.)
//11: Actions := ['Login server rejected session.', 1000, 10, 'NextPlayer', 'Login Serv. Rejected']; // Login server rejected session.
end;
if (Length(Actions) > 0) then
begin
WriteLn(Actions[0]);
Wait(Actions[1] + Random(100));
if (Actions[2] <> 0) then
if (Attempts < Actions[2]) or (Actions[2] = -1) then
begin
RetryLogin := True;
Break;
end;
if (Actions[4] <> '') then
Players[CurrentPlayer].Loc := Actions[4];
case Actions[3] of
'NextPlayer': NextPlayer(False);
'RandomNextPlayer': RandomNextPlayer(True);
'Terminate': TerminateScript;
end;
Exit;
end;
Wait(100);
until(GetColor(266, 69) = 1647915);//changed
if (RetryLogin) then
begin
RetryLogin := False;
Inc(Attempts);
goto ProcStart;
end;
if (GetColor(266, 69) = 1647915) then//changed
begin
Wait(1000 + Random(2000));
MouseBox(210, 410, 560, 450, 1);//changed
end;
MarkTime(Mark);
while (TimeFromMark(Mark) < 30000) and (not(LoggedIn)) do
Wait(1000 + Random(1000));
end;
if (LoggedIn) then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
if Length(Players[CurrentPlayer].NickTPA) < 2 then
begin;
Writeln('Creating the NickTPA.');
if Players[CurrentPlayer].Nick <> '' then
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars)
else
begin;
Writeln('Nickname isn''t set, taking the username instead..');
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Name, UpChars);
end;
end;
AddToSRLLog('Current player: ' + Capitalize(Players[CurrentPlayer].Name));
end;
end;
yeah i have that then there were other errors. so i need to start over. thats why i need the whole file.
Richard
04-08-2009, 08:12 PM
Don't replace the whole file, just redownload your includes, then replace the LoginPlayer function with this. Without the Fix on the LoginPlayerFix function (that was me adding it to my whole script).
Punkgi
04-08-2009, 08:13 PM
yeah i didnt add it to the whole thing just the part.
i go to update the include i get this http://i157.photobucket.com/albums/t61/Punkgi/2009-04-08_153703.jpg
Nava2
04-08-2009, 08:13 PM
For the record, there is also a fix added into the sticky here: http://www.villavu.com/forum/showthread.php?t=43623
Punkgi
04-08-2009, 09:05 PM
For the record, there is also a fix added into the sticky here: http://www.villavu.com/forum/showthread.php?t=43623
ty
it works now
icon091
04-11-2009, 08:08 AM
yer
hutic
04-11-2009, 08:09 AM
every time i paste it in my file it puts it in 1 line
like it doesn't go
1 ----
2 --
3 ---
it goes 1-------------------------------------, how do i fix this?
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.