PDA

View Full Version : [TUT] Learning the things it takes to become an SRL member!



JAD
04-30-2007, 10:38 PM
Last updated: August 16, 2009



Hey there. If you are a complete beginner, please check out some other tutorials in the beginners section before reading up on this. You must know basic pascal, and some basic SRL stuff like like how to make a color clicker that uses Mouse and MMouse and some other basic SRL functions.


Here's a list of people who have became SRL members after reading this tutorial and requested me to add them to the list:




Nava2 //Can't believe that...


The Claw //This either


skilld u


cut em2 it


stur pure


footballjds


del_signo


the scar noob


Lalaji


BobboHobbo


Tim0suprem0


dudenow12


CheetahNub


Negaal


NaumanAkhlaQ


itschris917


hellbb88


LordGregGreg


hy71194


IEatJ00erBaybees


rudeboialex


badandymitch


steth1010


Dunceiam


belgin fish


NewToAutoing


ashur2good


Kaitnieks


WT-Fakawi


Wizzup?


Boreas


Dankness




OK.. well, maybe not the last 5 lol :p If you read this tutorial and became a member after reading it, please post your name and I'll add it to the list! :D



Heres what this tutorial will go over (What I look for when voting on an app):


Scripting standards. *UPDATED*


DTMs and Bitmaps.


Anti randoms.


Anti ban.


Multi player/player switching.


Fail safes (Oh so important!). *UPDATED!*


for to do statements (Great for looping!)*NEW*


Important use of cases!*NEW*






Here's all the things that you wouln't need, but you really should have if you want to improve your odds of getting accepted:





Radial walking ( a huge ++ of your odds of getting accepted).


Bank Finding, opening and depotising.


Covered symbol finding (Important in a walking script that you are going to click on symbols with)*NEW*




OK, now lets get started!



Scripting Standards!

Now, this is something that really bugs me when people don't use correct ones (Or close to it anyways) And it makes my head hurt trying to read through there code.

Now, they aren't as hard as they look, there actually is a simple pattern to them:


2 spaces to the code after a begin

2 spaces to the code after a repeat

2 spaces back for an end

2 spaces back for an until

2 spaces after a case

2 spaces after a then without a begin after it


So thats about it. Let me give you an example on How you'd do it:


program JADsUber;

procedure DoStuff;
begin
MMouse(100,100,2,2);
repeat
TypeSend('Jad is so cool!');
until(not(FindColor(x,y,123123,MMX1,MMY1,MMX2,MMY2 )));
case random(2) of
0: TypeSend('JADs tutorial is sooo awesome!!!!!');

1: TypeSend('JADs tut is sooo awesome!!!!!');
end;
if(FindColor(x,y,123123,MSX1,MSY1,MSX2,MSY2))then
Mouse(x,y,0,0,true);
end;

begin
repeat
DoStuff;
until(False);
end.


see? I did 2 spaces after every begin and repeat, 2 spaces back for the ends and untils. for the case, you just move the numbers like 0: and 1: up too, then the "end;" to close the case you go back 2 (just like any other end;). And then the if(FindColor thing I put 2 spaces for the next line because there's no begin.

So thats pretty easy right? Its also a lot easier to make sure you have an end for each repeat, and things like that. because if you did it correctly, your last end; will always have no spaces after it.


DTMs and Bitmaps


What is a Bitmap?

Answer: A Bitmap is pretty much a picture on the computer, taking each pixel and turning it to text so you can put the text in SCAR.


What is a DTM?

Answer: A DTM looks for a color, and looks for the next color in a certain distance away from it. For instance, if you clicked somewhere on a log, and another point on the log, it would measure the distance between the 2, take the colors, and then it would look for the first color, checking if the color is the distance away from the first click as you made it before.


Making the bitmap


First, lets start with bitmaps. First I'll tell you how to make one, then we will learn how to use them in a moment. First, open runescape, log in, and press the print screen key located at the top of your key board (On most key boards at least). Different key boards sometimes have different abbreviations for the print screen key, so it may say PrtSC...etc. Your smart though, you can find it ;)

Now open up paint, hold control and press v while holding control. The picture should have popped up in paint now.

Now we are going to chop down the image so it doesn't look for the whole runescape screen. Click on the magnifying glass so you can zoom in on what you want, and be more precise. Use the little rectangular tool in paint, and click and drag to make a box with the picture you want inside the box.

Now right click on the rectangle/box you made, and click copy. Open a new paint, or just click new and erase what you had. Make the white thing as small as possible, hold control and then press v while holding control. Now you have your image chopped down!

Now save it to somewhere you'll remember, open up SCAR, click the tab script, click picture to string. Click open, and look for the picture where you saved it in your files. Double click it and it'll open in to the picture to string window thing. Press ok and in the debug you should have a lot of text saying Bitmap := 'aosignowha' and probably a LOT longer then that :p

Using the bitmap.


Now to use a bitmap, there are many many different ways too. Lets say you made the bitmap of a tree on the main screen. What I'd suggest doing to find it, is Do something like this:

The Bitmap := thing, replace the "Bitmap" with whatever you want to call it (Example, you could call it Willow or Log or even philip :p....etc.) Now make a variable called whatever you replaced "Bitmap" with. Lets say you made the bitmaps name Tree. Now heres what we are going to do:


var Tree, TreeColor: Integer;
procedure AutoColorTheTree;
begin
Tree := BitmapFromString'aoginwagowiaghwagwagawgwg'; //the bitmap.. you get it.

TreeColor := AutoColorThis(Tree,100,MSX1,MSY1,MSX2,MSY2);
Writeln(IntToStr(TreeColor));
end;


So let me explain that. First we have the variables. then in the procedure I declared the bitmap, And then with the TreeColor := thing. What AutoColorThis does is looks for the bitmap that you put after the ( (tree in this instance), and picks a color from there and of course then TreeColor = it because thats what we have it equal.

So then TreeColor = whatever the color was picked at, and then you can have it click the tree or do whatever you want. Here I had it just writeln the color so you can see how it works. The bitmap Has to be visible in the coordinates box you made! So MSX1,MSY1...etc. looks for the bitmap on the main screen.

the 100 is the maximum tolerance to look for the bitmap with. If it does not find the bitmap after exceeding the maximum tolerance, it will writeln Color NOT found! because thats built into that function in SRL. Hope that wasn't too confusing.. lets move on to DTMs! :D


Making DTMs


Well DTMs are mostly used for items in your inventory/bank, because that is when they are most efficient because items in your inventory/bank are never at a different angle, and they have a black outline.

So to make a DTM, first take a screen shot like we did with the Bitmap. Open up paint, paste the screen shot in there, open up SCAR and drag the crosshair of SCAR onto paint.

Now once thats all done, click tools and go to DTM editor. Now a screen should pop up with your screen shot on it. To make the DTM, click some points on an item or whatever you want.

Once you have all the specified points of the item or whatever it is your making, click on the top parent in the right hand corner of the DTM editor. make the tolerance 30 and make the Area Size 3. Click the next parent and change the tolerance and Area.....etc. Do that until all the parents equal 30 tol and Area Size of 3.

Now click DTM to text. You should have some letters and things like that just like the bitmap. name it what you want, and make a variable just like we did with bitmaps. Easy enough right? Hope I explained that well enough! :D

Using the DTM

Note: In the example below, I just made the DTM log. You can make it whatever you want.

Now to use the DTM, all you need to do is something like this:


var Log: Integer;
procedure DoWhatever;
begin
Log := DTMFromString('.....etc');
if(FindDTM(Log,x,y,Coords1,Coords1,Coords2,Coords2 ))then
begin
Mouse(x,y,2,2,true);
Writeln('clicked the DTM!');
end;
end;


See how that works now? Just in the Coords thing make your own coords box. Just like a bitmap once you make it.

Just so you know though, DTMs are pretty advanced to do on the main screen/mini map or anything other then inventory and bank. So I wouldn't try to use them on there yet, just use bitmaps or color finding for that.

If I didn't explain DTMs well enough, you could always check out Yohojo's tut too :p

Anti randoms

Now, I'll give you the anti randoms functions/procedures I use in my scripts:


function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

///////////////////////////////////////////////////////////////////////////

procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
end;


OK, now first of all, in the FindRandoms procedure, (Don't pay attention to the FindFastRandoms function yet, I'll talk about that in a sec) We have FindNormalRandoms;. SRL makes random finding so easy with that. This finds all talking randoms, all fighting randoms, mystery boxes, lunch lady....etc. It does not however find the impossible to solve randoms (Like EvilBob...etc).


Now what FindNormalRandoms doesn't cover, is what FindFastRandoms does. FindFastRandoms was made by WT-Fakawi, and you can use it in your script if you give credits to him for it of course. (Almost everybody uses it.) What it does is looks for things that FindNormalRandoms; doesn't like mods...etc.

Now, to find all talking randoms efficiently, SRL uses this:


NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);


What that does, is creates a bitmap mask of your current players nick in the Declare players procedure. (The Declare players procedure I talk about in multi player/player switching..) A nick is 3-4 letters of your user name, which to work most efficiently should have no capitals, and not be a word.

Then when a talking random comes, FindNormalRandoms; will find that bitmap mask of the talking random Saying Hello JAD (or whatever your name is).


Anti Ban

Well, here is my custom AntiBan function I made. Please don't copy this and use it in your own script, make something using a case statement like this using custom things you made. Here it is:


procedure AntiBanage;
begin
if(not(LoggedIn))then
Exit;
case Random(13) of

0: RandomRClickEvery(3 + Random(3));

1: begin
HoverSkill('Fishing', false);
wait(2000+random(1000));
GameTab(4);
end;

2: begin
HoverSkill('Cooking', false);
wait(2000+random(1000));
GameTab(4);
end;

3: JADCompass;

4: RandomChatEvery(4 + Random(4));

5: LeaveScreenEvery(10 + Random(4));

6: PickUpMouse;

7: BoredEvery(10 + Random(5));

8: begin
GameTab(1 + Random(12));
wait(1000+random(1000));
GameTab(4);
end;

9: begin
case random(4) of
0: TypeSend('Fishing lvls?');

1: TypeSend('Fishing levels');

2: TypeSend('Cooking lvls');

3: TypeSend('Cooking levels');
end;
end;

10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);

11: AntiBan;

12: SleepAndMoveMouse(600000+random(300000));

end;
end;


OK, now we are going to look at this number by number. First of all though, we have a random 13 case. This will randomly choose one of these anti bans we made so we don't keep doing the same thing, which would almost make us more detectable to Jagex. If its not logged in it exits (A Failsafe, I will be talking about that soon too).

0: RandomRClick performs random right clicking. the parameters are in minutes of when you want it to do it. so I have it every 3-6 minutes randomly.

1: HoverSkill opens the skills tab, and hovers the skill of your choice. The false means not to click, if you put true that would mean click on the skill. Then I have it wait a little, and go back to the inventory tab.

2: I have it do almost exactly the same thing as 1:, but it hovers over the skill cooking.

3: JADCompass; is a procedure I made in my script which I'll be releasing soon :p The procedure just rotates randomly then makes the compass north again. You can make your own procedure for that too.

4: RandomChatEvery does just what you'd think it does. It types random sentances. The numbers are in minutes of when to click just like for 0:.

5: LeaveScreenEvery also does just what you'd think it does. It moves the mouse off the runescape client. The numbers are in minutes of when to click just like for 0: and 4:.

6: PickUpMouse acts just like you picked the mouse up off the mouse pad, and set it back down.

7: BoredEvery just performs bored human actions you'd do when your extremely bored. And I've talked about the numbers 3 times before this already.. :p

8: Just clicks a random game tab, waits a little and clicks back on the inventory tab.

9: I just made my own random chatting to ask fishing or cooking levels.

10: MouseBox moves the mouse randomly to a point in the coordinates box you specified. My coordinate box is of the main screen, so it just moves the mouse to a random spot on the main screen.

11: AntiBan; just does some random stuff :p

12: SleepAndMoveMouse moves the mouse like a bored human would. different then 10: because it doesn't just move straight there.


Multi player

Ahh yes, the almighty multi player. Well first of all, heres how a player array would look for multi player:


procedure DeclarePlayers;
begin
HowManyPlayers := 6; //Number of PLAYERS. active or not.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on.

//set all user names, passwords and nicks correctly please.

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

Players[1].Name := 'UserName';
Players[1].Pass := 'Password';
Players[1].Nick := '3-4 letters of UserName';
Players[1].Active := False;

Players[2].Name := 'UserName';
Players[2].Pass := 'Password';
Players[2].Nick := '3-4 letters of UserName';
Players[2].Active := False;

Players[3].Name := 'UserName';
Players[3].Pass := 'Password';
Players[3].Nick := '3-4 letters of UserName';
Players[3].Active := False;

Players[4].Name := 'UserName';
Players[4].Pass := 'Password';
Players[4].Nick := '3-4 letters of UserName';
Players[4].Active := False;

Players[5].Name := 'UserName';
Players[5].Pass := 'Password';
Players[5].Nick := '3-4 letters of UserName';
Players[5].Active := False;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;


See at the bottom, we used that thing NickNameBMP just like we do for the AntiRandoms thing. Just put it in there and you should be good :D Now you should already know how to fill one out and stuff like that.

Now to switch players, you need a procedure like that near the beginning of your script, and then do something like this:


if(LoadsNumB=Loads)then
begin
NextPlayer(True);
LoadsNumB:=0;
HighestAngle;
MakeCompass('N');
Writeln('Switched players successfully! :)');
end;


Let me explain what I did first of all. You should already know about making a progress report, so this should be easy. LoadsNumB is a variable I made, and I add to it each time I bank something. Loads is a constant that the user sets for how many loads to do before switching players.

So pretty much, if it did the specified number of loads, It switches players.

NextPlayer(True) switches players leaving the ones activity you switched off of to true.

NextPlayer(False) switches players leaving the ones activity you switched off of to false.

Then I make LoadsNumB = 0 again so that it restarts counting the loads.

But heres the problem I encountered before. When you make LoadsNumB = 0, and you want to display how many loads you did in the progress report, it will = 0 again! So you can't make a progress report! Actually, you still can though :D All you need to do is set 2 variables, and add 1 to them each time you do a load.

Then the first variable you make display in the progress report and that never goes to 0, and the other one you just use for counting how many loads the player has done.

Then I just make it go to the highest angle for the new player, make the compass North and Write in the Debug that you switched players.




Continued below...

alach11
04-30-2007, 11:04 PM
Very well made...

JAD
04-30-2007, 11:17 PM
FailSafes

Now heres the thing, look at this example:


procedure Whatever;
begin
repeat
Wait(100+random(100));
until(FindColor(x,y,123123,MSX1,MSY1,MSX2,MSY2));
end;

Now you may not see anything wrong with that. its coded correctly right? has correct standards.. BUT, its loops like this that will make your script very unreliable. Do you know what the problem is? If you do without me telling you, then thats great!

The problem is, it repeats waiting until it finds the color. but what if it never finds the color? It keeps moving the mouse forever!! So here is how a smart scripter would make that loop:


procedure Whatever;
var Tries: Integer;
begin
repeat
wait(100+random(100));
Tries := Tries + 1;
if(Tries = 50)then
begin
Writeln('Tried to find the color 50 times.. unsuccessfully though :( Terminating script..');
TerminateScript;
end;
until(FindColor(x,y,123123,MSX1,MSY1,MSX2,MSY2));
end;


See? You really need things like that, or else your script will go into a never ending loop of looking for a color or something like that.

One of the most common/mostly used failsafes is:


if(not(LoggedIn))then
Exit;


Thats a great fail safe so that it doesn't try doing the procedure if your not logged in. Its fail safes that us members REALLY like to see!

Another very good and very commonly used fail safe is IsUpText. You could do something like


if(FindColor(x,y,RockColor,MSX1,MSY1,MSX2,MSY2))th en
Mouse(x,y,2,2,true);


Now, that could work.. But it wouldn't be very reliable if there was a color around that wasn't the same as the rock, which Jagex likes to do a LOT to stop us autoers. But, we can't be stopped :D Here's how a smart scripter would make that:


if(FindColor(x,y,RockColor,MSX1,MSY1,MSX2,MSY2))th en
begin
MMouse(x,y,2,2);
if(IsUpText('Mine rocks'))then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
end;
end;


Normally, you try to avoid looking for capital letters and look for less text when looking for up text, but I just used that so you'd get how it works. I'd do like if(IsUpText('ine'))then though like that, because you only have to look for a few letters that aren't capitals.

But if the mine rocks text isn't up, it wouln't click, meaning it wouln't click on the wrong thing! Thanks god! :p

The reason I used GetMousePos though, is because when you move the mouse to a rock playing legitly, you usually don't move it, stop and click somewhere else.. You move it to the rock, and click at the same spot. So you just use that to get the position of where the random parameters made MMouse end up, and then it clicks there.


Marking times is a very good fail safe, and is fairly commonly used. Here would be a not to smart way to mine ores until your inventory is full:


procedure MineOres;
begin
repeat
if(FindColor(x,y,RockColor,MSX1,MSY1,MSX2,MSY2))th en
Mouse(x,y,2,2,true);
wait(1000+random(500));
until(InvFull);
end;


Here would be the smart way:

procedure MineOres;
var MiningTime: Integer;
begin
MarkTime(MiningTime);
repeat
if(FindColor(x,y,RockColor,MSX1,MSY1,MSX2,MSY2))th en
Mouse(x,y,2,2,true);
wait(1000+random(500));
until(InvFull) or (TimeFromMark(MiningTime) > 600000+random(60000));
end;


see that? Now of course you'd have more fail safes in there for the clicking on rocks.. That was just an easy example. But this would repeat clicking the rock and waiting until the inventory is full, or you've been mining 600000 milliseconds (10 minutes) plus a random 60000 milliseconds (1 minute).

So if it takes that long and your inventory isn't full, it will stop looping. Very good fail safe which can be used with many more things.





IMPORTANT!: NEVER have a loop without a fail safe! So never do something like


repeat
OpenBank;
until(BankScreen);


(OpenBank is something you'll learn about in the bank section.. But it just looks for the bank and opens it. And bank screen just results true if your at the bank screen). But see what's wrong with that?? What if your not at the bank? It will repeat trying to open the bank until it finds the bank screen, but if your not at the bank, it will do that forever, getting your charactor BANNED!

Avoid doing that, and use a fail safe for something like Tries := Tries + 1; or you can use a for to do loop which you will learn about below.





For to do statements



Well, these are very handy to use for looping. Let me look through my scripts and see if I can find a good example... :) OK, we'll use my chopping procedure :) I modified it a lot so we don't focus on the clicking of it, I'm just going to use the for to do statement to look for the color, and then if it finds it it will just click there (of course you want to be a lot more advanced and use fail safes in your clicking, but bare with me :p):

procedure DoSomeChopping;
var I: Integer;
begin
for I := 1 to 7 do
begin
if(FindColorTolerance(x,y,192865,MSX1,MSY1,MSX2,MS Y2,I))then
begin
TreeFound := True;
Break;
end;
end;
if(TreeFound)then
Mouse(x,y,2,2,true);
end;


OK, well, here's what a for to do loop does. It starts by making I = 1, (1 to 7. So the first number is the start of I or whatever you put between the for and :=) and it repeats adding 1 to I until it = 7. So this would start off making i = 1, and it would look for the color with the tolerance of what I is. If it finds the color, it breaks out of the loop and it will stop doing that. If it doesn't find it, it will keep going by making I = 2, look for the color with tolerance of I, and it will repeat doing that until I = 7.


for I := 3 to 8 do
Mouse(x,y,I,I,true);


See that? That will start I at 3, mouse at x,y with I as it's random parameters, add 1 to I, click at x,y with random parameters of I, add 1 more to I......etc. until I = 8.


So it can be pretty useful for adding to tolerance like that. Why add to the tolerance when it's not needed right? This will make your color finding with tolerance more reliable.

Hope I explained that well :D






Important use of cases


Well, whenever I see something in an app like this:


if(WhatToBuy = fire)then
BuyFireRunes;
if(WhatToBuy = water)then
BuyWaterRunes;
if(WhatToBuy = earth)then
BuyEarthRunes;
if(WhatToBuy = air)then
BuyAirRunes;
if(WhatToBuy = Body)then
BuyBodyRunes;


Now.. Doesn't that just look terrible? I just used that as an example, but you can use cases like this one I'm going to use below for a LOT of things!:


case WhatToBuy of
'fire': BuyFireRunes;
'water': BuyWaterRunes;
'earth': BuyEarthRunes;
'air': BuyAirRunes;
'body': BuyBodyRunes;
end;


NOTE: The "WhatToBuy" used in the examples is a constant that would be at the beginning of the script asking the user what to buy, and the BuyFireRunes, BuyWaterRunes....etc. are just procedures that it would do depending on what the user set as WhatToBuy.


Now, doesn't that look much more neat then the first one? So what this case does, is it's casing a string because the WhatToBuy constant is a string. If WhatToBuy was an integer (number), and it was like set it to 1 for fire, 2 for water, 3 for earth....etc., then you'd do the same thing except change the 'fire', 'water', 'earth'...etc. to 1, 2 and 3.

So what a case does, is it pretty much takes what the thing you put after the case and before the of, and picks what it is. And it does whichever it matches. The things under it are just options. So it's pretty much saying if WhatToBuy = fire then BuyFireRunes, but in a shorter way.

Using cases like this but you want to do more then 1 thing if fires or waters or earths....etc. was what it was set to, you'd just put after the ":" a begin, do the stuff and then "end;".

Hope you got that. If I ever see somebody applying for membership without putting cases and having a whole bunch of if then's like that, I may put a huge down mark on there score, and wouln't say yes unless there script was really good. So please, use cases where possible :)





Radial Walking


How to search the map using radial walk
First off, open up SCAR. click tools, explore folder, SCAR folder. Double click the includes folder, then double click the SRL folder. Double click scripts and then double click RadialWalkingAid. (NOT RadialWalkingAidForm!) It should open in SCAR, if it opens in note pad or something else, just copy and paste the code into SCAR.

Now, log into runescape and make sure the map is visible and not covered by something like the SCAR window. Run the radial walking aid, and click Capture From Client. Now in the little square picture thing in the form, there should be a picture of the mini map. That means you did it correctly.

Now, see the little boxes near the bottom left corner? They say StartRadial:, EndRadial: and Radius. Click on the StartRadial box and type in 90. Click the EndRadial box and type in 270. now for the radius type in 70. Now click show path.

You should see red lines drawing on the mini map now, drawing out half a circle on the bottom half of the mini map. Now, what this means, is if you were to put this in your script for SCAR:


RadialWalk(color,90,270,70,2,2);


that would search the bottom half of the mini map for the color! If you were to type it in back wards and do StartRadial 270, EndRadial 90 and radius 70, it would search for it from left to right instead of right to left. Just try it and hit show path and you'll see what I mean.

Now that we got that, you can make your start radial and end radial more precise, so they search for the road color or whatever you want, but not on half the mini map. What the radius is is just how far out it searches. Try that again, but make the radius 40. See? It searches closer in. Easy enough.

Walking with RadialWalk

Now to walk with radial walk, all you need to do is what I did in the example above:


RadialWalk(Color,startradial,endradial,radius,rand omx,randomy);


Now what the randomx and randomy are, is the parameters to click off by just like in the Mouse command. So what RadialWalk does, is looks for the color in the area you made, and if it finds it, it will click it and will click a little off depending on your randomx and randomy.

RadialWalk is great, but it doesn't have tolerance right? So what if the colors shift in game? Well.. that would really suck and screw you up! :p (There is a command called RadialWalkEx that radial walks with tolerance, but I don't find that as reliable as what we are going to do below) But, there is a way to auto color it!

Remember in the bitmaps section I talked about AutoColorThis;? Well, I'll give you a little bit more of an explanation on that, then we will do some walking with that.

Heres how this would mostly be used for auto coloring the map:


Color := AutoColorThis(TheBitmap, 50, MMX1, MMY1, MMX2, MMY2);

So that is how it is mostly used. Heres what you fill the parameters in with.

Color you can name anything. So once you name it, make a variable you want it to save the color to. Remember, you must declare that as a variable though like var Color: Integer; (Or whatever you named it)

AutoColorThis is the command of course :p TheBitmap you can make any name for (Of course naming the variable the same thing) and of course declaring the picture like BankBMP := BitmapFromString('awgon')..etc. as I did in my script.

50 Is the maximum tolerance you want the command AutoColorThis to look for the bitmap with.

the rest is just parameters for where you want it to look for the bitmap to auto color. MM stands for mini map, so that would look for it on the minimap.

Once it does all this, if it finds the bitmap you made, it will save the color to the Color variable. (or whatever you made it) This is great to use when you are walking somewhere without a road/water.


OK, so heres how it would be used to walk. First of course, make a bitmap and a variable for the color and a variable named the same as the bitmap. Then, make a bitmap of something on the map of runescape and do something like this:


procedure Walk;
var TheColor, TheBitmap: Integer;
begin
TheBitmap := BitmapFromString('agawggagwhea')//.....etc (The bitmap.. you know :p)

TheColor := AutoColorThis(TheBitmap,75,MMX1,MMY1,MMX2,MMY2);
RadialWalk(TheColor,0,360,70,2,2);
Flag;
end;


Lol, see how I made start radial 0 and end radial 360? Don't do that, that would check the whole map :p Just check the section where its at, and a little bit around it just to make sure the map didn't rotate. Flag; just waits until the flag doesn't exist if you didn't already know that.

Note: Jagex rotates your compass slowly while in game to prevent radial walk, so be careful with how you make your start radial and end radial.

Now, If you are making a script where theres a road, (Which most things you'd make that bank have a road) Then you should use RadialRoadWalk. (Awesomeness) It's so much less work then making the bitmap, and doing all that code. This is how RadialRoadWalk would work:


procedure Walkage;
begin
RadialRoadWalk(FindRoadColor,0,360,70,2,2);
Flag;
end;


Wow that was easy wasn't it? Once again, don't make the parameters 0,360 , make them a lot more accurate. FindRoadColor is a command in SRL which auto finds the road color, without me and you needing to do anything but pick out the coordinates for where to walk! RadialRoadWalk = ownage if you ask me.


Bank Finding and opening

OK, now here is how I use it for my willow cutter, and my script thats coming out soon :) :


function BankIt: Boolean;
begin
if (InvFull) then
begin
MakeCompass('E');
OpenBankQuiet('db');
Flag;
wait(500 + random(500));
FixBank;
if (FindDTM(Lobster, x, y, 568, 209, 742, 460)) then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(Tuna, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(SwordFish, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
CloseBank;
MakeCompass('N');
if(Result)then
begin
LoadsNum := LoadsNum + 1;
LoadsNumB := LoadsNum + 1;
end;
end;
end;


Now lets take this from top to bottom. Its a Boolean function of course. First of all we check if the inventory is full, and then we make the compass East. Depending on where your banking, you may want to rotate the compass a different way.


Now OpenBankQuiet is a SRL command (Obviously) that opens the bank normally without any weird mouse movements missing the bank. So it gets straight there. Another one I'd suggest using if OpenBankQuiet doesn't work is OpenBankGlass;. Those are probably the 2 best.

we have it Flag, and then I made some DTMs of lobster, tuna and sword fish. If it found those in the inventory, it right clicks on them and chooses the option All (Deposit All). You can make a DTM of anything whether it being over...etc. and just right clicking and clicking deposit all.

So we have it do that for all the DTMs until theres no more fish in the inventory (hopefully). We close the bank, make the compass north again and then it results true. If it results true then I have LoadsNumB and LoadsNum + 1, thats just for the progress report and player switching.



Covered Symbol Finding


Well, if your going to make a walking script with clicking symbols, your probably going to do something like this:

procedure DoTheWalkingStuff;
begin
//Your radial walking stuff..
if(FindSymbol(x,y,'bank'))then
Mouse(x,y,2,2,true);
end;


I just used the bank symbol as an example because it's covered very often. So yeah, that's fine if you want to just pray to god that the symbol isn't covered, but what if it is? That's why I made my JadSymbol function which I'll be releasing in my next script :)


{************************************************* *******
function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;
By: JAD
Description: My symbol finding. Repeats waiting and
looking for symbol until found or took too long. Clicks
the symbol if told to. Will switch players if it doesn't
find the symbol if told to.
************************************************** ******}

function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;
var I: Integer;
begin
for I := 1 to 25 do
begin
if(FindSymbol(x,y,(WhatSymbol)))then
begin
if(Click)then
Mouse(x,y,2,2,true);
Result := True;
Exit;
end;
wait(750+random(500));
end;
Writeln('Could NOT find symbol.');
Result := False;
if(Switch)then
LogOut;
end;


so it looks for the symbol that the user set at the WhatSymbol, it clicks the symbol if told to, and it will log out if it doesn't find it and Switch was set to true. So here's how it'd be used in your procedures then:


program Whatever;
{.include SRL/SRL.scar}

{************************************************* *******
function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;
By: JAD
Description: My symbol finding. Repeats waiting and
looking for symbol until found or took too long. Clicks
the symbol if told to. Will switch players if it doesn't
find the symbol if told to.
************************************************** ******}

function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;
var I: Integer;
begin
for I := 1 to 25 do
begin
if(FindSymbol(x,y,(WhatSymbol)))then
begin
if(Click)then
Mouse(x,y,2,2,true);
Result := True;
Exit;
end;
wait(750+random(500));
end;
Writeln('Could NOT find symbol.');
Result := False;
if(Switch)then
LogOut;
end;

begin
SetupSRL;
JadSymbol('bank',true,true);
end.


so now, that would look for the symbol bank doing the JadSymbol function, if it finds it it will click, and if it doesn't find it after trying 25 times and waiting, it will log out. See? Pretty nifty isn't it? :p You can use that function in your scripts if you like, but I'd like credits if you do :)






Well, thats my tutorial for now. It took me a long time to write so please feel free to post any comments on it. If you have any suggestions or any problems understanding a certain area because I didn't explain it well enough, Please! Post it so I can fix it. Thanks, and I'll be waiting on your members app! :D

wobbii
04-30-2007, 11:35 PM
omg this owns

JAD
05-01-2007, 12:54 AM
omg this owns

Thanks a lot wobbii! Glad you liked it :D

rkroxpunk
05-01-2007, 02:09 PM
Sweet Tut JAD. I'm sure you'll get Tut writers cup for this it's awesome. You explained everything perfectly. You just might want to fix up a bit in ur failsafes section. You missed an apostrophe in Writeln and it made the rest of it pink :D

JAD
05-01-2007, 03:48 PM
Sweet Tut JAD. I'm sure you'll get Tut writers cup for this it's awesome. You explained everything perfectly. You just might want to fix up a bit in ur failsafes section. You missed an apostrophe in Writeln and it made the rest of it pink :D

Thanks! And thanks for pointing that out, I'll fix it right away!

wobbii
05-01-2007, 08:48 PM
Sweet Tut JAD. I'm sure you'll get Tut writers cup for this it's awesome. You explained everything perfectly. You just might want to fix up a bit in ur failsafes section. You missed an apostrophe in Writeln and it made the rest of it pink :D

lol u got my vote

badandymitch
05-01-2007, 08:52 PM
thanks again for another awsome guide i am reading now

JAD
05-01-2007, 08:55 PM
Thanks for all the replies guys!

I'll be waiting on your app(s) in the future ;)

rkroxpunk
05-01-2007, 09:33 PM
You'll be waiting for my app? :P

wobbii
05-01-2007, 09:33 PM
hmm i seem to have a prob with the radial walking, it finds the color but it wont click? hmmm weird.

JAD
05-01-2007, 09:38 PM
Not clicking? Hmm.. are you sure it was finding the color then? What were you using? RadialWalk or RadialRoadWalk? If you were using RadialWalk, were you taking a bitmap and using AutoColorThis; for the color?

Please explain further and I'll do my best to help!

wobbii
05-01-2007, 09:40 PM
yea i was useing autocolor and it said color found but then the script would end.

steth1010
05-01-2007, 11:46 PM
great tut just figuring out how to work it now. :D Very well made and if I need more help ill ask you if you will help thanks

JAD
05-01-2007, 11:51 PM
yea i was useing autocolor and it said color found but then the script would end.

You need to AutoColorThis, and then what ever variable you put before the := AutoColorThis(Bitmap.....etc) will be the color. Then you need to go like RadialWalk(TheColorYouUsedInAutoColorThis......etc )
Not sure if you put in radial walk or not :p but you do need that; AutoColorThis just auto colors a bitmap.

@Steth Thanks! Glad to help you. And yes, I'm always here to help over pm/posts/msn. Feel free to ask for help in either.

Thanks for all the nice comments guys :)

rkroxpunk
05-01-2007, 11:58 PM
lol just wait till mine and alex's possibly meanages script comes out :P

wobbii
05-02-2007, 12:02 AM
lol just wait till mine and alex's possibly meanages script comes out :P

man that will be nice u guys both good scripters

wobbii
05-02-2007, 12:47 AM
grr it does the same with radialroadwalk....

Successfully compiled
RoadColor = 7237751
Successfully executed


then deso nuthin...

JAD
05-02-2007, 01:07 AM
I know what the problem is (pretty sure). Your not looking for it in the right area. Its finding the color when autocoloring, but your radial walking isn't looking in the correct place. Make sure with the radial walking aid that it goes over it, and goes over something else too in case the compass is rotated a bit odd.

Dunceiam
05-02-2007, 01:22 AM
Bookmarked :p. This will come in really useful once I finish all the Tuts in the Beginners section!

[off-topic]Is there a function in SCAR where it basically finds a bitmap, and then you can click the mouse a certain distance from the Bitmap? I think it's similar to RadialWalking, but I've just started with RadialWalking, so I'm probably wrong.

Example. You have a bitmap for Name, and Pass.
..........................._______________________ __
Password----------[________________________]
......................_________________________
Name----------[________________________]

And you only want the mouse to move 10 "spaces" to the right. As I said, it's off-topic :p. [/off-topic]

-Dunceiam

belgin fish
05-02-2007, 01:29 AM
wow jad this realy helped i didnt really understand radialwalk and now i do! thanks man i really apreciate this you should be the tutorial master with al these tutorials you have!

wobbii
05-02-2007, 01:37 AM
k im starting to understand this now thxs

JAD
05-02-2007, 01:38 AM
Bookmarked :p. This will come in really useful once I finish all the Tuts in the Beginners section!

[off-topic]Is there a function in SCAR where it basically finds a bitmap, and then you can click the mouse a certain distance from the Bitmap? I think it's similar to RadialWalking, but I've just started with RadialWalking, so I'm probably wrong.

Example. You have a bitmap for Name, and Pass.
..........................._______________________ __
Password----------[________________________]
......................_________________________
Name----------[________________________]

And you only want the mouse to move 10 "spaces" to the right. As I said, it's off-topic :p. [/off-topic]

-Dunceiam

Thanks! Glad to help you out :) And for your off topic thing, I suggest checking out the function that walks by water. It walks next to it with parameters off that you specify. Just look at the code and see if you can figure it out. I think its like WaterWalk or something.

@Belgin Fish, Thanks a lot. Glad to have helped

Edit: @wobbii, It doesn't check where just the lines show. it fills in all the spaces. Thats just to show you the basic picture. So if you had it look for the bottom half, it will draw lines across it indicating where it starts looking, ends looking and how far it goes out. But it searches THE WHOLE bottom part, if thats what your coords say.

Hope you get that, or that was even your problem :p if that didn't help, please explain further. You can add me on msn too: runescapemacro@hotmail.com

NewToAutoing
05-06-2007, 03:48 AM
I'm having the same problem, either it doesn't click, or it clicks about one space below my character (sometimes it does that even if i set it to only search the northern half of the minimap. I'm using RadialRoadWalk; any ideas?

Edit: I think i figured out the problem, i forgot to put SetupSRL in the script while i was testing.

WhoCares357
05-06-2007, 04:08 AM
Very well done.

JAD
05-06-2007, 02:25 PM
Very well done.

Thanks a lot whocares! Means a lot coming from a skilled tutorial writer like you :D

IEatJ00erBaybees
05-06-2007, 03:49 PM
I love your tuts JAD :)

And gratz on 1k posts!

PwNZoRNooB
05-06-2007, 04:02 PM
Very nice *starts adding failsafes to first script* helped me :p

JAD
05-06-2007, 05:10 PM
Thanks a lot guys! Glad to have helped :D And yes, failsafes are VERY important on getting accepted, and make your script stand more of a chance being a good over nighter :p

Markus
05-06-2007, 07:03 PM
Bookmarked :p. This will come in really useful once I finish all the Tuts in the Beginners section!

[off-topic]Is there a function in SCAR where it basically finds a bitmap, and then you can click the mouse a certain distance from the Bitmap?
And you only want the mouse to move 10 "spaces" to the right. As I said, it's off-topic :p. [/off-topic]

-Dunceiam


If you use findbitmap, do instead of Mouse(x, y, all other stuff) Mouse(x + pixels-next-to-bitmap, y + pixels-next-to-bitmap, othercrap);

Dunceiam
05-06-2007, 07:07 PM
If you use findbitmap, do instead of Mouse(x, y, all other stuff) Mouse(x + pixels-next-to-bitmap, y + pixels-next-to-bitmap, othercrap);


Alright mate, simple enough. :). Thanks.

-Dunceiam

del_signo
05-08-2007, 02:20 AM
hey if your in the mood to add something new that i know is incredibly difficult (well it was for me) is finding a bank on a mini map

Smartzkid
05-08-2007, 02:28 AM
findsymbol(x, y, 'bank');

JAD
05-08-2007, 04:28 AM
hey if your in the mood to add something new that i know is incredibly difficult (well it was for me) is finding a bank on a mini map

I'll put in my custom any symbol finding procedure and explain it! Thanks a lot for the idea :D

jhildy
05-15-2007, 08:23 PM
Great tut but i wouldnt have used function BankIt: Boolean;
begin
if (InvFull) then
begin
MakeCompass('E');
OpenBankQuiet('db');
Flag;
wait(500 + random(500));
FixBank;
if (FindDTM(Lobster, x, y, 568, 209, 742, 460)) then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(Tuna, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(SwordFish, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
CloseBank;
MakeCompass('N');
if(Result)then
begin
LoadsNum := LoadsNum + 1;
LoadsNumB := LoadsNum + 1;
end;
end;
end;

i wuld have made it something likefunction BankIt: Boolean;
begin
if (InvFull) then
begin
MakeCompass('E');
OpenBankQuiet('db');
Flag;
Depositall;
result:=true;
CloseBank;
MakeCompass('N');
if(Result)then
begin
LoadsNum := LoadsNum + 1;
LoadsNumB := LoadsNum + 1;
end;
end;
end;

just to me it seems easier but nice tut anyway

JAD
05-15-2007, 08:54 PM
Great tut but i wouldnt have used function BankIt: Boolean;
begin
if (InvFull) then
begin
MakeCompass('E');
OpenBankQuiet('db');
Flag;
wait(500 + random(500));
FixBank;
if (FindDTM(Lobster, x, y, 568, 209, 742, 460)) then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(Tuna, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
if(FindDTM(SwordFish, x, y, 568, 209, 742, 460))then
begin
Mouse(x, y, 3, 3, false);
ChooseOption(x, y, 'All');
Result := True;
end;
CloseBank;
MakeCompass('N');
if(Result)then
begin
LoadsNum := LoadsNum + 1;
LoadsNumB := LoadsNum + 1;
end;
end;
end;

i wuld have made it something likefunction BankIt: Boolean;
begin
if (InvFull) then
begin
MakeCompass('E');
OpenBankQuiet('db');
Flag;
Depositall;
result:=true;
CloseBank;
MakeCompass('N');
if(Result)then
begin
LoadsNum := LoadsNum + 1;
LoadsNumB := LoadsNum + 1;
end;
end;
end;

just to me it seems easier but nice tut anyway

That would be good if you had everything weilded, but what if you couldn't weild your axe/pick? Or in this case with my karamja fisher, you can't weild your lobster pot. So it is needed to do that or it would deposit everything, and when you go back to fish, you couldn't fish any more or even pay the trip to karamja.

Thanks for the comment/compliment though :D

Harry
05-16-2007, 10:39 AM
Thankies :D

JAD
05-16-2007, 03:19 PM
Thankies :D

np! Glad to help :D

Ashur2Good
05-18-2007, 07:01 AM
OMG JAD, all you're tutorials are awesome! Hopefully one day ill be a member ;)




-Ashur :stirthepot:

JAD
05-18-2007, 11:07 PM
OMG JAD, all you're tutorials are awesome! Hopefully one day ill be a member ;)




-Ashur :stirthepot:

Lol! Look at the color of your name.. ;)

And thanks a lot! Glad to of (hopefully) helped you to get in yourself ;)

Ashur2Good
05-19-2007, 04:45 AM
YES!!! Thanks alot JAD, i read you're tut then i made the app, And look :D

tyvm!

-ashur

Lalaji
05-21-2007, 06:59 PM
OMG!! look at all the stuff you put in there!! nice1!

JAD
05-21-2007, 07:02 PM
OMG!! look at all the stuff you put in there!! nice1!

Thanks! :D

The devil
05-26-2007, 07:57 AM
Thankz JAD!!!!!

BobboHobbo
05-26-2007, 09:17 AM
very nice guide 10/10 A++

JAD
05-26-2007, 03:35 PM
Thanks a lot guys :D Maybe you can apply to be a SRL member soon to eh? :p

If I get more then 3 people that became a SRL member after reading this guide, I'm going to make a list so please tell me if you do :)

Rune Killer
05-27-2007, 04:06 PM
Yes very nice tut easy to understand and will help me a lot :) ty.

JAD
05-27-2007, 04:19 PM
Yes very nice tut easy to understand and will help me a lot :) ty.

Thanks! Glad to hear it :)

evilwalrus
05-27-2007, 08:29 PM
nice tutorial! it helped out my friend alot! also me =b

JAD
05-27-2007, 11:09 PM
Thanks evilwalrus! Lol, funny name :p

itachi98
05-31-2007, 06:29 AM
Nice! Thanks JAD

JAD
05-31-2007, 03:23 PM
Nice! Thanks JAD

Thanks! And np :D

the scar noob
06-04-2007, 02:35 PM
another nice tut JAD, keep it up pal.
Just 1 thing that i saw in your explanation.
It's the explanation about the
AutoColorThisfunction
You forgot to say this:
Be sure when you take the bitmap, that the upperleft of the bitmap includes the color you want to get, cause AutoColorThis picks the color from the upperleft part of the bitmap that's found :P

JAD
06-04-2007, 02:43 PM
another nice tut JAD, keep it up pal.
Just 1 thing that i saw in your explanation.
It's the explanation about the
AutoColorThisfunction
You forgot to say this:
Be sure when you take the bitmap, that the upperleft of the bitmap includes the color you want to get, cause AutoColorThis picks the color from the upperleft part of the bitmap that's found :P

Thanks! :) And I'll add that once I get home from the doctor. Thanks you little scar noob ;) (j/k. A pun on your name :p)

Scarf4ce
06-05-2007, 06:24 AM
Thanks JAD, this tutorial helped me learn how to use anti-randoms, anti-ban, and fail safes in my script. Keep up the good work :P.

JAD
06-05-2007, 02:14 PM
Thanks JAD, this tutorial helped me learn how to use anti-randoms, anti-ban, and fail safes in my script. Keep up the good work :P.

Awesome. Glad this tut helped you to :p

the scar noob
06-05-2007, 08:42 PM
Thanks! :) And I'll add that once I get home from the doctor. Thanks you little scar noob ;) (j/k. A pun on your name :p)

Hahaha, really funny :)
Do you think Dankness can chenge my name (but keep my postcount etc)? :P

Btw, I think i'm going to apply for SRL Membership after the exams, i'm sick of it :)
you know i started scripting like a lil bit later as buckleyindahouse, he aplied afther 1-2 months? i told him i should apply too........ but we're like 7-8 months further? :P

Buckleyindahouse
06-05-2007, 08:48 PM
Hahaha, really funny :)
Do you think Dankness can chenge my name (but keep my postcount etc)? :P

Btw, I think i'm going to apply for SRL Membership after the exams, i'm sick of it :)
you know i started scripting like a lil bit later as buckleyindahouse, he aplied afther 1-2 months? i told him i should apply too........ but we're like 7-8 months further? :P

Just studied scripting more then you. Plus school is out over here and it seems like it isn't over there.

Boreas
06-05-2007, 09:04 PM
Hahaha, really funny :)
Do you think Dankness can chenge my name (but keep my postcount etc)? :P

Btw, I think i'm going to apply for SRL Membership after the exams, i'm sick of it :)
you know i started scripting like a lil bit later as buckleyindahouse, he aplied afther 1-2 months? i told him i should apply too........ but we're like 7-8 months further? :P

What would you like your name to be?

JAD
06-05-2007, 10:25 PM
SCAR noob, make sure you put in your signature (After Boreas/Wizzup?/Fakawi changes your name) that you are the scar noob still, just new name :p Just so I can tell who you are and other people can to.

And I actually leached your auto woodcutting script on sythe before I started scripting! lol :p

Beginning of february I started leaching for a week, then I started scripting and read a LOT. You could probably get in, I've seen some of your work and it's pretty good.

BobboHobbo
06-06-2007, 11:45 AM
JAD very nice guide helped me out alot!

Thanks

JAD
06-06-2007, 01:37 PM
JAD very nice guide helped me out alot!

Thanks

Thanks! :D

takemu
06-08-2007, 12:30 AM
what's wrong? i was trying out that part...
program New;
{.include SRL/SRL.scar}

procedure MineOre;
var Tries: Integer;
begin
repeat
wait(100+random(100));
Tries := Tries + 1;
if(Tries = 50)then
begin
Writeln('Tried to find the color 50 times.. unsuccessfully though :( Terminating script..');
TerminateScript;
end;
until(FindColor(x,y,1845314,MSX1,MSY1,MSX2,MSY2));
end;

begin
SetupSRL;
repeat;
MineOre;
end.

...and it sed this : Failed when compiling
[Error] (14772:1): Identifier expected


PLEASE HELP!!!

JAD
06-08-2007, 12:35 AM
what's wrong? i was trying out that part...
program New;
{.include SRL/SRL.scar}

procedure MineOre;
var Tries: Integer;
begin
repeat
wait(100+random(100));
Tries := Tries + 1;
if(Tries = 50)then
begin
Writeln('Tried to find the color 50 times.. unsuccessfully though :( Terminating script..');
TerminateScript;
end;
until(FindColor(x,y,1845314,MSX1,MSY1,MSX2,MSY2));
end;

begin
SetupSRL;
repeat;
MineOre;
end.

...and it sed this : Failed when compiling
[Error] (14772:1): Identifier expected


PLEASE HELP!!!

Was that a script in my tut?? Silly me if it was, I forgot a until(false) in the main loop for that repeat :p

I'll check if that was my script or yours, because if it was mine, I'm going to change it in my tutorial. If it was yours, you need a until(false) right before the "end." in the main loop.

Also, you should read that standards section ;)

takemu
06-08-2007, 12:43 AM
procedure MineOre;
var Tries: Integer;
begin
repeat
wait(100+random(100));
Tries := Tries + 1;
if(Tries = 50)then
begin
Writeln('Tried to find the color 50 times.. unsuccessfully though Terminating script..');
TerminateScript;
end;
until(FindColor(x,y,'enter color',MSX1,MSY1,MSX2,MSY2));
end;

that was in ur tut(except i made some names different).

sry now i look like a n00b lol.

btw nice tut but i guess i should review the standards again lol.
sry for wasting ur time.

takemu
06-08-2007, 12:44 AM
Thanks A Lot. but now it says successfully compiled in 781 msec, then does nothing. AND before u call me a noob, i have the thing i want it to click on in plain view. i don't knwo what to do because it doesn't say 'tried 50 times unsuccessfully...' even if i leae it on for 5 minutes.
i guess it finds the color but doesn't click. what do i need to do? put in MMouse?(tell me if i sound like a total noob cause i only started reading tuts a couple days ago) thanks!

takemu
06-08-2007, 12:59 AM
and btw i did use the scripting standards it just didn't space it when i copied and pasted.

JAD
06-08-2007, 01:28 AM
Updated tutorial a LOT! I'll look over your problem/what you posted after dinner, sorry. Got to go eat now though :)

takemu
06-08-2007, 01:29 AM
ok i must be on ur "most annoying" list lol.

but....
program New;
{.include SRL/SRL.scar}

procedure Walkage;
begin
RadialRoadWalk(FindRoadColor,40,100,70,2,2);
Flag;
end;
begin
walkage;
end.

got this:Successfully compiled
Line 175: [Hint] (183:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
Could not find Road Color!
Successfully executed

and...
Program New;
{.Include SRL/SRL.scar}
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

///////////////////////////////////////////////////////////////////////////

procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
end;

begin
repeat;
FindRandoms;
until(false);
end.

got this:
Successfully compiled
Line 175: [Hint] (183:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
[Runtime Error] : Exception: Access violation at address 00650732 in module 'scar.exe'. Read of address 00000000 in line 181 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\AntiRandoms\Demon.scar

and...
program New;
{.include SRL/SRL.scar}


var Iron, IronColor:Integer;
procedure AutoColorIronRock;
begin
Iron := BitmapFromString(35, 29, 'z78DADD9759929D300C4' +
'5B7244F3CF31920EC7F492D2C93C82DCB8837A492BCAEBA1F 34E0' +
'7B34D92488B38FC9AC718DC97BAEE9E61B2CEA77EF01FCC36 D002' +
'EB9E3A7E9E232FE1585F27B8E62AC6F232A7A41C4B8C64477 293E' +
'416ACA11538D2842741EAA7E80AB2A5B65CC85461D715DD17 1A20' +
'F3A7F8A54A5DB5CD2B988E8C65A7BC4A74843F40BCC269DFD 0E3F' +
'1BDD43EC694C61C6F7939655EE72DD201A52344EB8CE61FDA 62C2' +
'68DD27FCB5329C4E41257AD07651D9A88248B8879C779D194 6346' +
'575C85DBEA99B8B2DFB0B332E0CC92CFCA09F3BBBF742258B 1558' +
'F7605BA19BEE7052023452C2CA8655EC68EF3B1BA88F14557 D02A' +
'B11C83098E8981CB57451FE8B6789331C7EBE99C1B5A8E701 FC8D' +
'0AB3151F92AD116D7A715021A9F307B2EF3EBB5D78615A511 DDE8' +
'14CC59B7BA844F8AF684E17479AC29E29A0FD2694E935BB8D 6755' +
'945F17E94441D16A547D44E51221F53212A911F6BCA61F2F3 0461' +
'F15B87885627CFA1CC43D68F9CC8DEEF1ACB45FCA57FE1F6F 48CA' +
'15E2A91E06A9C0CAB4EDB29E4A4BDCDF256A27A0FF9598F71 3720' +
'FA35C1602ED751F1A94073156BA6C3D24CA471A728FE3B0A7 8649' +
'81B22C155673E0E259DA872891CA91358748A3D0B63AD390A 6145' +
'0AA99C4BEC569D59C7E658ED3885E8A52CD88964A658BEE4C EAB1' +
'3C1A06B2AD19B32A212ADE987D3B98888A6A8613FBA98CF7F 9288' +
'AEABF93A6AE31F23925C0D9D9908CA54A4FDCBB2FBBBE4DF4 D941' +
'69CBB2751C6F79FF71C0795F9E4C23B7B44B97C4B0A95334D 9DCC' +
'3C9E52A573C37ED41029EF69B2B084DD2D1744AFB38C89948 A558' +
'9D8DB240B27D2BE59486F9C01EC44E3AACB7110E7568FB2BB 4BA4' +
'9EEECA9C9F62E9204BA62C8C2532B58B2D440F7492B95A882 A970' +
'BF8D5D0D1339E7635445E51EA1152C1724144DF95F2142733 F58A' +
'43BB2AFE5F27AA5CFC34FED7B070A2FFEFF705A94DF255');
IronColor := AutoColorThis(Iron,100,MSX1,MSY1,MSX2,MSY2);
Writeln(IntToStr(IronColor));
end;

begin
SetupSRL;
repeat;
AutoColorIronRock;
until(false);
end.

get this:
Successfully compiled
Line 175: [Hint] (183:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
SRL Compiled in 875msec.
2180939
2180939
2180939
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039
2313039...
until i stop it.

(and just because i know u enjoy reading my posts)

WHAT DO I DO??????????

takemu
06-08-2007, 01:31 AM
and once again i DID use the standards



EDIT: OMG!!!!!!!!!! SRY I DIDN'T REALIZE THAT POSTING THAT MANY TIMES IN A ROW WAS NOT ALLOWED!!! REALLY SRY. IF U CAN PLEASE JUST DELETE THEM ALL OR SOMETHING LOL.

RudeBoiAlex
06-16-2007, 09:52 AM
ok JAD this is it im using ur tut every bit in it then applying with a powerminer (well u got in with 1 lol) there will be radial walk (woot i know how to do it but only if ur mineing in varrok maybe banking in varrok) failsafes and standards

JAD
06-16-2007, 03:04 PM
ok JAD this is it im using ur tut every bit in it then applying with a powerminer (well u got in with 1 lol) there will be radial walk (woot i know how to do it but only if ur mineing in varrok maybe banking in varrok) failsafes and standards

Awesome! :)

And sorry I had to vote no... :( Please don't hate me for that.

RudeBoiAlex
06-17-2007, 10:22 AM
no jad its fine even when my name wasnt yellow and u said no i never would of hated u it would of been for my own good but i still got iin so add me to ur list plz

JAD
06-17-2007, 02:05 PM
no jad its fine even when my name wasnt yellow and u said no i never would of hated u it would of been for my own good but i still got iin so add me to ur list plz

officially added! :D And thanks for being so understanding.

leviathanultima
06-17-2007, 10:52 PM
hey dude, any chance u can make this guide into a adobe file or sumtin? might read that offline or transfer it to my phone to read it there. Cos i barely spend time on the computer due to m hectic schedule =. ="

JAD
06-18-2007, 12:53 AM
hey dude, any chance u can make this guide into a adobe file or sumtin? might read that offline or transfer it to my phone to read it there. Cos i barely spend time on the computer due to m hectic schedule =. ="

Print it out! :p

x13om13e12x
06-18-2007, 04:46 PM
Why does it bold Exit; command in yoru scripts, but in my program where ever i type Exit; its not bolded?

JAD
06-18-2007, 06:42 PM
Why does it bold Exit; command in yoru scripts, but in my program where ever i type Exit; its not bolded?

IDK, from what I've seen, SCAR Tags make Exit; bold like that, and when you put it in SCAR, it's not in bold. Doesn't really matter though :p

Stevee
06-19-2007, 05:02 AM
i learned soooo much from this guide... and thats rare lol

JAD
06-19-2007, 02:25 PM
i learned soooo much from this guide... and thats rare lol

Awesome! Glad you learned something :)

gamer716
06-20-2007, 07:30 AM
wow this tut is amazing! i love all the examples and it was very detailed, thanks i learned alot

JAD
06-20-2007, 07:02 PM
wow this tut is amazing! i love all the examples and it was very detailed, thanks i learned alot

Thanks! :) And glad you learned something. :D

carlitox
06-21-2007, 02:05 AM
Thnx JAD, I luv your tutorials..

thats the main reason I know why this will take my whole life to b SLR-member! =(

JAD
06-21-2007, 02:54 AM
Thnx JAD, I luv your tutorials..

thats the main reason I know why this will take my whole life to b SLR-member! =(

Thanks! :) And what's "the main reason I know why this will take my whole life to b SLR-member!"?

fuzzball109
06-22-2007, 02:10 PM
im trying to become a member

Tim0suprem0
06-23-2007, 03:37 AM
umm can I just say you rock? You've taught me like 75% of the scripting techniques I know lol. I have a question for radialroad walk though. When trying to do it, it says Roadcolor not found, but I can do radialwalk fine with simple colorfinding in the beginning, with no complicated bitmaps. So using that thinking I could just set it as a constant in the beginning of the script right? Or will the color of the road change while I play, making me need to use a bitmap of the Minimap. The script I'm making requires very little roadwalking. Thanks!




EDIT: When using FindVarrockRoadColor, RadialRoadWalk worked just fine!

Macho Man67
06-28-2007, 01:48 AM
Great job JAD!! I really learned alot from it. I hope in the future I will eventually be a good enough scripter to apply for members. Also this helped me with my new script( Draynor Firemaker):) I really appprieciate the effort you put into this.

JAD
06-28-2007, 01:55 AM
umm can I just say you rock? You've taught me like 75% of the scripting techniques I know lol. I have a question for radialroad walk though. When trying to do it, it says Roadcolor not found, but I can do radialwalk fine with simple colorfinding in the beginning, with no complicated bitmaps. So using that thinking I could just set it as a constant in the beginning of the script right? Or will the color of the road change while I play, making me need to use a bitmap of the Minimap. The script I'm making requires very little roadwalking. Thanks!




EDIT: When using FindVarrockRoadColor, RadialRoadWalk worked just fine!

Yes, there are different auto coloring for different roads :) And thanks a lot! Glad you learned a lot :)

@Macho, Thanks a lot! Glad you learned something :D

And everybody has the potential if they apply themselves :) I became a member in 2 weeks of scripting because I really dedicated myself to learning it, and I have a pretty good memory too I guess :)

fuzzball109
06-28-2007, 03:25 AM
i stink at making scripts.......soo this helped alot exept that i dont know where to put dtm' s and all that in a script.

TravisV10
06-30-2007, 01:20 AM
Awesome tutorial! I have printed it out and read it over and over.

10/10.

JAD
06-30-2007, 03:47 AM
Awesome tutorial! I have printed it out and read it over and over.

10/10.

Thanks :) Glad your reading it a lot.. ;)

Inf456
06-30-2007, 06:14 AM
Wow. This is an uber 1337 tut, just like all of your tuts! Helped me a lot. I'm hoping to be an Srl member by the end of the summer.

TravisV10
06-30-2007, 01:10 PM
Wow. This is an uber 1337 tut, just like all of your tuts! Helped me a lot. I'm hoping to be an Srl member by the end of the summer.

Me too.:D

JAD
06-30-2007, 05:56 PM
Wow. This is an uber 1337 tut, just like all of your tuts! Helped me a lot. I'm hoping to be an Srl member by the end of the summer.

Great! And thanks a lot :)

Ilikepie1995
06-30-2007, 09:06 PM
Thanks Jad this OWNZ, but nothing ownz pie, PIE OWNZ ALL!-It even ownz me :(...

JAD
06-30-2007, 09:57 PM
Thanks Jad this OWNZ, but nothing ownz pie, PIE OWNZ ALL!-It even ownz me :(...

Lol, thanks :)

IEatJ00erBaybees
06-30-2007, 10:36 PM
If you wouldn't mind, could you kindly add my name to that list of people who got SRL Membership after reading this tutorial?

<3

JAD
06-30-2007, 10:52 PM
If you wouldn't mind, could you kindly add my name to that list of people who got SRL Membership after reading this tutorial?

<3

Awesome! np :) Glad to.

And there would be no way you would have been able to quote Fakawi's famous words if you didn't get membership.. That powerful word ;)

Added!

IEatJ00erBaybees
06-30-2007, 11:02 PM
You forgot an 'e' before the 'r' in 'J00er'. Thanks lol :p

JAD
06-30-2007, 11:11 PM
You forgot an 'e' before the 'r' in 'J00er'. Thanks lol :p

Lol.. Fixed ;)

(Fake Edit) Edit: Woot! 100th post on this tutorial! :D

Stevee
07-01-2007, 04:01 AM
best tut ive every seen ill give you that to say teh least.

JAD
07-01-2007, 04:41 AM
best tut ive every seen ill give you that to say teh least.

Wow, thanks :) Hope you've seen a LOT of tutorials before this then.. ;)

IEatJ00erBaybees
07-01-2007, 01:38 PM
best tut ive every seen ill give you that to say teh least.

Check your sig.


Selling: No Script Selling at SRL. No Script Buying at SRL. Please apply to our Friendly Neighbours for anything related to $ or RS-gp.

aznfire5
07-03-2007, 04:53 AM
dannng this is way to advanced, for me...

JAD
07-03-2007, 06:36 PM
dannng this is way to advanced, for me...

Just go to the beginner tut section, read a just starting scripting beginner tut on scripting SCAR, then read the first chapter of my tutorial (to learn the basic SRL commands) things the beginner tuts don't teach you, then after you've got it down (by messing around/testing stuff in the tutorials to make sure you got it all), try reading this tut again and it may seem a LOT more clear :)

fuzzball109
07-10-2007, 02:52 PM
Me too.:D
me 2

IEatJ00erBaybees
07-11-2007, 02:21 AM
JAD! PMG! I have another note to add on what it takes to become an SRL Member.

If it's September-June, apply on a Friday. That way people are in good moods :p. Never, ever apply on a Sunday night or Monday. :p

Maybe you can put it in an extras chapter :p

JAD
07-11-2007, 01:42 PM
JAD! PMG! I have another note to add on what it takes to become an SRL Member.

If it's September-June, apply on a Friday. That way people are in good moods :p. Never, ever apply on a Sunday night or Monday. :p

Maybe you can put it in an extras chapter :p

Actually, I applied on a monday I believe lol :p

Harry
07-11-2007, 01:48 PM
Add me to the list, I became members with this tut! :D

JAD
07-11-2007, 02:12 PM
Add me to the list, I became members with this tut! :D

Sweet! :) Added!

IEatJ00erBaybees
07-11-2007, 04:56 PM
I know but you have a better chance of making it in on a Friday :p

sukomabawls
07-12-2007, 10:17 PM
awesome, the bank finder and opener is cool, it's better than my crappy one i use for my fally autominer(coming soon), so i might use this as guide lines but i wont copy it, still i'll give you credit and refer to this TUT.

meepo
07-14-2007, 09:45 AM
Thanks, it all looks very easy now since I got some other programming experience.

sum1uallno
07-15-2007, 12:24 AM
;) Pleasure doing buisness with you.

Ashur2Good
07-16-2007, 11:59 AM
Hey ahh JAD, not trying to act all perfect but, learned ain't a word :o It's learnt *Struts off the computer ;)*

And also, Look how many people became a member 'cause of this tutorial haha! Gj :)




-Ashur:stirthepot:

Boreas
07-17-2007, 01:07 AM
Actually both are words.

JAD
07-17-2007, 02:46 AM
Actually both are words.

I thought so :p

TheSantaMan
07-17-2007, 09:30 PM
Wow thank you soooo much. I read alot of tuts and they were pretty good but this really showed me how useful Scar is. I didn't know there were so many tools and easy stuff to use thanks loads. You'll see my members app. very soon.

LordGregGreg
07-17-2007, 10:20 PM
Hey JAD , you need to add me to your list :P

Great tuorial, it helped me tons

JAD
07-18-2007, 12:38 AM
Thanks guys :) And added you greg!

thunar
07-18-2007, 11:15 PM
Sorry if this was answered (I looked through page 1, 6, and 7) but I can't get FindRoadColor to work with RadialRoadWalk. It always says "Could not find Road Color!" Is there some setup you need to do, of be standing somewhere special?

thunar
07-19-2007, 12:46 AM
Now RadialRoadWalk is working to find road color, but it just clicks right where I am standing even though the radius is 50, and I tried with 70.
edit:sorry about double posting, but I couldn't find the edit button on my first post. Probably me being dumb again.

dannymet
07-21-2007, 12:00 AM
all this just to be a member? i would prefer to leech from noob land lol

Naum
08-21-2007, 10:17 AM
Thanks JAD sexy tut! :D

valesar
08-21-2007, 09:25 PM
Awesome Tut, thanks it really helped me alot

faster789
08-23-2007, 02:44 PM
it keeps saying road color not found plzzzz
ive been thru so many tutorials for radial walking i still cant get it plz som1 help
fast~
thx

Negaal
08-31-2007, 10:19 AM
Omg totally nice but some1 should add scar form editor manual, what these buttons do, etc... i know how to set form into script put not how to make it!
:(:(:(:(:(

Wilio
09-02-2007, 02:52 PM
I love this tutorial. Learned about fail safes, and now I know the importance of it.

itSchRis917
09-04-2007, 02:37 AM
I became an SRL Member after reading this tut. Thanks JAD!

CheetahNub
09-07-2007, 04:15 PM
OMFG I got tons of things to learn before I can apply to be a member :P

HellBoyz
10-13-2007, 01:55 AM
Add me too, it do help me alot and apply almost all in my script

Dudenow12
11-30-2007, 01:51 AM
Yeah add me to this helped me become a SRL member!!! Thank You JAD

footballjds
01-10-2008, 03:51 PM
time to put me on that list JAD =p:D


OMFG I got tons of things to learn before I can apply to be a member :P

obviously not =p

EDIT: you ever gunna add me to the list?

Pure1993
02-15-2008, 09:20 PM
Sorry if this counts as "gravedigging" (i know the last post was more than a month back, but still I would like to be added to that list, if you ever get to it. :D).

JAD
02-15-2008, 09:43 PM
time to put me on that list JAD =p:D



obviously not =p

EDIT: you ever gunna add me to the list?

Sorry, hadn't seen new post in this tut :p

Added both of you now! Thanks. And congratulations! Glad to be a part of your learning experience :)

~JAD

Raskolnikov
02-19-2008, 12:15 AM
Hey, put my name on the list, I read this tutorial and it helped me alot on my way to being a SRL Member.

Cut em2 it

skilld u
02-20-2008, 11:51 PM
Can you add me to the list also, I read this tut many times on my journey to Members. :p

TheChineseMan
04-20-2008, 05:07 AM
hey i still dont really get it do we have to make a whole script and show it to be a SRL member or can we just make all the bitmaps and DTMs etc. up apply for a SRL member and become one?

Lee Lok Hin
04-21-2008, 09:19 AM
You must make a Working (Doh.) Runescape script that uses srl. Preferably DTMS and Bitmaps included whithin it and all the stuff in the tut. I only heard of 1 guy that made it to srl-members without doing a rs script o.O

TheChineseMan
04-21-2008, 01:31 PM
umm i cant seem to find the radial walk aid can someone help pls? i followed where to go but cant find it!!!

Nava2
05-15-2008, 11:49 PM
Well if you are still updating.. check the name :)

Nava2

Claymore
07-04-2008, 08:55 AM
Thank you JAD for this guide, I am looking forward to becoming a SRL Member. I just need to learn more about Fail Safe and etc. I learned Radical Walking, BitMap and finally! I learned DTMs. Those stuff took a while to learn.

Scaper
07-07-2008, 04:03 PM
i read most you tut and i belive it got me SRL member :D

Chad Grimgravy
08-23-2008, 04:05 PM
kewl

xSaintias
10-29-2008, 06:20 AM
very nice.....
only a few parts did i not understand but otherwise yah...

Cigue
01-18-2010, 08:56 AM
I was going to make an auto ectophial for my members script... lots and lots of walking and object finding and stuff ¬_¬

I think I'll just make something short and sweet.

luke_mcdonald
12-04-2010, 08:17 AM
Nice tutorial, Although I was hoping to see some breaking implemented into the anti ban ;) I might start a ranging script in varrock sewers for moss giants, allot of radial walking =[