SRL Archive - S.M.A.R.T.

[Working] S.M.A.R.T Login (Include?)


Joe

2012-07-16 15:38:14

So I became very distraught over not being able to bot, so I got the idea to help out.
I know, it's very beginner work and easy procedures, but it logs in.
Right now I'm working on getting it to press the "Click to Play" button. I'm sure it's the wait times that are screwing it up, but I'm pretty sure I have the right coords.

It types in the username and password and logs in perfectly, so I have that much done.

Here's my code:

program SMARTincludeJ; //Temp
{$DEFINE SMART}
{$i SRL/srl.simba}

// No disrespect to Benland100, but with the state of SMART, I'm making this temporary SMART include
// If Benland100 disapproves, this will be removed/deleted
// This is a bit intricate :Þ, the developers can change this in any way they please.


// This is a VERY CRUDE version of the login include I am developing. It will become more intense within hours.


{ Author : Joe
[* This is the procedure that will enter in your Username and Password *]}

procedure LogIn;

begin
Wait((2000)+Random(1000)); // Adjust to lag
MMouse(458,300,1,1);
{MouseBox(400,289,606,306,mouse_left);}
ClickMouse2(mouse_left);
TypeSend('_'); // WRITE YOUR USERNAME HERE! WRITE YOUR USERNAME HERE! WRITE YOUR USERNAME HERE!
// Not sure if the "enter" will go to the Password Box, so I just made it click
Wait((1000)+Random(100));
MMouse(450,344,1,1);
{MouseBox(400,336,604,353,mouse_left);}
ClickMouse2(mouse_left);
TypeSend('_'); // WRITE YOUR PASSWORD HERE! WRITE YOUR PASSWORD HERE! WRITE YOUR PASSWORD HERE!
end;


{ Author : Joe
[* This is the procedure that will deal with the Lobby *]}

procedure LobbyManagement;

// Not doing worldswitching (yet?), just clicking the button...
begin
Wait((3000)+Random(1000));
MMouse(498,596,1,1); // Why is this not working?
{MouseBox(383,585,619,611);}
ClickMouse2(mouse_left);
end;

begin
Smart_server := 11;
Smart_Signed := TRUE;
Smart_Members := FALSE;
Smart_SuperDetail := FALSE;

SetupSRL;
Wait(1000);

Login;
Wait(1000); // Adjust to lag
LobbyManagement;
end.


I'm going to be getting color confirmation for these procedures too.

Get back to me with feedback!

~Joe

Olly

2012-07-16 17:37:28

why not just get the current login include and change what's required?

Joe

2012-07-16 17:44:33

From: Ollybest
why not just get the current login include and change what's required?


Because reinventing the wheel has been a wild ride. I kind of wanted to do more than just changing something.
And if I seriously screwed something up then I would be in some trouble.

John

2012-07-16 19:27:02

Atm How do you know when the login screen is ready? what about the 'Adjust your Graphics' thign that can come up?

You could do something like this to find out when it's ready.
Repeat
Wait(50)
Until(FindDTM(LOGINBOX, ect ect,);

Of course you could expand on this a lot more. It's good to see a lot of people chippin in while were 'down' :)

Joe

2012-07-17 09:25:23

From: John
Atm How do you know when the login screen is ready? what about the 'Adjust your Graphics' thign that can come up?

You could do something like this to find out when it's ready.
Repeat
Wait(50)
Until(FindDTM(LOGINBOX, ect ect,);

Of course you could expand on this a lot more. It's good to see a lot of people chippin in while were 'down' :)


I obviously understand that there is so much that can go wrong with this procedure, it's just the beginning. I already have some special functions that have gotten a bit more accurate. I've nearly gotten it to log in 10 times in a row.

riwu

2012-07-17 10:04:10

There is nothing wrong with the current LoginPlayer procedure in the include, its very comprehensive (multiplayer compatible etc) with tons of failsafe. The only thing that is wrong is the pixel offset (y-coordinate) of 50, which has been fixed by ggzz by adjusting the global constants.

Nevertheless, its always fun/a good learning experience to create ur own custom procedures ;)

Joe

2012-07-17 12:05:40

From: riwu
There is nothing wrong with the current LoginPlayer procedure in the include, its very comprehensive (multiplayer compatible etc) with tons of failsafe. The only thing that is wrong is the pixel offset (y-coordinate) of 50, which has been fixed by ggzz by adjusting the global constants.

Nevertheless, its always fun/a good learning experience to create ur own custom procedures ;)


Yeah.. but the login include still isn't working…