SRL Archive - First Scripts

!Simple Auto Login!


Q Golden Q

2009-02-17 18:25:07

Hi! This is my first scrip, it is just a basic script that logs you in. Please give me feedback on what i should improve or whatever ext.

Note: When you start it, it will open up SMART and you will have to restart the script.

No, this is not a decent script, i know. It's very very simple and basic.

well here it is. :)
[ATTACH]16646[/ATTACH]
[ATTACH]16753[/ATTACH]

EDIT: This is my second script, a little better than the autologin. It is a powerchopper that ONLY cuts normal logs, so only try it near normal logs. I don't know how to make it cut any type of log yet (mabye you could post how..). Please give me feedback and ways to improve!



:)

Pheter

2009-02-17 20:15:11

Didn't work for me when I ran it.

You should add a wait in the main function after loading SMART and then running your own procedures as the script tried to enter username/password details before the RS client had loaded within SMART.

Also I'm not sure what the purpose of clicking the 'existing member' part is.. I never have to click that anymore these days, it just loads at the login screen. Does anyone else have to click 'Existing Member' before logging in?

Other than that the script looks good.

Q Golden Q

2009-02-17 22:00:35

Thanks pheter, i added the wait, the script shouldn't start right away now :)

Sandstorm

2009-02-17 22:13:29

This is my default script:

Program New;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}

procedure SetupSmart;
begin
SmartSetupEx(144, True, true, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
end;

Begin
SetupSrl;
SetupSmart;
End.

Take a look at how I did the smart thing. Doesn't work if you don't enable smart straight away though.

If you want some peer to peer tutoring, send me a pm with you MSN and I can help ya :).

~Sandstorm

Tniffoc

2009-02-17 23:07:12

Just to tell you, there is a procedure in SRL that you will run into later called:

LoginPlayer;
It will do this for you. Happy Autoing!

~Tniffoc

mormonman

2009-02-17 23:15:36

From: Tniffoc
Just to tell you, there is a procedure in SRL that you will run into later called:

LoginPlayer;
It will do this for you. Happy Autoing!

~Tniffoc


lol yep check out this script…


program autologin;
{.Include SRL\SRL.SCAR}

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer :=0

Players[0].Name:= ''; //username
Players[0].Pass:= ''; //password
Players[0].Nick:= ''; //3-4 letters of username
Players[0].Active:= True;
end;

begin
SetupSRL;
LoginPlayer;
end.
trumps yours by far… no offense tho! this was actually my first script… lol!

Smarter Child

2009-02-18 13:18:13

hmm nice first script. But, it was totally pointless:p Use LoginPlayer…

Heavenzeyez1

2009-02-18 15:28:46

From: Smarter Child
hmm nice first script. But, it was totally pointless:p Use LoginPlayer…


Totally pointless? :)
Ooh, it's nice to hear that you started with making 1337 ess miners and guild miners? :) Just show some more respect against newcomers.
Good job, it's a start at least! ;)
~Eerik~
EDIT: Looked through it once again.. to me it seems that it will write the user and pass to the same line? Because you won't move the mouse to the password area? :)

Q Golden Q

2009-02-18 15:35:11

Thx, btw smarter child i know about the loginPlayer, I just felt that making an auto login was a good start like heaven said :p. I'm still reading through various tutorials and trying to learn more about scar. :)

Cy an id 3

2009-02-19 13:28:31

I Can't get this to work at all.

Q Golden Q

2009-02-19 15:25:09

It doesn't just type user and pass on same line heaven because
typesend
automatically presses enter after the string :p

And cyanide, i like your name :) and the reason it probably won't work for you is that you need to start then stop then enable smart then start it again :p thx for feedback guys!

Sfts3

2009-02-20 20:10:24

From: mormonman
lol yep check out this script…


program autologin;
{.Include SRL\SRL.SCAR}

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer :=0

Players[0].Name:= ''; //username
Players[0].Pass:= ''; //password
Players[0].Nick:= ''; //3-4 letters of username
Players[0].Active:= True;
end;

begin
SetupSRL;
LoginPlayer;
end.
trumps yours by far… no offense tho! this was actually my first script… lol!


I tried this and it doesn't work, I get this error message:

[Runtime Error] : Out Of Range in line 323 in script (that was for the login includes)

Q Golden Q

2009-02-20 21:16:45

Added my second script :o
Simple power cutter

ian.

2009-02-21 02:44:49

program Autologin;
{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}
{.include SRL/SRL/Skill/Woodcutting.Scar}

var
x, y :integer;

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer :=0

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters of username
Players[0].Active := True;
end;

procedure Sig;
begin
writeln('This Script was made by');
wait(300);
writeln('Q Golden Q');
end;

Procedure LogMeIn;
begin
if(not(LoggedIn))then
begin
LoginPlayer;
Wait(1000+random(3000));
MakeCompass('N');
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
FindLamp('woodcutting');
end;

procedure ChopTree;
begin
AntiRandoms;
if not LoggedIn or InvFull then
exit;
LogMeIn;
if(FindcolorTolerance(x,y,6728348,5,5,515,340,5))then
begin
Mouse(x,y,2,2,true);
Wait(4000+ Random(7000));
end;
end;

procedure Drops;
begin
if(not(LoggedIn))then
exit;
if(InvFull)then
DropAll;
end;

Begin
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
wait(12000)
SetupSRL;
Disguise('LimeWire');
Sig;
DeclarePlayers;
if(not(LoggedIn))then
LogMeIn;
repeat
AntiRandoms;
ChopTree;
Drops;
until(false);
end.

just fixed standards.. their is some stuff you can add like.. constants.. :D

for tree to cut/colors/loads to do/whatever.. it makes it a lot more customizable :)

Q Golden Q

2009-02-21 13:34:16

Added something that will hopefully work and find a good tolerance for thr trees. <– thanks to NaumanAkhlaQ's tut. Also added a tree colour const. Thank you 99 for making my script look better:p . Keep up the feedback, I would also like to learn how to make it so it will right click the tree.

Fafhrkek

2009-02-22 12:59:17

Simple but good.

ian.

2009-02-23 07:40:55

to make it right click, do Mouse(x, y, 2, 2, FALSE); the false means it will right click..

so like..

if(FindColor(tx, ty, TreeColor, MSX1, MSY1, MSX2, MSX2))then
begin
Mouse(tx, ty, 2, 2, false);
Wait(RandomRange(50, 100));
ChooseOption('hop');
end else
Writeln('Couldn''t find tree');
NextPlayer(False);

Q Golden Q

2009-02-24 13:31:21

thank you, i knew how to make it right click but didn't know how to make it actually click the "chop tree":duh: so thanks again 99

Smarter Child

2009-02-24 15:04:36

MAKE a RUNESCAPE script.

Hugolord

2009-02-24 15:13:43

From: Smarter Child
MAKE a RUNESCAPE script.


what?

ian.

2009-02-25 07:05:25

xD

idk why.. maybe from not sleeping for 2 days.. but that made me laugh :p

(what hugo said)

and np Golden :)

glad to help..

Q Golden Q

2009-02-28 20:40:05

Added more to it, it's a lot better now.

Q Golden Q

2009-03-12 00:32:11

Mo ones gonna respond i guess.. whatever.

ian.

2009-03-12 00:44:07

:o nice ^^

case!

but..

it should be a little different..

like.. a case of 5.. and 012 and 4 are left click.. and 3 is right click.. :)

lookin good :D

if you want more help you can ask me ;)