SRL Archive - Outdated / Broken

Auto-Login


Pwnd

2006-03-25 21:35:51

Learn, love, leach.
Post bugs and shit here and if you need any help understanding it message me or post here again.

You may use this, just give credits. I'll hunt your ass down otherwise.


{//////////////////////////////////////////////////////////////////////////////
Auto-Login by Pwnd
Version 1.0
Msn: Dirtywonker@yahoo.com
AIM: Dirtywonker
This is mainly for learning purposes.
///////////////////////////////////////////////////////////////////////////////}
program AutoLogin;
{.include SRL/SRL.Scar}

const
UserPwnd = '';
PassPwnd = '';

Tab = ' ';

procedure RWait(int1, int2: integer);
begin
Wait(int1 * 100 + random(int2 * 100));
end;

function AtLoginScreen: Boolean;
var
WelcomeDTM: integer;
xa, ya: integer;
begin
WelcomeDTM := DTMFromString('78DA63DCC7C8C0A004C448E0FFFFFF601A26C' +
'A1807645543D84C503149191954359380AC62026A2E025965A86A' +
'F8057851D40000EAFC07E4');
if(FindDTM(WelcomeDTM, xa, ya, 5, 5, 515, 340))then
begin
WriteLn(Tab + 'At login screen. Loging in');
Result:= True;
end else
Result:= False;
FreeDTM(WelcomeDTM);
end;

procedure LoginPwnd;
var
Rand: integer;
xb, yb: integer;
Click, i: integer;
begin
if(AtLoginScreen)then
begin
Rand:= random(5);
if(Rand = 1)then
begin
xb:= 405;
yb:= 282;
end else
if(Rand = 2)then
begin
xb:= 458;
yb:= 296;
end else
if(Rand = 3)then
begin
xb:= 510;
yb:= 290;
end else
if(Rand = 4)then
begin
xb:= 426;
yb:= 302;
end else
if(Rand = 5)then
begin
xb:= 492;
yb:= 283;
end else
begin
xb:= 416;
yb:= 295;
end;
Mouse(xb, yb, 2, 2, True);
RWait(2, 2);
SendText(UserPwnd + chr(13));
RWait(1, 3);
SendText(PassPwnd);
RWait(3, 4);
if(Rand = 1)then
begin
xb:= 256;
yb:= 310;
end else
if(Rand = 2)then
begin
xb:= 347;
yb:= 315;
end else
if(Rand = 3)then
begin
xb:= 302;
yb:= 322;
end else
if(Rand = 4)then
begin
xb:= 359;
yb:= 322;
end else
if(Rand = 5)then
begin
xb:= 329;
yb:= 312;
end else
begin
xb:= 353;
yb:= 324;
end;
Mouse(xb, yb, 2, 2, True);
Click:= BitmapFromString(1, 1, '480200');
repeat
RWait(5, 5);
i:= i + 1;
until((i = 10) or (FindBitmap(Click, xb, yb)))
if(i = 10)then
begin
WriteLn(Tab + +'Error, shutting down');
TerminateScript;
end else
if(FindBitmap(Click, xb, yb))then
begin
Mouse(518, 333, 10, 10, True);
WriteLn(Tab + 'Login sucessful, I hope');
end;
end;
end;

begin
LoginPwnd;
end.

Bebe

2006-03-25 21:39:14

Wow, blew my mind away :p

Pwnd

2006-03-25 21:43:23

From: Bebemycat2
Wow, blew my mind away :p

Why? Because this is the 15th different auto-login I've made in the history of my SCAR us0ring? :p

XxKanexX

2006-03-25 21:56:13

Hmm.. Some things arn't needed and could be shortened down.

I love Srl's :)
<3 GJ.

Pwnd

2006-03-25 22:02:20

From: XxKanexX
Hmm.. Some things arn't needed and could be shortened down.

I love Srl's :)
<3 GJ.

Well, I made it gayly random, and I just used the include for the mouse movements, so meh.

XxKanexX

2006-03-25 22:03:34

From: Pwnd
Well, I made it gayly random, and I just used the include for the mouse movements, so meh.

It's good to see you scripting though :p

Pwnd

2006-03-25 22:04:31

From: XxKanexX
It's good to see you scripting though :p

If I cared enough, I'd recreate my fletcher for SRL, but I'll have to see. I don't have my old version, so I can't just port it. I have to redo it, but if I get to it.. We'll see the outcome.

XxKanexX

2006-03-25 22:37:58

This dosn't really make a difference, but i'll say it anyway.

Line: 120 = WriteLn(Tab + +'Error, shutting down');

2 pluses ;) (Works either way)

Pwnd

2006-03-26 01:56:04

From: XxKanexX
This dosn't really make a difference, but i'll say it anyway.

Line: 120 = WriteLn(Tab + +'Error, shutting down');

2 pluses ;) (Works either way)

Lol, wow. I had no idea. Thanks. It still worked though ;D

WhiteShadow

2006-03-26 02:04:11

Have you tested SRL's abiltiy to Log-in one after another account yet? Or are you just going to use its funcstions/procedures?

Pwnd

2006-03-26 02:07:21

From: WhiteShadow
Have you tested SRL's abiltiy to Log-in one after another account yet? Or are you just going to use its funcstions/procedures?

I am actually overwhelmed by srls structure. It pisses me off. I'd rather just look through the script and see, oh.. Ok, there's this; as opposed to looking through 15 folders..

I'll just make my own functions and such. I'll cope.

Bebe

2006-03-26 10:08:34

Yes I aggree, SRL is fairly disorganized at points, and very hard to find what you are looking for some times.

WT-Fakawi

2006-03-26 10:22:16

hm…
Tried browsing through the Microsoft Help-File?
I bet Scar didnt seem to logical too, when you first laid eyes on it.

Look @ Login.scar

See the function LoginPlayer? I think it is pretty ok, I'd rahter see you spend your energy on other things, then writing yet another Login…..

[FONT="Courier New"]procedure LoginPlayer;
var
ClickHereToPlay,tx,ty,c : Integer;
begin
ClickHereToPlay := BitmapFromString(29, 2, 'z78DA7373230C0C' +
'C0C0CCD4D0C0C014971A73376323232333274367034B08896902A' +
'60804983A1A9A1A58E03219228B693BB209585C8BC30DC800EA5A' +
'BCFE4251EF6A6460688AE95A2C2683CD040002BE5286');
if (not (LoggedIn)) then
begin
ActivateClient;
Wait(1000);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);

if (ClickOption('Username', 1)) then
begin
// 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,200,530,240) do
begin
Wait(100);
if TimeFromMark(Mark)>20000 then break;
end;

repeat
Wait(1000);

// Enter your username and password. If all failed...
If FindText(tx,ty,'nter you', UpChars,240,200,530,240) then
begin
writeln('Enter your username and Password');
LoginPlayer;
Exit;
end;
// Invalid Username. 3 attempts. If fails, you haven't set your username/pass correct
If FindText(tx,ty,'nvalid', UpChars,240,200,530,240) then
begin
writeln('Invalid Username.');
Attempts:=Attempts + 1;
If Attempts > 3 then
begin
Players[CurrentPlayer].loc:='L/P ERROR';
NextPlayer(False);
end;
LoginPlayer;
Exit;
end;

// Login attempts exceeded. Please wait 1 minute and try again.
If FindText(tx,ty,'excee', UpChars,240,200,530,240) then
begin
writeln('Login attempts exceeded. Please wait 1 minute and try again.');
Wait(60000);
LoginPlayer;
Exit;
end;

// World is full.
If FindText(tx,ty,'full', UpChars,240,200,530,240) then
begin
writeln('World is full.');
Wait(3000);
LoginPlayer;
Exit;
end;

// Unable to connect. Login Server offline.
If FindText(tx,ty,'offl', UpChars,240,200,530,240) then
begin
writeln('Unable to connect Login Server offline.');
Wait((6000)+Random(6000));
LoginPlayer;
Exit;
end;

// Error Connecting.
If FindText(tx,ty,'rror', UpChars,240,200,530,240) then
begin
writeln('Error Connecting.');
Wait(10000);
LoginPlayer;
Exit;
end;

// Login server rejected session.
If FindText(tx,ty,'reject', UpChars,240,200,530,240) then
begin
writeln('Login server rejected session.');
Wait(1000);
LoginPlayer;
Exit;
end;

// Runescape has been updated.
If FindText(tx,ty,'cape ha', UpChars,240,200,530,240) then
begin
writeln('ERROR. RuneScape has been updated. Script Terminated.');
TerminateScript;
end;

// The Server is being updated. Please wait 1 minute.
If FindText(tx,ty,'updat', UpChars,240,200,530,240) then
begin
writeln('The Server is being updated.');
Wait(60000);
LoginPlayer;
Exit;
end;

// Your account has been disabled.
If FindText(tx,ty,'disabl', UpChars,240,200,530,240) then
begin
writeln('Your account has been disabled');
Players[CurrentPlayer].loc:='DISABLED';
NextPlayer(False);
Exit;
end;

// Welcome to RuneScape. If all failed...
If FindText(tx,ty,'elcom', UpChars,240,200,530,240) then
begin
writeln('Welcome.');
LoginPlayer;
Exit;
end;

until (FindBitmapToleranceIn(ClickHereToPlay, x, y, 380, 290, 620, 380, 20));
Wait(1000 + Random(500));
Mouse(x, y, 20, 2, True);

repeat
Wait(1000);
c := c + 1;
until (LoggedIn) or (c >= 600);

end;
if LoggedIn then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname
WriteFileString(TheFile,chr(13)+UpperCase(Players[CurrentPlayer].Name) + chr(13)); //* Save NAME to file
end;

FreeBitmap(ClickHereToPlay);

end;[/FONT]

P.S.

We have written a manual.
We have written a Microsoft Help system.
We have provided example source code.
There are a lot of SRL-scripts around.

What exactly pisses you off? :D

WhiteShadow

2006-03-26 17:17:02

From: WT-Fakawi
hm…
Tried browsing through the Microsoft Help-File?
I bet Scar didnt seem to logical too, when you first laid eyes on it.

Look @ Login.scar

See the function LoginPlayer? I think it is pretty ok, I'd rahter see you spend your energy on other things, then writing yet another Login…..

[FONT="Courier New"]procedure LoginPlayer;
var
ClickHereToPlay,tx,ty,c : Integer;
begin
ClickHereToPlay := BitmapFromString(29, 2, 'z78DA7373230C0C' +
'C0C0CCD4D0C0C014971A73376323232333274367034B08896902A' +
'60804983A1A9A1A58E03219228B693BB209585C8BC30DC800EA5A' +
'BCFE4251EF6A6460688AE95A2C2683CD040002BE5286');
if (not (LoggedIn)) then
begin
ActivateClient;
Wait(1000);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);

if (ClickOption('Username', 1)) then
begin
// 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,200,530,240) do
begin
Wait(100);
if TimeFromMark(Mark)>20000 then break;
end;

repeat
Wait(1000);

// Enter your username and password. If all failed...
If FindText(tx,ty,'nter you', UpChars,240,200,530,240) then
begin
writeln('Enter your username and Password');
LoginPlayer;
Exit;
end;
// Invalid Username. 3 attempts. If fails, you haven't set your username/pass correct
If FindText(tx,ty,'nvalid', UpChars,240,200,530,240) then
begin
writeln('Invalid Username.');
Attempts:=Attempts + 1;
If Attempts > 3 then
begin
Players[CurrentPlayer].loc:='L/P ERROR';
NextPlayer(False);
end;
LoginPlayer;
Exit;
end;

// Login attempts exceeded. Please wait 1 minute and try again.
If FindText(tx,ty,'excee', UpChars,240,200,530,240) then
begin
writeln('Login attempts exceeded. Please wait 1 minute and try again.');
Wait(60000);
LoginPlayer;
Exit;
end;

// World is full.
If FindText(tx,ty,'full', UpChars,240,200,530,240) then
begin
writeln('World is full.');
Wait(3000);
LoginPlayer;
Exit;
end;

// Unable to connect. Login Server offline.
If FindText(tx,ty,'offl', UpChars,240,200,530,240) then
begin
writeln('Unable to connect Login Server offline.');
Wait((6000)+Random(6000));
LoginPlayer;
Exit;
end;

// Error Connecting.
If FindText(tx,ty,'rror', UpChars,240,200,530,240) then
begin
writeln('Error Connecting.');
Wait(10000);
LoginPlayer;
Exit;
end;

// Login server rejected session.
If FindText(tx,ty,'reject', UpChars,240,200,530,240) then
begin
writeln('Login server rejected session.');
Wait(1000);
LoginPlayer;
Exit;
end;

// Runescape has been updated.
If FindText(tx,ty,'cape ha', UpChars,240,200,530,240) then
begin
writeln('ERROR. RuneScape has been updated. Script Terminated.');
TerminateScript;
end;

// The Server is being updated. Please wait 1 minute.
If FindText(tx,ty,'updat', UpChars,240,200,530,240) then
begin
writeln('The Server is being updated.');
Wait(60000);
LoginPlayer;
Exit;
end;

// Your account has been disabled.
If FindText(tx,ty,'disabl', UpChars,240,200,530,240) then
begin
writeln('Your account has been disabled');
Players[CurrentPlayer].loc:='DISABLED';
NextPlayer(False);
Exit;
end;

// Welcome to RuneScape. If all failed...
If FindText(tx,ty,'elcom', UpChars,240,200,530,240) then
begin
writeln('Welcome.');
LoginPlayer;
Exit;
end;

until (FindBitmapToleranceIn(ClickHereToPlay, x, y, 380, 290, 620, 380, 20));
Wait(1000 + Random(500));
Mouse(x, y, 20, 2, True);

repeat
Wait(1000);
c := c + 1;
until (LoggedIn) or (c >= 600);

end;
if LoggedIn then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname
WriteFileString(TheFile,chr(13)+UpperCase(Players[CurrentPlayer].Name) + chr(13)); //* Save NAME to file
end;

FreeBitmap(ClickHereToPlay);

end;[/FONT]

P.S.

We have written a manual.
We have written a Microsoft Help system.
We have provided example source code.
There are a lot of SRL-scripts around.

What exactly pisses you off? :D



Probably Cause its Split into So many folders. It's kind of annoying. But, Nonetheless <3 SRL.

Pwnd

2006-03-26 18:06:20

Even if it works, I'll only use SRL for randoms and mouse movements. That's how I was with almost every other include.