PDA

View Full Version : 5 Easy steps to becoming a scripter



JAD
02-28-2007, 09:53 PM
Well.. this maybe a fairly long tutorial, but it may help you a LOT so just keep on reading, should be over before you know it :p a lot of people after they've read a beginner tutorial maybe thinking "what do I do next?" or "where can i go to learn the next steps to scripting?" or they might even get discouraged saying "I've read a beginners tut, and I have been searching for ways to become one but i just can't find anything to read!" well, if you were thinking any of these things, then you've come to the right place! well heres what I would suggest doing to becoming a scripter. this is going to be kind of based on how I got where I am today in scripting, and I am going to be posting a lot of tuts on this forum that you can read, and will teach you how
to become a scripter :) Heres the chapters:

Chapter 1..... OK lets get started!

Chapter 2.....Learning basic SCAR commands for scripting!

Chapter 3..... Learning to make actual scripts using SRL commands!

Chapter 4..... Adding extra features to your scripts!

Chapter 5..... How to solve pesky errors in your scripts.

the End :( ..... what to do after you have done the above.



Chapter 1..... Lets get started!

If you have SRL AND SCAR installed already, skip chapter 1.
OK, if you don't already have SCAR (shite compared to auto rune is what it stands for) then download it at Dylock.net
then once you have done that, Open scar and you should see something like this:

program New;
begin
end.

if you see that then thats great! you have successfully installed SCAR!
now in SCAR click "File" and click "Download Includes" it should take a minute for them to download. then once you have done that, go to:

http://www.villavu.com/forum/showthread.php?t=2802?t=3410

read that tutorial and download SRL. once you have downloaded SRL, take out what was in SCAR before, copy and past this into it:

program New;
{.include SRL/SRL.scar}
begin
ClearDebug;
SetupSRL;
end.

Now hit the green arrow which will run it. if you get something like this:

SRL Compiled in 782msec.
Successfully executed

in the little debug box in SCAR (or something like that, the amount of msec's maybe different) then you have successfully installed SRL! WOOT! Moving on..


Chapter 2..... Learning SCAR commands for scripting!

well, if you have read the above chapter 1, you maybe thinking "Well this is boring, when do i get to script!" Well it starts right here! if you don't know basic scar commands, or you haven't read a beginner tutorial to scripting SCAR then I would strongly suggest going to either of these links:

http://www.villavu.com/forum/showthread.php?t=4625

thats whocares357's guide to learning to script SCAR as a beginner. very good guide. this is the guide i first started with.


http://www.villavu.com/forum/showthread.php?t=581

another good guide to learning to script SCAR as a beginner. I read this guide after i read whocares357's, I just kinda scrolled through it and zipped past the stuff it talked about in his, cause i understood variables and all that from whocares guide already. you may choose to read this guide first though, both are very good.


http://www.villavu.com/forum/showthread.php?t=2027

another good guide. I didn't really read it too much because when i read the tuts above, i read really slowly so i can understand them :p so really i just kinda scrolled through it and looked at some stuff that wasn't in the other 2 or wasn't explained well in the other 2.

Also you could just open SCAR and press f1 to open a tutorial, not as well explained as the ones above though if you ask me.

OK now once you have read a tut or 2, you should now understand almost everything they talked about. Moving on..


Chapter 3.....learning how to make actual scripts using SRL commands!

OK now that you understand basic SCAR commands, you should read one of my other tutorials to learn SRL commands and how to use them. should be pretty simple if you understand what was taught above :):

http://www.villavu.com/forum/showthread.php?t=6366

just go there and read that. just mess around with some things from there, that will teach you a lot of things. after you read that you should know how to use some very basic but important SRL commands. you should also be able to make a basic color clicker, an auto talker, a progress report to add to scripts and more! that tutorial only features some of the many SRL commands. to learn all of them, download the SRL manual from here:

http://www.villavu.com/forum/showthread.php?t=2802?t=3410

Moving on..


Chapter 4.....Adding extra features to your scripts!

OK now's where this tutorial gets fun! you should now know about making some scripts and things, you might even know how to make a simple power miner from reading my other tutorial. heres where we will add extra features to our scripts to make it look cool. i took some of these examples out of my power miner which i have posted in the SRL free scripts section. now lets begin, I'm going to go straight to some examples first

Anti Ban

function DoAntiBan: Boolean;
begin
AntiBan;
wait(50 + random(100));
BoredEvery(3 + random(3));
wait(100 + random(100))
RotateEvery(7 + random(4));
wait(750 + random(250));
LeaveScreenEvery(5 + random(7));
wait(500 + random(150));
end;

OK now here is some cool anti ban procedures i took out of my power miner. lets break this down. the AntiBan makes the script randomly do some random chatting and other things. then it will do BoredHuman things that you'd do if you have been bored out of your mind mining rune ess or something for 5 hours straight :p the RotateEvery makes it rotate the screen around a few times for anti ban. LeaveScreenEvery makes the mouse leave off the runescape screen which normal people probably do a lot when playing. the timing is in minutes, and in this: (3 + random(3)) it will wait 3-6 minutes randomly and then it will do whatever was said to do. I hope you go that, now lets go to the next part of this chapter.

Options and DTM's

this maybe very confusing but I will do my best to explain it :p first of all, this is now for intermediates here. to learn DTM's (which I am using in my next example) I would suggest going to yohojo's tutorial here:

http://www.villavu.com/forum/showthread.php?t=564

thats a very good tutorial and explains using DTM's very well. now lets go the the options part of this section :p :

procedure DropOre;
var Ore, x, y: Integer;
begin
if (not (loggedin)) then
Exit;
Ore := DTMFromString('78DA63AC64666078CBC8800EFEC36820604 C0' +
'7AAF98CAE86118904D2B94035CF08A8A903AA7944404D2B11 E694' +
'02D5FC22A0A604A8E63E7E3500A8CD0ECB');
GameTab(4);
if (DropCeptPick = false) then
begin
repeat
if FindDTM(Ore, x, y, 820, 471, 995, 733) then
begin
MMouse(x, y, 0, 0);
wait(200 + random(100));
Mouse(x, y, 4, 6, false);
if (ChooseOption(x, y, 'rop')) then
end;
until (not (FindDTM(Ore, x, y, 820, 471, 995, 733)));
if (DropCeptPick = true) and (Players[CurrentPlayer].Boolean1 = false) then
begin
DropTo(2, 28);
end;
if (DropCeptPick = true) and (Players[CurrentPlayer].Boolean1 = true) then
begin
DropAll;
end;
end;
end;

OK now don't freak out! I know this may seem confusing at first but it really isn't. lets break it down. I have a procedure name first of course. then I have a failsafe, if(not(LoggedIn)then Exit so if its not logged in it will not try to do this procedure. then we have a DTM, which you should know about if you read yohojo's tutorial for DTM's. GameTab(4) just opens the 4th game tab (inventory) easy enough so far eh? now heres where its a little more complicated :p but I'll try to keep it easy :p :

if (DropCeptPick = false) then
begin
repeat
if FindDTM(Ore, x, y, 820, 471, 995, 733) then
begin
MMouse(x, y, 0, 0);
wait(200 + random(100));
Mouse(x, y, 4, 6, false);
if (ChooseOption(x, y, 'rop')) then
end;
until (not (FindDTM(Ore, x, y, 820, 471, 995, 733)));

OnlyDropOres is a constant in the script which I did not post. and the user set that to true, It will only drop ores, because it will only drop the DTM (which in this case is a DTM of the ore) then we have it repeat. if FindDTM, just means if it finds the DTM of course. Ore is what we named the DTM. and you should know about the x,y and the numbers after that. so now, if it finds the DTM then it will begin the part where it moves the mouse to the DTM, waits 200-300 miliseconds of course, then it clicks the mouse. then the
if (ChooseOption(x, y, 'rop'))then means it will click on the rop, rop aka Drop. we pick something like rop because its something nobody would ussually say in all chat or something like that. and then of course it will repeat that until it doesn't find the DTM. Next part:

if (DropCeptPick = true) and (Players[CurrentPlayer].Boolean1 = false) then
begin
DropTo(2, 28);
end;

OK, this is more simple. now in DropCeptPick, this is an option I made because when random events come, sometimes you may want the script to drop the stuff from randoms. so for this option, if you want it to drop everything except the pick, and (Players[CurrentPlayer].Boolean1 = false) then it will drop everything besides whats in the first inventory slot (your pick :) ) the .Boolean1 is what i had in the declare players section of my script. false for pick not equipped, true for equipped. so now we got that (hopefully) lets go to the last part:

if (DropCeptPick = true) and (Players[CurrentPlayer].Boolean1 = true) then
begin
DropAll;
end;
end;
end;

so what this does is if DropCeptPick=true and your pick is equiped it drops everything in inventory. same as above. the extra "end;"s are just for closing the begins above it. so as you can see, options can be pretty cool, and you can use your own ideas as I did here. Moving on..

Chapter 5.....How to solve pesky errors in your scripts.

Well when your scripting, unfortunately there will always be errors that you will encounter, but before you go asking for help in the scripting part of the section, try reading one of my other tutorials:

http://www.villavu.com/forum/showthread.php?t=6413

if that doesen't help you at all, then try for a minute figuring out the problem on your own. if you still can't get it, then ask for some help :) or you can just add me on MSN: runescapemacro@hotmail.com and you can always feel free to pm me too :)


the End :( .....what to do after you have done the above.

well, after you have done the above I would just suggest reading through the SRL manual a lot and trying to learn some things, you could go to the tutorial Island section too and read some things on radial walking and Forms. theres probably other things for tuts that you might want to learn too. after that though, best way to learn to script is looking at other people's scripts and trying to see what you can make out of them. if you want a good example, click on My PowerMiner in my sig :D also just ask as many questions as possible, thats how you learn, unless of course the question can be answered without asking it :p well thats my tut. feel free to plus rep me or post any compliments or ways to improve this tut :) thanks for reading.

Gwallunit
03-01-2007, 04:41 PM
wow mate great tutorial really helped me mate thanks !

Gwall

JAD
03-01-2007, 04:56 PM
wow mate great tutorial really helped me mate thanks !

Gwall

Thanks a lot. Glad I could be of help :) just wish I had more people post feed back on it :(

pwnaz0r
03-02-2007, 07:42 PM
I say another sticky poll for the JADster

julle13
03-02-2007, 07:50 PM
Agreed, rep+. Gj jad!

RudeBoiAlex
03-02-2007, 08:00 PM
i give rep this is slowly helping me

JAD
03-02-2007, 08:10 PM
thanks all for being so complimentary :p and I'm happy I could help some of you. the thing about this tutorial though is its pretty much just a tutorial list that guides you through scripting, just thought it might help so people don't have to look around too much, even though there already is a tutorial list :p I'm going to ask if my tuts can be put in there.

NinjaTerrorist
03-03-2007, 12:16 AM
Good tutorial though why do you have this as a function:


function DoAntiBan: Boolean;
begin
AntiBan;
wait(50 + random(100));
BoredEvery(3 + random(3));
wait(100 + random(100))
RotateEvery(7 + random(4));
wait(750 + random(250));
LeaveScreenEvery(5 + random(7));
wait(500 + random(150));
end;


Why do you have this as a function when it dosen't even return a value, you should really just do it as a Procedure. :P

JAD
03-03-2007, 01:44 AM
thanks for pointing that out :p I was trying to finish up tut fast because I had to get off when writing :p I'll fix that :p thanks for the help, and just so I don't seem like a noob, I do know how functions and procedures are different lol.

horton kid
03-16-2007, 01:50 AM
i have read about 3 tuts, this and a few scripts. still really confusing. ALOT easier to prgoram robots by coppying this code from a book telling u what to type. but ow well, i guess im doomed to use publicaly avaliable scripts and get better chance of ban because it is same keystrokes as hundreds of other players. :(

JAD
03-16-2007, 01:54 AM
i have read about 3 tuts, this and a few scripts. still really confusing. ALOT easier to prgoram robots by coppying this code from a book telling u what to type. but ow well, i guess im doomed to use publicaly avaliable scripts and get better chance of ban because it is same keystrokes as hundreds of other players. :(

what do you mean same keystrokes as hundreds of other players?

enoyhs
04-20-2007, 05:17 PM
Thank you so much ;)

I've read like 5 or 6 tutorials now and I think I will start to make my first script soon ;)

I hope it won't be total piece of crap...

PS. It will be Alcher...

JAD
04-20-2007, 09:54 PM
Awesome! Glad to help you with my tutorial (again :p) :D

King Monkfish
04-25-2007, 12:28 PM
Thanks as a new scripter this handy but for now i am making a yew-2-willows scam script:)
Should be finished soon.

JAD
04-25-2007, 03:55 PM
Thanks for posting :D What do you exactly mean by 'a yew-2-willows scam script'?

RudeBoiAlex
04-25-2007, 04:13 PM
lol everyones doing a like boreas sig and yes this tut helps everyone

kautkto
05-03-2007, 09:13 AM
Dude, I can't even get past chapter one lol. (downloading SRL but get this error message before it starts)
kautkto, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

The devil
05-26-2007, 05:20 AM
Nice work jad im giving you rep.

JAD
05-26-2007, 03:39 PM
Dude, I can't even get past chapter one lol. (downloading SRL but get this error message before it starts)
kautkto, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

hmm.... Are you trying to access a members page or something? Try just downloading SCAR Divi, then click Download SRL in the File tab.


@the devil, thanks! This probably isn't one of my better tuts, I actually consider it my worst :p But glad it helped you!

Bebe
05-26-2007, 03:50 PM
I skimmed it. Well done I guess.


http://www.srl-forums.com/forum/tut-...your-t683.html

another good guide to learning to script SCAR as a beginner. I read this guide after i read whocares357's, I just kinda scrolled through it and zipped past the stuff it talked about in his, cause i understood variables and all that from whocares guide already. you may choose to read this guide first though, both are very good.
*her tutorial

JAD
05-26-2007, 03:54 PM
I skimmed it. Well done I guess.


*her tutorial

oh! Sorry lol :p Will change right away ma'am!

tim46
05-28-2007, 12:55 AM
This helped me quite a bit, thanks :)

JAD
05-28-2007, 04:55 AM
NP. Glad to hear it :)

JAD
05-30-2007, 03:22 PM
Nice job man....helped me alot learning how to script :D

Thanks! And good, hope to see you release some of your own scripts some time to :)

Tazzie 02
06-01-2007, 05:23 AM
Thanks JAD! This tut helped me heaps.
+rep

Tazzie

JAD
06-01-2007, 03:21 PM
Thanks a lot! :D Glad to hear it.

kraft1
08-23-2007, 05:46 PM
all the tutorials you mention are very helpful and it just gets better when you apply what you learn in others to what you learn in this one.

kissdemon
08-31-2007, 07:40 PM
Starting to work on my first script and your guides are very helpful. One question though. When I click on the link to the SRL manual I get the message I don't have the right to access this page. Is this because there isn't a manual for SRL4 yet?

popmun
09-03-2007, 12:59 PM
nice stuff keep up the good work :D

popmun.

throwdown
09-03-2007, 04:24 PM
Wow thanks Jad this has inspired me to try scripting

V The Fury V
09-03-2007, 06:54 PM
Thank you so much I can now use DTM's!

SilentScripter
09-03-2007, 07:04 PM
Thxs again for another tut. Every time i read one i understand a little bit more.

sir tien
09-03-2007, 07:16 PM
nice tutorial, i already new the basics of old scar scripts... but this told me a bit more of adding SRL commands and ofcourse DTM's still cant get the hang of them but thats prob me :)

yamaha317
10-14-2007, 10:04 PM
thanks for this it really helped me to get on a path of what to do =)

grimy89098
10-20-2007, 04:32 AM
hey great tut:D
ive read a few of ur tuts and they've helped alot!
thanks!:)

M3talhe4d
10-21-2007, 11:29 PM
Awesome stuff, I thought the anti-ban stuff was really cool.

tckaile
10-22-2007, 09:34 PM
Congrats on a great tut man I read this earlier and the antiban really helps to improve my practice in making script (so as to not get caught experimenting) Cheers mate and keep up the good work!

Xallis
10-23-2007, 02:58 PM
Very good tut. for people wishing to start scripting. Very helpful thanks.

Geebly
10-23-2007, 05:07 PM
Nice tutorial man, thanks for taking the time to teach those less fortunate.

proresearch
10-23-2007, 05:14 PM
good read i book marked this, I will soon be making my own scripts, hopefully, how long it usually take to go from noob to a master?

EvilChicken!
10-24-2007, 08:52 AM
Really, really good jod, JAD.

Thanks a lot for teaching us noobs 5t00f:D


:sasmokin:

Lacky
10-24-2007, 09:57 AM
Nice Tut. +Rep+

One thing you should add is some basic procedures. As you point out in your contents, it says Basic Commands...but you are just referencing. So this would be more a mere reference wouldn't it be?

prolific125
11-01-2007, 08:33 AM
very helpful

Tri
11-02-2007, 01:42 PM
There are quite a few tutorials... This is a must read :D

Cerium
11-04-2007, 10:32 PM
Very good:)

wafyl
11-05-2007, 09:54 PM
Thanks, this really helped!

xs_range
11-06-2007, 07:57 PM
thx, really helped me out :)

lukestasz
11-08-2007, 08:03 PM
wow thanks this really helped me although i am getting there slowly i will soon hopefully be making my own scripts :spot:

nub on the run
11-14-2007, 12:13 PM
Awesome dude, thanks it explained *So Much*! Should be co-writing a very basic script with a friend within the week thanks to you! =D
:spot: :spot: :spot:

supersexynavyman
11-14-2007, 06:28 PM
thx for the great tut kinda confused me at first but i read it a few more times

sureshot12345
11-18-2007, 03:35 AM
nice tut very detailed

wanna b auto
11-25-2007, 12:20 PM
ive tried makin scripts and they dont work :( i dont really have the time or patience for this kinda thing lol jus cant get my head round it i get like half way through the script and i jus give up lol

awesom
11-25-2007, 12:24 PM
That is a really awesome beginners tut man I learnt heaps thanks!!

zypher101
11-30-2007, 10:24 PM
umm i ran into a problem in chapter 1, the part where you download the SRL, i clicked on the link but all it said was

"zypher101, you do not have permission to access this page. This could be due to one of several reasons:
Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation. "

what can i do to download SRL? i really need to be able to auto but i dont know pretty much anything about scripting :( any advice? :confused:

Rune0utMiner
12-05-2007, 06:42 AM
Nice guide, i dont know a thing about Scar, but since i came here today,i am learning the basics.

You Guys/Girls are awesome, I know it takes a long time to write these stickies, and keep them as simple and informative as possable,

thank you.

My script idea is as far as i know,a one of a kind ,i haven't seen one like it yet.

i cant wait until i get the basic principle written,then i can share the idea.

I do know from what ive read so far here, scripting doesn,t seem that hard,once you learn the commands and coding, (im not saying its easy,just isn't impossable to learn)

If i read these stickies enough times,it should sink in,i hope,lol

You people here are Bad Azz, to help people like me,and not look down on us.

RsWasteHack
12-09-2007, 03:38 PM
Didn't really help but thanx anyway :D .

ub3rn00b
12-10-2007, 03:23 AM
tks for all the help. evertime i look at a diff tut im getting more of an idea of scripting.

ybaker
12-10-2007, 09:14 AM
Thanks man!
One day i will become a scripter :)!

daburak
12-10-2007, 11:18 AM
lol i dont get this thread but i jus wanna raise my posting things lol, coz i have the same problem as the person dat made the thread, so im thinking maybe posting alot would let me download scripts, i still gotta learn it :D

joshuaman76
12-11-2007, 01:40 AM
thx it is helping me make scripts that i can make serious cash

TehElite
07-23-2008, 10:35 PM
Great tutorial, explained a lot!

Ghostman
07-29-2008, 04:17 AM
Nice tut, helped me out

zizi
09-04-2008, 11:53 AM
cool thnx

Riffe
11-22-2008, 06:04 PM
Can I make a Woodcutting script by this tutorial?

gimillii1592
11-22-2008, 06:25 PM
Nice...this helped a lot
Good job!

Riffe
11-22-2008, 07:03 PM
Nice...this helped a lot
Good job!


What script did you made?
Can I do what script I want if I do everything they say on this tutorial?

kylescoulter
04-16-2009, 09:56 AM
thanks for the tut. helped alot.