Alright, today I'm going to explain and show you how to make your very first script! This may not be the best guide but it'll still be helpful. I'm not the best at writing tutorials so I hope you can understand that after reading this
Contents
1. What can a Script do?
2. How do I make a Script?
3. Explanation
4. Antiban, Randoms, Errors
5. Conclusion
What can a Script do?
First off a Script can do almost any task that can be accomplished in any event with dedication put into it. This is useful to have your character progressed while you are out having fun and able to have fun with your game character.
How do I make a Script?
Lets start off with defining SRL, SPS, and SMART.
Simba Code:
Program BasicScriptTutorial;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Now what this does is it has Smart loaded up and has SRL in order to accomplish your tasks. SPS stands for SRL.Positioning.System which allows your character to be moving around the world of RuneScape.
Now we'll be setting up our player form which will allow us to have the script login your account and choose a world that you desire it to be on.
Simba Code:
const
{==========Smart Setup==========}
World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
SIGNED = True; // Select True if you are using single account. Select False if not.
{===============================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username goes right here.
Players[0].Pass := ''; //Your Runescape password goes right here.
Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
end;
Explination
Now that we have that done we'll be making our script being able to mine and do various things. But for this we'll just be doing the basics to mining.
Simba Code:
procedure MineTin;
var x, y: integer;
What that has just done is it has made a procedure for our task to be completed. Next we'll have it search for a specific color that corresponds to a certain uptext that we'll be entering.
Simba Code:
procedure MineTin;
var x, y: integer;
begin
if FindObj(x, y, 'in' COLOR, 10) then //This will have the script find an object of your choice
begin
Mouse(x, y, 0, 0, true);
ChooseOption('ine');
wait(1500+random(1000)); // This will make the script wait for a certain time
until (InvFull);
end;
Now this is just a basic procedure for mining tin but I have not given you the color as we'll have to get that ourselves. You'll have noticed that I have written "end;" which will end that procedure if your inventory is full. Now onto Color finding.
Now we'll be selecting our own and color and how this is down is by using the "Pick a colour" tool. Now you will have to click on that tool and select the color you would want.
Now that we have the Color we'll be replacing the "COLOR" text with our color we have selected.
Simba Code:
procedure MineTin;
var x, y: integer;
begin
if FindObj(x, y, 'in' 10658473, 10) then //This will have the script find an object of your choice
begin
Mouse(x, y, 0, 0, true);
ChooseOption('ine');
wait(1500+random(1000)); // This will make the script wait for a certain time
until (InvFull);
end;
You'll notice that there is a 10 after the color and that my friend is Tolerance. I usually set my Tolerance to 10 for my script to work efiiciently but you can alter it to your liking.
Okay so we're able to make our script to mine but it will only do this once and that's it. The next thing we would want to do is to make it walk to the bank and walk back efficiently. Now I know what your thinking "god this is hard" but really it's not. It's pretty simple to do it if you have done it multiple times and got the hang of it. First you will want to download this tool.
Wolygon's Path Creator : http://villavu.com/forum/showthread....highlight=path
Once you have downloaded it you will want to open it up and click new image and hover to
C:\Simba\Includes\SPS\img\runescape_surface\runesc ape_surface.png and browse to a certain area.
You'll want to click the points to a path in which you want your script to walk to. After that is done click the box that has the text of "Click to generate" and you'll be giving some text. You may want to copy and paste this onto notepad. You are also given the SPS Area and in this case I was given 11_7. Keep that number in mind or in notepad.
Simba Code:
procedure WalkToBank;
begin
if (InvFull) then
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
ToBank := [Point(4566, 3145), Point(4566, 3136), Point(4558, 3129),
Point(4551, 3120), Point(4545, 3109), Point(4532, 3095), Point(4519, 3070),
Point(4519, 3061), Point(4521, 3038), Point(4518, 3010), Point(4518, 2997),
Point(4518, 2981), Point(4521, 2953), Point(4525, 2940), Point(4541, 2940),
Point(4555, 2937), Point(4569, 2933), Point(4581, 2929), Point(4579, 2910),
Point(4577, 2903)];
SPS_WalkPath(ToBank);
end;
This is what you would want to have in order to make it walk. Now this just walks to the bank and stands there. Now we would want to make it bank. Now we're at Varrock West Bank so we will be using the following 'vwb' as our bank fuction.
More information about banking over here : http://villavu.com/forum/showthread.php?t=57105
Simba Code:
procedure BankTin;
begin
WriteLn('Looking for bank.'); // Writes in the Debug Box
if FindBank('vwb') then // Finds the bank
begin
WriteLn('We have found the bank.');
if OpenBank('vwb', False, True) then // Opens the bank
begin
WriteLn('Proceeding to bank Tin');
DepositAll; // Deposits All items in Inventory
CloseBank; // Closes the bankscreen
WriteLn('Banking completed. Proceeding to Rest.');
RestUntil(100); // Rests character
end;
end;
end;
Now that we have the banking done I'm going to be introducing Antibans, Randoms, and Errors.
Antiban, Randoms, Errors
I'm sure I know what your thinking. "What is Antiban?" Well, glad you asked! Antiban is a way of making your script do something while it mines or chops or any type of task to look like someone who is legit but sometimes antiban can be a little obvious.
Simba Code:
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Mining', false);
wait(1500+Random(250));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(25+random(150));
MakeCompass('S');
wait(75+Random(150));
MakeCompass('N');
end;
end;
end;
Here I have put in a very simple Antiban for all you out there. It's just a basic one so dont go around thinking it'll be the best. Now Randoms are pretty simple. You will just have to incorporate "FindNormalRandoms;" in your procedures so that it will detect Random events most of the time. Now, lets compile our script shall we! Uh oh is right, since we just got an error message.
Simba Code:
Program BasicScriptTutorial;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
WalkToBank:TPointArray;
const
{==========Smart Setup==========}
World = 0; // Input the runescape world number right here for it to select.You may leave it as 0 if you
would like it to select a random world.
MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
SIGNED = True; // Select True if you are using single account. Select False if not.
{===============================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username goes right here.
Players[0].Pass := ''; //Your Runescape password goes right here.
Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Mining', false);
wait(1500+Random(250));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(25+random(150));
MakeCompass('S');
wait(75+Random(150));
MakeCompass('N');
end;
end;
end;
procedure MineTin;
var x, y: integer;
begin
repeat
FindNormalRandoms;
WriteLn('Looking for Tin to Mine.');
if FindObj(x, y, 'in', 8421770, 10) then //This will have the script find an object of your choice
begin
WriteLn('Mining Tin.');
Mouse(x, y, 0, 0, true);
ChooseOption('ine');
wait(1500+random(1000));
AntiBan;
until (InvFull);
end;
end;
procedure WalkToTheBank;
begin
if (InvFull) then
begin
FindNormalRandoms;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
WalkToBank := [Point(4566, 3145), Point(4566, 3136), Point(4558, 3129),
Point(4551, 3120), Point(4545, 3109), Point(4532, 3095), Point(4519, 3070),
Point(4519, 3061), Point(4521, 3038), Point(4518, 3010), Point(4518, 2997),
Point(4518, 2981), Point(4521, 2953), Point(4525, 2940), Point(4541, 2940),
Point(4555, 2937), Point(4569, 2933), Point(4581, 2929), Point(4579, 2910),
Point(4577, 2903)];
SPS_WalkPath(WalkToBank);
end;
procedure BankTin;
begin
FindNormalRandoms;
WriteLn('Looking for bank.');
if FindBank('vwb') then
WriteLn('We have found the bank.');
if OpenBank('vwb', False, True) then
WriteLn('Proceeding to bank Tin');
DepositAll;
CloseBank;
WriteLn('Banking completed. Proceeding to Rest.');
RestUntil(100);
AntiBan;
end;
begin
Smart_Server := WORLD; //This here sets up the SMART Minimizing Autoing Resource Thing so you can bot.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This here sets up SRL incase you didn't know.
DeclarePlayers; //This here is so the script knows that the player info is filled in with.
LoginPlayer; //This here logs in your player you filled in with.
repeat
MineTin;
WalkToTheBank;
BankTin;
until AllPlayersInactive;
end.
Message : [Error] (77:1): Identifier expected at line 76
Compiling failed.
Now line 76 is right before "Procedure BankTin;" and the reason we got an error is because if your script has for an example in this script.
Simba Code:
if (InvFull) then
begin
FindNormalRandoms;
You must then put another "end;" at the end of that procedure for every "begin" that you have in that procedure in order for that error to go away.
Now this is our final result with this tutorial. This script just mines Tin at Varrock West and banks at Varrock West Bank. Your allowed to edit it if you want but dont go around taking credit for work you didn't do.
Simba Code:
Program BasicScriptTutorial;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
WalkToBank:TPointArray;
const
{==========Smart Setup==========}
World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
SIGNED = True; // Select True if you are using single account. Select False if not.
{===============================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username goes right here.
Players[0].Pass := ''; //Your Runescape password goes right here.
Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Mining', false);
wait(1500+Random(250));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(25+random(150));
MakeCompass('S');
wait(75+Random(150));
MakeCompass('N');
end;
end;
end;
procedure MineTin;
var x, y: integer;
begin
repeat
FindNormalRandoms;
WriteLn('Looking for Tin to Mine.');
if FindObj(x, y, 'in', 8421770, 10) then //This will have the script find an object of your choice
WriteLn('Mining Tin.');
Mouse(x, y, 0, 0, true);
ChooseOption('ine');
wait(1500+random(1000));
until (InvFull);
end;
procedure WalkToTheBank;
begin
if (InvFull) then
begin
FindNormalRandoms;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
WalkToBank := [Point(4566, 3145), Point(4566, 3136), Point(4558, 3129),
Point(4551, 3120), Point(4545, 3109), Point(4532, 3095), Point(4519, 3070),
Point(4519, 3061), Point(4521, 3038), Point(4518, 3010), Point(4518, 2997),
Point(4518, 2981), Point(4521, 2953), Point(4525, 2940), Point(4541, 2940),
Point(4555, 2937), Point(4569, 2933), Point(4581, 2929), Point(4579, 2910),
Point(4577, 2903)];
SPS_WalkPath(WalkToBank);
end;
end;
procedure BankTin;
begin
FindNormalRandoms;
WriteLn('Looking for bank.');
if FindBank('vwb') then
WriteLn('We have found the bank.');
if OpenBank('vwb', False, True) then
WriteLn('Proceeding to bank Tin');
DepositAll;
CloseBank;
WriteLn('Banking completed. Proceeding to Rest.');
RestUntil(100);
AntiBan;
end;
begin
Smart_Server := WORLD; //This here sets up the SMART Minimizing Autoing Resource Thing so you can bot.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This here sets up SRL incase you didn't know.
DeclarePlayers; //This here is so the script knows that the player info is filled in with.
LoginPlayer; //This here logs in your player you filled in with.
repeat
MineTin;
WalkToTheBank;
BankTin;
until AllPlayersInactive;
end.
If you have read this from top to bottom thanks for paying attention. Leave any possible Feedback and Good Luck!