Log in

View Full Version : Problems with Logging in.



Hey321
07-10-2007, 06:41 PM
I posted this in members forums but no-one is replying, my srl is either broken, or doesn't like me, 3.81 will NOT click "Click here to play" after logging in. Why might this be?

bullzeye95
07-10-2007, 07:23 PM
Dunno, try running this on that screen program New;
var
ClickHereToPlay, CHx, CHy: Integer;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888 443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F43 65B7' +
'067D37AC3D95AADF2F50962C79');
if(FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5))then
begin
writeln('Found the bitmap');
ClickMouseSpline(CHx, CHy, 5, 5, True);
end else
writeln('Uh oh, I guess you have to make another one...');
end.

Hey321
07-10-2007, 07:32 PM
Uh oh, I guess you have to make another one...


Argh.

bullzeye95
07-10-2007, 07:36 PM
Really... that's weird. Well just change your LoginPlayer to check for the color 16777215 instead of the bitmap :)

Hey321
07-10-2007, 07:46 PM
ill make my own ^^. Well, I made one and it worked with your miniscript, but it doesn't work in the actual srl script. Still need help guys.

bullzeye95
07-10-2007, 08:02 PM
Here, this should work for you procedure LoginPlayer;
var
{ClickHereToPlay, }tx, ty, CHx, CHy, c, tmpMask, LastPlayer: Integer;
begin
{ ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888 443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F43 65B7' +
'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);
LoginPlayer;
// FreeBitmap(ClickHereToPlay);
Exit;
end;
x := 150;
y := 173;
if (FindClient) then
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));
//SendKeysSilent(Players[CurrentPlayer].Name + chr(13) + Players[CurrentPlayer].Pass)
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');
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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;
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
Exit;
end else
// World is full.
if FindText(tx, ty, 'full', upchars, 240, 180, 530, 240) then
begin
WriteLn('World is full.');
Wait(3000);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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));
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
Exit;
end else
// Error Connecting.
if FindText(tx, ty, 'rror', upchars, 240, 180, 530, 240) then
begin
WriteLn('Error Connecting.');
Wait(10000);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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;
// 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);
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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';
NextPlayer(False);
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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';
NextPlayer(False);
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
end else
// Welcome to RuneScape. If all failed...
if FindText(tx, ty, 'elcom', upchars, 240, 180, 530, 240) then
begin
WriteLn('Welcome.');
LoginPlayer;
FreeBitmap(tmpMask);
// FreeBitmap(ClickHereToPlay);
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);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);
end;
until{ (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390,
5)) or }FindColor(CHx, CHy, 16777215, 271, 292, 501, 383);
Wait(1000 + Random(500));
// if (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5)) then
if(FindColor(CHx, CHy, 16777215, 271, 292, 501, 383))then
Mouse(CHx + 20, 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
WriteFileString(TheFile, Chr(13) + UpperCase(Players[CurrentPlayer].Name) +
Chr(13)); //* Save NAME to file
end;
end;
:)

Hey321
07-10-2007, 08:15 PM
Thanks, works perfectly. =D. Now I just need to be able to use dlong, which quest is that?

bullzeye95
07-10-2007, 08:16 PM
Good! :)