SRL Archive - First Scripts

Alcher


Cstrike

2010-06-28 23:58:39

Am I in the wrong place (should I be in "Help" forum)? If not, enjoy the show

Yes, yet another alcher to blow your load over. You'd think we have enough of these yet? Well here's another :)
I'm making it because I need it badly. All the other ones seem to be broken and I want one that I know will work. My eventual goal is to make a script that will safely allow one to get to 99 magic. Currently I feel the script cannot do that safely without risking ban. It would be cool to include it for autoing armies, but that is to come once this is stable.

Please if you see anything wrong please tear it apart.
How can I make it more anti-bannable?
I must be missing some fail safes, so far its stable but in reality it's way too unstable for any public releases.

Any help is greatly appreciated from the bottom of my heart. One day I will be able to repay back the community… one step at a time. Here's the script:

program MyShittyAlcher;
{.Include SRL/SRL/Misc/SMART.SCAR}
{.Include SRL/SRL.SCAR}
var natures : Integer;
var xc, yc : Integer;
var n : Integer;

{---------------------------------------]
Setup
[---------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ':D lol :D';//Your RuneScape UserName
Players[0].Pass := ':D lol :D';//Your RuneScape PassWord
Players[0].Nick := ':D lol :D'; //3-4 letters from name
Players[0].Active:= True;
natures := 10; // How many nature runes will you use?
end;
{---------------------------------------]
End Setup
[---------------------------------------}

// Credit to Narcle, borrowed from 'Fast Fighter, v3.30' 2010
// Modified a bit for some dummy testing
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(50) of
0: begin
wait(500+random(3000));
writeln ('Antiban performed');
end;
1: begin
RandomMovement;
SetAngle(true);
writeln ('Antiban performed');
end;
3: begin
PickUpMouse;
writeln ('Antiban performed');
end;
end;
end;

procedure SetUpMageTab;
begin
if not LoggedIn then LoginPlayer;
wait(2000+random(3000));
Mouse (747, 190, 5, 5, true); // Magic Tab
wait(2000+random(3000));
end;

procedure SetUpSmartStuff;
begin
Smart_Server := 9;
Smart_Members:= False;
Smart_Signed := True;
Smart_SuperDetail := False;
end;

// This procedure will generate a random spot every 65 alchs approx
// which will allow for some nice constant yet random clicking
procedure AlchItemAndCaseChange;
begin
if not LoggedIn then Exit;
// Pick randomly
case Random(65) of
1: begin
xc := 660 + random (9);
yc := 254 + random (4);
writeln ('New xc/yc: ' + IntToStr (xc) + ' ' + IntToStr (yc) + '.');
end;
end;
// Now with the coordinates that can click on a spot continually... do it!
Mouse (xc, yc, 0, 0, true);
wait (53+random(705));
Mouse (xc, yc, 0, 0, true);
wait (2866+random(652));
end;

begin
n := 0; // Yes I suck, I need to find a way to include this at the start :(
SetUpSmartStuff;
SetupSRL;
DeclarePlayers;
LogInPlayer;
if not LoggedIn then LoginPlayer;
SetUpMageTab; // Gets us to the magic tab
xc := 660 + random (9); // Gets us a random x coord from start
yc := 254 + random (4); // Gets us a random y coord from start
repeat
if not LoggedIn then Exit;
AntiBan;
AlchItemAndCaseChange;
FindNonInventoryRandoms;
n++; // Continue counting up...
until (n > natures)
writeln ('Done!');
LogOut;
end.

Objective: Generate a script where you can click the alcher and the item, without having to move your mouse like a real human would like, but with some randoms so if you move the mouse it will re-align itself.

NCDS

2010-06-29 00:19:00

Just so you know, all the variables:

var natures : Integer;
var xc, yc : Integer;
var n : Integer;
Can be declared at once:

var natures, xc, yc, n : Integer;

Look through the SRL include itself and I think you will find a lot of useful functions for what your trying to do.

Antiban.Scar will include a great number of functions to make your script seem more human like.

If you look in Gametab.Scar you will find that there are functions for switching Gametabs as well.
So this:

Mouse (747, 190, 5, 5, true); // Magic Tab
Could be this:

Gametab(tab_Magic);

You may want to use objects on th Minimap or the MainScreen to keep track of where your character is.
Procedures like the following will get you lost and could very easily be banned. Even though your using randomness after clicking so many times in the same little spot it will get a bit redundant.

// This procedure will generate a random spot every 65 alchs approx
// which will allow for some nice constant yet random clicking
procedure AlchItemAndCaseChange;
begin
if not LoggedIn then Exit;
// Pick randomly
case Random(65) of
1: begin
xc := 660 + random (9);
yc := 254 + random (4);
writeln ('New xc/yc: ' + IntToStr (xc) + ' ' + IntToStr (yc) + '.');
end;
end;
// Now with the coordinates that can click on a spot continually... do it!
Mouse (xc, yc, 0, 0, true);
wait (53+random(705));
Mouse (xc, yc, 0, 0, true);
wait (2866+random(652));
end;

Also:

LogInPlayer;
if not LoggedIn then LoginPlayer;
"if not LoggedIn then LoginPlayer" is alfready called at the beginning of LoginPlayer so there is no need to call it a second time. Just the first "LoginPlayer" will do just fine.

Here:

n++; // Continue counting up...
You would actually just want to use:

Inc(n);
That will increase the value of 'n' by 1.
You could also use:

IncEx(n, 2);
That would increase the value of 'n' by 2. You could replace '2' with any integer and it would work though.

Not a bad start and a good effort :)

I would recommend looking through some other people scripts and just sort of study how they do thing's and try and figure out how it work's.

Then go to the tutorial island part of the forums and read around. There are some excellent tutorials on this website that more people really should take advantage of.

I'm also available to help you out though I am normally quite busy, but I try and check in here as much as possible.

Good luck! :)

Cstrike

2010-06-29 08:15:13

Thank you very much for your help, I appreciate it!

For one question:

You may want to use objects on th Minimap or the MainScreen to keep track of where your character is.
Procedures like the following will get you lost and could very easily be banned. Even though your using randomness after clicking so many times in the same little spot it will get a bit redundant.

// This procedure will generate a random spot every 65 alchs approx
// which will allow for some nice constant yet random clicking
procedure AlchItemAndCaseChange;
begin
if not LoggedIn then Exit;
// Pick randomly
case Random(65) of
1: begin
xc := 660 + random (9);
yc := 254 + random (4);
writeln ('New xc/yc: ' + IntToStr (xc) + ' ' + IntToStr (yc) + '.');
end;
end;
// Now with the coordinates that can click on a spot continually... do it!
Mouse (xc, yc, 0, 0, true);
wait (53+random(705));
Mouse (xc, yc, 0, 0, true);
wait (2866+random(652));
end;


Just for confirmation: I keep the character in the same spot, and change the small alching box (when the variables change, it keeps is so that when you click high alch, you can click your inv item without even moving the mouse, but the script changes it sometimes in this box range to make it seem more realistic.

Would that still be bad?
Should I be moving my character around?

TYVM, I'll be also checking other guides.

PS: Is the findnormalrandoms; or findnoninventoryrandoms; fine where it is?

NCDS

2010-06-29 10:47:37

No, that's not so bad. I might suggest using a color or a DTM or something to identify what you want to click.

marksteele

2010-08-03 01:26:36

if you want some standard anti-bans there's some in the SRL includes like hovering over skills, random right clicks, examines and random invi item. There's a few more, but yah that's the beauty of a language like this, there's so many open source things, that until you get to the point of actually developing your own includes, that you can reduce a lot of the strain on your coding (ofc its still good to know how to make ur own anti-bans ect)

The other thing you might do if you want a working script it take an older script that still works, or just take a newer script and just fiddle around with it. I'm doing that with an alcher I found here, and I'm learning loads about the different includes in srl. (still cant figure out changing and selecting worlds lol)

edit: another easy thing you can add to your script (specially if its just the one char) is breaks. Make it so it takes a break ever 2k alch's or so, and have it log you out, keep logged out for 10 minutes + random amount of time (or something like that), and then have it log back in.