PDA

View Full Version : Total Scripting Technique Tutorial



Torrent of Flame
03-25-2008, 07:40 PM
Compliments to gerauchert for the suggestion. Borrowed some stuff from JAD's tutorial on fixing annoying errors.

Dont forget to Rep++ me or Rank the Thread!

Welcome to the scripting technique tutorial. I will explain how and when to use a certain item of scripting, like FailSafes, etc.

I have to admit though. I probably wont be writing it ALL at once. So look out for the updates on the Horizon! This Tutorial works from the very basic at the start, to the more complex and SRL Member worthy at the end.


Table of Contents


Basic Errors.

How to Begin a Script.

Variables and Constants

Descriptions!

Declare Players

Finding that Object.

Bitmaps.

Clicking.

Banking.

DTM's.

Using DTM's Efficiently.

Standards.

Anti-Ban.

Anti-Randoms.

Main Looping.





Things to make your script appealing


Signatures

Progress Reports

Intoduction

Version History



I hope to add alot more aswell, and hope to teach myself some stuff in the process!


Onto the Tutorial.

Part 1: Basic Errors

Identifier Expected: A Begin without an End. A Repeat without an Until. An If without a Then.

I'm sure alot of the people scripting out there have had this error many times. Identifier Expected is a very basic scripting mistake that people still make, even when they are SRL Members. It is basically where you write your script, but miss out vital parts. It's more annoying when you cant even realise where the error actually is!

Say this was your current script:

procedure WalkToBank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 2, 2, true);
FFlag(0);
Writeln('Got to bank');
end;

You would think, "Amazing - I made my first procedure" You press Compile. '[Error] (12595:4): Identifier expected'. Oh no, another post on the Scripting Help Forums about how you cant fix it at any cost. Just look. After "Writeln".. what is missing? Yes. The End. This is how it should look:

procedure WalkToBank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 2, 2, true);
FFlag(0);
Writeln('Got to bank');
end;
end;

Simple mistake, but ever so annoying.

Invalid number of parameters Ok, a little more difficult, but again, not that hard to fix. When you first start a script, if you instantly include

{.include SRL/SRL.scar}

then when you type a procedure, you get a little box come up when your typing, to tell you what to write, and more importantly, telling you how much should be in the brackets. Say you had this line:

if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7, 10) then

You would think nothing is wrong, I mean, its how I followed that tutorial the other day? Well, it has one too many numbers, or parameters. That 10 shouldnt be there. The FindObjCustom procedure should look like this without any text or input data in it:

http://i29.tinypic.com/9riyw2.jpg

See, it has 5 needed inputs, the X and the Y, The ['Text it should look for'], [The Colours] and the Tolerance.

So 5, in our procedure up there, its 6? So take out that 10, and we have our line compiling correctly;

if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7) then



Close round expected in script Simple again, but alot of people get this error and wonder how they cannot fix it!
Look at this example:

if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol) then

Now, You get that error and wodner.. I dont get it? Why doesnt it work. Well, look at the start. You have two brackets at the beginning, but only one at the end. To prevent this error it should look like this:

if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol)) then

Semicolon (';') expected in script This happens alot to people. They forget to put a semi-colon in their script. I myself still sometiems do this.
This is your current script:

procedure WalkToBank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 2, 2, true)
FFlag(0);
Writeln('Got to bank');
end;
end;

Now you compile and get this error, and your confused? Well, look at the Mouse line. See there is no Semi-Colon there? Well, this is what causes the error. It should look like this to be correct:

procedure WalkToBank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 2, 2, true);
FFlag(0);
Writeln('Got to bank');
end;
end;


Part Two: Beginning a Script

Beginning a script is obviousley very important. Without it, a script wont work. To start a script, it is a very basic thing. All you have to do is this basically:

program ThisIsMyScriptName;

Program - This script is basically a program? And With the bit after, try to make it relevant to your actually mean something. So if its a Varrock Miner, call it

program VarrockMiner;

Draynor WoodCutter..

program DraynorMultiWoodCutter;

Get the idea?

Part Three: Variables and Constants

Variables

Then we have to declare our variables, not variables again explain themselves, something that is a variable, can constantly change. The variables in this case are the x and the y, the co-ordinates on the game screen. It is an "integer" as they are co-ordinates, which are numerical.

var x, y: integer;

Constants

The we include our constants. Constants are basically what they say they are, something that is ALWAYS the same, like RockColours, TreeColours, SMART Worlds, etc.

const
RockColour1= 111111;
RockColour2= 222222;

These Rock Colours would be picked from the Rock You wish to mine, so Iron and Rune would be different, The example colours are obviousley false for any type

Part Four: Descriptions

Descriptions are important. They tell the user what to do on a script, but more importantly, help you to edit a script when you come to work again on a script. They are also useful for crediting procedures and adding little notes.

Examples

Telling the User what to do

//-->Loads<--\\

Loads = 1; //How many loads per player before switching

//--->SRL ID<---\\
YourSRLId = '';
YourSRLPassword ='';

//--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
YourPin = '';

//SMART World\\
SMARTWorld = 152; //What SMART World?


{-------------------------------------------------------
Player Setup
--------------------------------------------------------}

procedure DeclarePlayers;
begin

HowManyPlayers := 2; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player

Players[0].Name := ''; //UserName
Players[0].Pass := ''; //Password
Players[0].Nick := ''; // 3 - 4 NonCapital/No Spaced letters of your User
Players[0].Active := True; // Is this player active?

You see? It helps the user to enter what information he needs to do.

Helping you Edit a script when you need too

When your scripts start to get more complex, spacing and titles help you to find the procedure you are looking for. It is not difficult to put something like:

//---------------------------------ChopTree-----------------------------------\\
So when you edit it, it is easy to find the procedure that you are looking for.

Crediting and Adding Notes

procedure EntFinder; //By Yohojo - Modded by BobboHobbo
var
EX, EY: integer;
FX, FY: integer;
SafeEntWait: LongInt;
begin
if (not (LoggedIn)) then
Exit;
begin
Status('Ent Checking')
if
(FindObjCustom(EX, EY, ['Willow'], [4690821], 7)) then
begin
MMouse(EX, EY, 0, 0)
if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
begin
Status('Found Ent');
MarkTime(SafeEntWait)
repeat
FTWait(5)
FindNormalRandoms;
if not (LoggedIn) then
NextPlayer(False);
until TimeFromMark(SafeEntWait) > 20000 + Random(5000);
end;
end;
end;
end;
You can credit procedures, aswell as adding little notes to scripts to remind you what they do:

Procedure IsAxeBroke;
begin
if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
begin
if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
begin
ChooseOption('rop'); // Edit at next release to bank the broken axe
BrokenAxes := BrokenAxes +1;
end;
For example.

Part Five: Declare Players

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0

Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'erna';
Players[0].Active := True;

end;

Procedure DeclarePlayers tells us the name of the procedure that we are using. Begin starts the procedure [Every "Begin" has an "End", Every "Repeat" has an "Until" and Every "If" has a "Then" - Follow this and it should stop "Idenfitifer Expected"] How Many Players means how many players we are going to use, and Current player tells us which player to start with. Username, Password are pretty basic, but the Nickname HAS to be 3-4 letters of non-capital or without a space of your Username, like mine is. The Active = True tells us if the player is to be run in the script or not.

Part Six: Finding That Object

procedure RockMining;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['Mi', 'ne'], [RockColour1, RockColour2], 7))) then
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 20)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Min', 'ine'], [RockColour1, RockColour2], 7) then
repeat
case (Random(2)) of
1: Mouse(x, y, 4, 4,false);
ChooseOption('ine');
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;

From the Start:

procedure RockMining;
begin
if not LoggedIn then
Exit;

We name our procedure, and then it begins. We have our first Fail Safe. If our character is not logged in, the script will exit.

if (not (FindObjCustom(x, y, ['Mi', 'ne'], [RockColour1, RockColour2], 7))) then
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 20)then
begin
Logout;
Exit;
end else

Well first, if it doesnt find the Object that says "Mine" when hovered over, including a Tolerance of 7, so it can search 7 pixels either side, it will wait 0.2seconds, add 1 to the number of tries, and try again. If it Tries 20 times with no success, it will logout your character, to stop you standing there like an idiot, and then exit the script, and Ends ELSE - IE, otherwise..

if FindObjCustom(x, y, ['Min', 'ine'], [RockColour1, RockColour2], 7) then
repeat
case (Random(2)) of
1: Mouse(x, y, 4, 4,false);
ChooseOption('ine');
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;

If it actually finds the Rock to mine, it will repeat a random of these 2, it will hover over the rock and Choose "Mine" or it will automatically click on the rock, to make it more human like. It then ends the case, and the repeat goes with the until, like I said earlier, so it will repeat mining until it has a full inventory, then ends the procedure.

Now the FindObjCustom is the procedure that finds objects for us, so it searches for the name of the thing, aswell as colours with a certain tolerance, and finds them on the x and y axis.

Part Seven: Bitmaps

Bitmaps are basically a string of code for a picture that you want SCAR to find. To make a Bitmap, you have to go to Tools and go to Picture to String, and you get this screen load up

http://i27.tinypic.com/2dake4y.jpg

Open up the image you want. Dont make it too big, and make the background black, as the Picture to String wont pick up the black. You should get something resembiling this:

MMTREE := BitmapFromString(12, 11, 'beNpjYMAPVFQkgAhNUD9JyL' +
'5AAo8uoAKIGqzKILJwBZjK4ArQlAHZuNRAlOFxmJsZZ5KfKH7 PAhV' +
'QRQ2ZAAD1bBqM');

So it has a name, The Bitmap From String, and the dimensions. Then the code itself.

To use this in the script you would just simple put:

if(FindBitmap(MMTREE, x, y) then

BUT You MUST declare the MMTREE, or whatever bitmap name you have as a Variable integer, so our variable list would look like this:

var x, y, MMTREE: integer;



Continuing with Part Eight Below....

Torrent of Flame
03-25-2008, 07:41 PM
Part Eight: Clicking!

There are many ways to click in SCAR. The most common is:

Mouse(x, y, 0, 0, true);

Where the mouse will move to an object if it is found in a "FindObj" procedure or such, True meaning it will click, False meaning it wont click.

This True/False balance is useful for making cases to make you more human like. For example if you had this procedure:

if FindObjCustom(x, y, ['Min', 'ine'], [RockColour1, RockColour2], 7) then
begin;
Mouse(x, y, 4, 4,false);
ChooseOption('ine');
end;

Now there is nothing wrong with that procedure, but you being human wouldnt always right click and choose "Mine" would you? So you can use the True/False to make your cases which mean that you can be more human like:

if FindObjCustom(x, y, ['Min', 'ine'], [RockColour1, RockColour2], 7) then
repeat
case (Random(2)) of
1: Mouse(x, y, 4, 4,false);
ChooseOption('ine');
2: Mouse(x, y, 4, 4, True);
end;

So sometimes it will move over the rock and choose the Mine, and other times it will just automatically click on the rock.

You can also use ClickMouse, but apparently this is detectable and obsolete now, so we do not use it.

Part Nine: Banking

Copied from my Cutting/Banking Tutorial:

procedure Banking;
begin
if (InvFull) then
begin
MakeCompass('N')
Wait (300 + random(160));
OpenBankQuiet('db');
if (PinScreen) then
InPin(YourPin);
if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
end;
CloseBank;
Wait(150 + random (278));
MakeCompass('S');
end;
end;

It begins by saying If(InvFull) so it will only bank if the inventory is full. It will make the compass face north, and wait about 460.

OpenBankQuiet('db');
if (PinScreen) then
InPin(YourPin);
OpenBankQuiet is a little more laggy, but will open the bank more like a human would, and the 'db' stands for "Draynor Bank" so 'veb' would stand for "Varrock East Bank"

if (PinScreen) then - this means that if the script picks up the Pin Screen then it will "InPin(YourPin)" so as enters your pin for you. (YourPin would be the constant we declared earlier.)

if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then

This means that if looks for the colour 4155248(The willow logs) between the coordinates of your inventory which are the 4 numbers after, then means that it should do .... after the colour has been found.

begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
end;

This means it will begin the following. It looks for the colour, and when found it hovers over the willow log in the inventory, and chooses the option 'All' and then ends the part.

CloseBank;
Wait(150 + random (278));
MakeCompass('S');
end;
end;

This Closes the bank after the logs have been deposited, waits about 400, and then makes the compass south ready for the walk back to the willows in my script. The ends again just end the procedure.

Part Ten: DTM's

Now, a DTM is part of any good SRL Members worth script. It means that you can find objects for walking, or even for making failsafes like I did, but shorter and more efficient than a Bitmap would. To make a DTM we have to go to Tools, then to DTM Editor. You should get this screen pop up:

http://i29.tinypic.com/35lxp8i.jpg

Then you click in the centre of the picture you are using, and branch lines out wards like this:

http://i30.tinypic.com/2qm3w5d.jpg

Then you save the DTM, and open up a new page (Just go to File-->New)

http://i30.tinypic.com/2cj7zp.jpg

Once you have done that, Go to Test -> Find DTM, and open your saved DTM:

http://i25.tinypic.com/194c50.jpg

http://i26.tinypic.com/2h5lni8.jpg

If your DTM has worked, you should get something like this (If you get a little box pop up click "No")

http://i31.tinypic.com/mszn2o.jpg

Then to get the code for a DTM go to "Open" and Reopen your DTM. Then go to "File" --> "DTM To Text". You will get something like this in your Debug box:

DTM := DTMFromString('78DA63E4666060106540011919D9609A11C A6' +
'704A9614255131FAA83AA861F4888A0AA7171F1C454238DAA 2638' +
'2412D32E3435393979A86AD831D5949494A1AA6101126204D 480C' +
'C11445553515189AA861348F0A2AAA9ACAC4255C301245819 D000' +
'23AA1A901902A82ABCBD0351D580DC2289AAC6CDDD1B530D9 ABFE' +
'CED5D50D580DC2285DFEF0078731064');

Now name it, declare it as an integer variable, and use it in the script.

Part Eleven: Using DTM's Efficiently..

Using DTM's efficiently is very important. It means that youcan find thing alot easier, but in smaller code then you would if you used a Bitmap. DTM's are alot faster then BMP's, and also take up less room.

There are two ways to use a DTM:

if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then

or you can use:

if DTMRotated(BrokenAxe, x, y, 547, 206, 734, 464) then

The FindDTM will look for a DTM between the coordinates that you set, but the DTM Rotated will look for a DTM without rotating, then will gradually increase rotation around 0 until it finds the DTM specified.

So if you was using a DTM to find something in your inventory, then you would just use FindDTM, but if you was using a DTM to find something equipped (ForExample) it will Rotate around until it finds it.

To load a DTM you need a simple procedure like this:

procedure LoadDTMs;
begin

DTM := DTMFromString('78DA63E4666060106540011919D9609A11C A6' +
'704A9614255131FAA83AA861F4888A0AA7171F1C454238DAA 2638' +
'2412D32E3435393979A86AD831D5949494A1AA6101126204D 480C' +
'C11445553515189AA861348F0A2AAA9ACAC4255C301245819 D000' +
'23AA1A901902A82ABCBD0351D580DC2289AAC6CDDD1B530D9 ABFE' +
'CED5D50D580DC2285DFEF0078731064');
end;

Now in your MainLoop after you SetupSRL or whatever, you put "LoadDTMs;" like this in my main loop:

procedure SetupScript;
begin
SmartSetupEx(SMARTWorld, false, true);
SetTargetDC(SmartGetDC);
while not SmartReady do Wait(2000);
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
SetupSRL;
ScriptID:= '687';
Signature;
DeclarePlayers;
LoadDTMs; //Load DTMs is here.
LoginPlayer;
end;

Part Twelve: Standards

Standards are pretty good to have in a script. They make it look more appealing and make it easier to read. The basic standards are as follows:

begin
if(blaa)then
begin
LogOut;
Writeln('PlayerLogout')
end;
end.

So 2 spaces forwards per begin and 2 spaces backwards per end.

Im not too good at standards myself though, so this tutorial is good aswell: http://www.villavu.com/forum/showthread.php?t=3293?t=3997.

Part Thirteen/Fourteen: AntiBan & AntiRandoms

From my Tutorial:

Overview

AntiRandoms, and less importantly AntiBan, are needed in any script to make it SRL Member quality [AntiRandoms for sure, AntiBan helps] and to stop it being flawed when Jagex sends out a random to stop us autoing. With the ability to sleep, logout randomly and switch players in SCAR, we can recude the amount of randoms, but ofcourse we still get them. AntiRandoms catch any randoms, save unsolvable ones [Mime, Maze, etc] and solve them.

AntiBan stops robotic movements, and acts playerlike, 'checking' skills, pretending to log out, and occasionally does emotes aswell.

Nicknames and their use with AntiRandoms

You have probably seen this at the start of every script:

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

Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'ame';
Players[0].Active := True;

end;

The important part here is the .Nick part. Enter a few letters of your username and SRL creates a mask of your nickname, and looks for it when a talking random pops up and gives you something.


UsingAntiRandoms

Since the release of SRL 4 Rev#14, the AntiRandoms procedure is pretty basic. All you have to do is setup a procedure following this:

procedure FindRandoms;
begin
LampSkill := 'theskill';
FindNormalRandoms;
if FindFight then RunAway('N',True,1,15000);
end;

LampSkill - Theskill is when you setup a script, ie, fletching, you set it to get the LampSkill fletching
FindNormal Randoms - Finds the normal randoms.
FindFight - If it finds a fight it runs away! Runs North, True ie, it will run north, up about 1 or 2, and waits 15 seconds.

This is all you basically need now. I will explain how to use AntiRandoms later on.

Using AntiBan

When making a script, you need to have an AntiBan procedure, to do what the name says, stop you from being Banned! This is achievable by following something of this sort:

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;
end;
1) RandomRClick - Randomly Right clicks the mouse anywhere in the screen
2) HoverSkill - Hovers over the skill declared in the ' ', but doesnt click on it[why it says false]
3) RandomMovement - Randomly moves the mouse
4) Bored Human - Moves the mouse around like someone who is bored would do.
5) AlmostLogout - Clicks on logout, like someone who might have had enough of playing, and doesnt click, just hovers over the logout button
6) Do Emote - Does an emote, with a 400-490 random chance.


Using AntiBan & AntiRandoms:

Say this is your script:

procedure DeclarePlayers;
begin

HowManyPlayers := 1; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;


end;

Procedure ChopTree;
begin
if not LoggedIn then
Exit;
MakeCompass('N');
repeat
if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7) then
begin
Mouse(x,y,0,0,false);
Wait(500+(random(150)));
ChooseOption('hop')
AntiBan;
Writeln('Found Tree!');

end else
Writeln('Tree Not Found!');
AntiBan;
AntiBan;
AntiBan;
until( InvFull )
end;

begin
Chopping
end.

Now Random Finding happens well, when a Random Pops up, but you have to TELL your script to do AntiBan. Now notice how much AntiBan is in the above script. It AntiBans when chopping, like you do, move the mouse boredly etc, but also when it doesnt find the tree, it AntiBans until it does, or until the inventory is full.

Part Fifteen: Main Looping

From my tutorial

begin
SetupScript;
repeat
WalkToWillow;
ChopTree;
AntiBan;
WalkToBank;
Banking;
if (LoadsNum2=Loads) then
begin
NextPlayer(True);
LoadsNum2 := 0;
MakeCompass('S')
Writeln('Players Switched successfully')
end;
until (false)
end.

So, a little more complicated then it seems.

begin
SetupScript;
repeat
WalkToWillow;
ChopTree;
AntiBan;
WalkToBank;
Banking;

IT begins by doing SetupScript, then Repeats the WalkToWillow, ChopTree, AntiBanning, Walking to the Bank and Banking.

if (LoadsNum2=Loads) then
begin
NextPlayer(True);
LoadsNum2 := 0;
MakeCompass('S')
Writeln('Players Switched successfully')

If the LoadsNum2 = The Loads we setup to do at the constants at the start, it will begin by Logging in the Next Player, making sure that this player is True, IE, it will always repeat. It makes the LoadsNum2 = 0 again so that it doesnt logout instantly, and makes the compass south, writing in the Debug box "Players switched sucessfully'"


Things to make your script appealing

There are a few ways to make your script look sexy and appealing, and also to provide information and make it look official. The first part is signatures:

Part One: Signatures

Go here and get your signature text made up: http://www.network-science.de/ascii/

Now we can start our signature. It is pretty basic. Mine is like this:

procedure Signature;
begin
ClearDebug;
wait(250 + random(30));
writeln(' Torrents Willow Crusher&Banker V2.1 ');
wait(250 + random(30));
writeln(' _____ _ ');
wait(250 + random(30));
writeln('(_ _) ( )_ ');
wait(250 + random(30));
writeln(' | | _ _ __ _ __ __ ___ | ,_)');
wait(250 + random(30));
writeln(' | | / _`\ ( "__)( "__)/"__`\/" _ `\| | ');
wait(250 + random(30));
writeln(' | |( (_) )| | | | ( ___/| ( ) || |_ ');
wait(250 + random(30));
writeln(' (_)`\___/ (_) (_) `\____)(_) (_) \__)');
wait(500 + random(30));
end;

It begins, and ClearDeubg's, which means it clears the debug box from any previous information that was there. It then rolls down the signature (Try it in your SCAR). Mine rolls down because I didnt want it all appearing at once, but remove the waits and you can.

Part Two: Progress Reports

Progress reports are harder, but again not to difficult, this is mine:

procedure ToFProggy;
begin
ClearDebug;
Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,');
Writeln('/\Please Post Progress Reports & Any problems /\ ');
Writeln('/\ From Wherever you got the script /\ ');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\Worked For: ' + TimeRunning + ' //\\');
Writeln('//\\Did: ' + IntToStr(LoadsNum)+ ' Loads //\\');
Writeln('//\\Broke: ' + IntToStr(BrokenAxes)+ ' Axes //\\');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\ Thanks for Using my Script :D //\\ ');
Writeln('````````````````````````````````````````` ``````');
end;

Now note it has IntToStr, which means it turns the integer number (So when it banks the LoadsNum gets a +1 in the script, declared as a variable) into a bit or readable text, and then my LoadsNum in brackets tells it what to get.

Part Three: Introductions

How are you going to know what to do without it? Your not. This is my introduction, but you can make it look however you want. All it has to do is explain what your script is for, how to run it, and where to set it up.

{//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\///
| Draynor Willow Crusher & Banker |
| By Torrent of Flame |
| Scar 3.14 SRL 4.0 Rev 14 |
| Version 2.0 |
| Chops Willows at Draynor and Banks them |
| Start from Draynor Bank |
| Start Logged Out |
| Replacement axes in first 2 bank slots |
| Axe equipped or in First slot |
| |
| How Many Loads at line 25 |
| Setup Player at lines 87-115 |
| SRL Stats at 65-66 |
| Bank Pin at 69 |
| SMART World at 71 |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\

Finally, Part 4: Version History

This helps to tell people what you have updated since the previous version, this again is pretty basic, but I thought I should include it. You can have brief notes like me, or have chunks of text explaining why every update took place:

{/\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.1 Includes |
| Anti-Ban |
| Anti-Random |
| Working Walking (Lol :D) |
| Complete Revision of Script - Sorted Unnecissary codes and BMP's |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.2 Includes |
| Essential Repairs for Banking - Willow DTM was invalid, WillowBMP added |
| Banking Works! |
| Main Loop Fixed - Repeats after banking |
| |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.3 Includes |
| Fixed Banking |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.4 Includes |
| SRL Stats |
| Multi-Player |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.5 Includes |
| BankPin Compatibility |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.6 Includes |
| A Few Failsafes! |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.7 Includes |
| Modified Anti-Ban |
| DTM's |
| SMART (Finally!) |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ |
|Version 1.8 Includes |
| Willow DDTM |
| Axe Checker |
| Broken Axe Checker |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.9 Includes |
| Fixed a few Bugs |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 2.0 |
| Current Release! |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\}


Thanks for reading! Dont forget to Repp++ or Rank the Thread!

mixster
03-25-2008, 07:54 PM
I think his idea was different ways to solve the same problem, such as different dropping methods depending on whether you want speed or accuracy or maybe even re-doing your own SRL functions or procedures to better suit you (e.g. Make 'DropItemCus(i: Integer; DItem: String);' so that you check that you only drop certain items).
It's still a nice tut though ;)

Torrent of Flame
03-25-2008, 07:59 PM
Ah. I like my idea of a very intensive Beginners tutorial :D

Gera sparked my imagination. Im still going to thank him :D

Gabe
03-25-2008, 08:15 PM
I can't wait for progress reports. Having problem with them...and dropping procedures...

Torrent of Flame
03-25-2008, 08:18 PM
Gabe, In my Mining tutorial, my drop procedure was well, improvised. I dont even think its right :P

Still, noone has said otherwise.

But yeah, when I can be bothered to finish, I think this will be a good little Tutorial :D

Gabe
03-25-2008, 08:28 PM
Nah. Hy let me use his dropping procedure. Yay I actually changed things and learned alot from you and Hy by changing things. So yea I didn't completely rip your tut. So I could call it my own script? Different drop, proggies, SRL stats. Eh can I? Yea your dropping thing didn't work.

Torrent of Flame
03-25-2008, 08:34 PM
Hah. Im not too proud of it :P

mixster
03-25-2008, 08:50 PM
I always wondered why people have such problems with dropping when it can be as simple as:

procedure DropFrom(SI: Integer);
var
i: Integer;
begin
for i := SI to 28 do
DropItem(i);
end;

And that is as simple as a custom easy dropping can be ;) Though they can get a lot more complex by adding up text checkers etc. and this isn't even using DTM's/Bitmaps :)

faster789
03-25-2008, 09:31 PM
nice tut....lol ur unstoppable like your on SRL 24/7...gota admit im addicted rite now to scripting my self...so THX for the TUT...im 1/4 done on my hopefully 1000+ lines of my first script...this tut shud help thx...btw u seem reli helpfull can i add u on msn?? and repp++

edit: lol wait i cant rep u cuz u were the last person i repped lol i probli repped u lyk 5 times for different things now:D

EvilChicken!
03-26-2008, 05:20 AM
Nice tut! I hope you get a scripters cup soon, I envy you. -.-

GET job!

Torrent of Flame
03-26-2008, 04:51 PM
Haha. I wouldnt mind the a cup :]

Thanks Evil :D

Yeah, Add me on MSN, Im not too bothered.

And yeah, I am on SRL all the time I can. Hey, Im 14 with a Social life and good education. I need to find something to level out the Sport Social/Heavy Gamer.

This is Socially Nerdish :D

faster789
03-27-2008, 05:50 AM
WOOOT cant wait for part 11 i need sooo badly!! =) in part 11 can u also PLZZ show how to use DDTM to help mapwalking because i've seen many top scripts and it would have a procedure saying "PathtoBank" and they would use a DTM editor apparently...PLZ and THXX A bunch hope you get the cup that you want so badd...:D

faster789
03-27-2008, 05:53 AM
Haha. I wouldnt mind the a cup :]

Thanks Evil :D

Yeah, Add me on MSN, Im not too bothered.

And yeah, I am on SRL all the time I can. Hey, Im 14 with a Social life and good education. I need to find something to level out the Sport Social/Heavy Gamer.

This is Socially Nerdish :D
lol wow i thot i was young..but hmm got a partner i guess :D yea im 14 too u pretty intelligent for a 14 yr old..:p

Torrent of Flame
03-27-2008, 07:32 AM
So I've been told. A Grades at a Grammar School. :D Go me.

Im very up to date on the world around us aswell. =]

MasterKill
03-27-2008, 07:36 AM
can some admin plz give this guy a turial cup?

this looks very nice, understandfull for newbies

GJ

Torrent of Flame
03-27-2008, 07:41 AM
can some admin plz give this guy a turial cup?

this looks very nice, understandfull for newbies

GJ

Thanks Mate :D

Wizzup?
03-27-2008, 10:15 AM
I'll give you that cup if you promise to keep up the good work. ;)

BobboHobbo
03-27-2008, 10:39 AM
To difficult for me :( explain to me in more simpler words.


procedure EntFinder; //By Yohojo - Modded by BobboHobbo

Lol at that procedure.

quiescent_87
03-27-2008, 03:36 PM
very helpful... +rep:(h):

Torrent of Flame
03-27-2008, 04:18 PM
XD. Thanks Wizzup? :D:D I will keep up the work.

Thanks MasterKill for the recommendation!

Bobbo, I dont get the explain it to me bit?

And yeah, it was a credited procedure I used so like, yeah use that one :]

jelmer gf
03-27-2008, 05:07 PM
nice good tutorial!

HyperSecret
03-27-2008, 06:13 PM
geez you get SRL Members and start busting tuts out of you ass left and right. I have a feeling you had these pre-made SRL membership and was waiting until you got in :D. jk

keep up the good work man you are making good tuts for people who want to know how to make something and straight to the point.

i still have yet to write a tut.

Torrent of Flame
03-27-2008, 06:18 PM
Haha. Im writing 1.3 Tutorials a Day apparently :D

Yeah, I had all these written up. Ofcourse *shifty eyes :D*

faster789
03-28-2008, 03:00 AM
:D (waits on part 11..the part that's guna save my lifee:p ...so lost with how to use them...and hopfully for part 12 u can show how to use DDTM's and how to use with mapwalkin..
hmm so u got the cup? if yes ..hel yea u deseved it nd congratzz

Torrent of Flame
03-29-2008, 11:05 AM
Finished the Tutorial! All Areas listed have been covered!

Richard
03-29-2008, 11:08 AM
Wow, just wow, this is just... incredible, rep++++++++++++++++++++ for you :p

I bet you'll be one of the people who get invited to SSRL Mems

Torrent of Flame
03-29-2008, 11:27 AM
Haha. That would be FREAKING sweet :]

Richard
03-29-2008, 11:42 AM
Yep, probably would, I'm hoping to donate today so I might get site suporter status :D

The reason I want to donate is because I've seen how much vBulletin forums cost so we need to keep it alive!

Torrent of Flame
03-29-2008, 12:02 PM
And ofcourse the fact you want the supporter benefits? (If any *Shify Eyes*)

faster789
03-29-2008, 04:19 PM
SWeeettt helpped me sooo much THX>> REPP++

Torrent of Flame
03-29-2008, 04:21 PM
Thanks =]

King of the Nites
03-30-2008, 02:25 AM
THANK YOU! I was waiting for you to finish the using DTMs efficiently and you finally did. It helped me so much! This is such a great TUT!!

P1nky
03-30-2008, 02:55 AM
wow i rec ppl this tut :) its great its really for intermediates:)

so this will boost yall learners to a intermediate :)

chrsk13
03-30-2008, 03:32 AM
:D This will help me tons! Thanks very much! :D Except at the moment I am at some sand dunes on vacation so I don't really have time to read it now. When I get home though I will be sure to read it.

Torrent of Flame
03-30-2008, 10:04 AM
p1nky, I dont think this is intermediate but its above beginner :D

Glad I could help guys!

Richard
03-30-2008, 10:11 AM
And ofcourse the fact you want the supporter benefits? (If any *Shify Eyes*)

No, the fact I want to keep SRL alive.

King of the Nites
04-04-2008, 10:09 PM
repeat
case (Random(2)) of
1: Mouse(x, y, 4, 4,false);
ChooseOption('hop');
2: Mouse(x, y, 4, 4, True);

I was usng this in my script, and i kept on getting colon expected in script and it was for the line with the ChooseOption('hop'); I was wondering if i needed to fix something.

Torrent of Flame
04-16-2008, 07:32 PM
repeat
case (Random(2)) of
1: begin
Mouse(x, y, 4, 4,false);
ChooseOption('hop');
end;
2: Mouse(x, y, 4, 4, True);

EDIT: Updated errors in script :D

AzulDrake
08-25-2008, 04:22 AM
Thanx a mil for this excellent tut Torrent of Flame. I was wondering about the DTMs and you explained it very nicely :)

Keep up with these awesome tutorials you keep on giveing the community

IronGummy Bear
01-04-2009, 04:45 AM
very good tutorial. rep+