Bionicle
09-16-2009, 04:43 AM
Welcome to my fourth tut, how to use radial walking!
What is Radial Walking
Radial walking is one of the three walking procedures. It is the easiest, perfect for beginners. It is also the least accurate, if you do it wrong, but i'll get to that part later. It finds a color on a specified segment on the mini map, and clicks on it.
Multiple Radial Walking --IF YOU HAVE ONLY ONE PLACE YOU WANT TO WALK TO, SKIP THIS--
Add a new procedure. Name it:
procedure RadialWalking(RadialWalkin: Integer);
Now add:
begin
case RadialWalkin of //what this is, is a 'case statement'. With it, you can have more then one procedure in this procedure. They are numbered, and when used later in your script, you would call it 'ProcedureName(#)'
Now I'm going to teach you the RadialWalk function. Here is the layout:
RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
TheColor: this is the color of the place your walking. Put the color of the place your walking to on your mini map here.
StartRadial & EndRadial: this is the start and end of the section of the mini map you want this to search for. It is measured in degrees. So say you want it to search the north/east quarter of the mini map for your color, you would put '0, 90,'. (If you fail at angles, get a protractor ;))
Radius: this is, in pixels, how far away from the center of the mini map you want it to search for your color. 60 is the furthest point.
Xmod & Ymod: if it clicks somewhere, and the flag doesn't show up, how many pixels do you want it to click away from that area?
Here's an example of this procedure I used in one of my scripts:
procedure RadialWalking(RadialWalkin: Integer);
begin
case RadialWalkin of
1: RadialWalk(15855597, 0, 100, 60, 5, 5); //the 15855597 would be where your color would go. to pick a color, go to SCAR, and press Ctrl + Alt + P and click on the spot that your color is. It will wright the color in the debug box.
2: RadialWalk(42495, 0, 90, 60, 5, 5); //0, 90 is the section on the mini map it searches for, in this case, the whole north/west corner
3: RadialWalk(8083520, 90, 180, 60, 5, 5); //60 means it will search all the way out to the edge of the mini map from the center
4: RadialWalk(5606229, 35, 140, 60, 5, 5); //the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
end;
end;
Now to incorporate this into your script. Here is an example, again, from one of my scripts:
procedure WalkToBank;
var
i: Integer;
begin
if not loggedin then exit; //this should be at the beginning of each of your procedures or functions
Setrun(true); //this turns run on
for i := 1 to 5 do //if you don't know what this is, look up my tut on loops ;)
begin
RadialWalking(i); //this means that the first loop through it will use RadialWalking(1), then the second time through, RadialWalking(2), etc. Remember, this is the procedure we made before?
end;
end;
Single Radial Walking--IF YOU HAVE MULTIPLE RADIALS, SKIP THIS--
Now I'm going to teach you the RadialWalk function. Here is the layout:
RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
TheColor: this is the color of the place your walking. Put the color of the place your walking to on your mini map here.
StartRadial & EndRadial: this is the start and end of the section of the mini map you want this to search for. It is measured in degrees. So say you want it to search the north/east quarter of the mini map for your color, you would put '0, 90,'. (If you fail at angles, get a protractor ;))
Radius: this is, in pixels, how far away from the center of the mini map you want it to search for your color. 60 is the furthest point.
Xmod & Ymod: if it clicks somewhere, and the flag doesn't show up, how many pixels do you want it to click away from that area?
Now to add this into your script. Here is an example of one in mine:
RadialWalk(15855597, 0, 90, 60, 5, 5); //the 15855597 would be where your color would go. to pick a color, go to SCAR, and press Ctrl + Alt + P and click on the spot that your color is. It will wright the color in the debug box.
//0, 90 is the section on the mini map it searches for, in this case, the whole north/west corner
//60 means it will search all the way out to the edge of the mini map from the center
//the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
AutoColor
AutoColor is very useful. What it is, is it finds the color of a specific place/object specified. There are very few of these though, they are:
// * function FindColorRecordEx(var rx, ry: Integer; ColorRecord: TAutoColorInfo; x1, y1, x2, y2: Integer; RGBXYZCheck: Boolean): Integer; | by Sumilion, small edits by EvilChicken!
// * function FindColorRecord(var rx, ry: Integer; Road: TAutoColorInfo): Integer; | by Sumilion
// * function FindWaterColor: Integer; | by: Tarajunky, fixed by BobboHobbo and edited by EvilChicken!
// * function FindRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindVarrockRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindFallyRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindLumbyRoadColor: Integer; | by ZephyrsFury, small edit by EvilChicken!
// * function FindRockColor: Integer; | by Tarajunky
// * function FindStoneColor: Integer; | by Tarajunky
// * function FindDirtRoadColor: Integer; | by ZephyrsFury
// * function FindBridgeColor: Integer; | by Tarajunky
// * function FindLadderColor: Integer; | by Tarajunky
// * function FindSandColor: Integer; | by Tarajunky
// * function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2:Integer) : integer; | by Sumilion
// * function FindTreeColor: Integer;
So an example of using one of these AutoColors would be the following, this one would find Varrock road and click on it, if you were near it:
RadialWalk(FindVarrockRoadColor, 0, 90, 60, 5, 5);
Now you are officially able to use radial walks! Congratulations! Thanks for reading my tut, any questions, comments or corrections please post below :p and if you like my tut, use the blue check mark at the top corner of this box ;)!
What is Radial Walking
Radial walking is one of the three walking procedures. It is the easiest, perfect for beginners. It is also the least accurate, if you do it wrong, but i'll get to that part later. It finds a color on a specified segment on the mini map, and clicks on it.
Multiple Radial Walking --IF YOU HAVE ONLY ONE PLACE YOU WANT TO WALK TO, SKIP THIS--
Add a new procedure. Name it:
procedure RadialWalking(RadialWalkin: Integer);
Now add:
begin
case RadialWalkin of //what this is, is a 'case statement'. With it, you can have more then one procedure in this procedure. They are numbered, and when used later in your script, you would call it 'ProcedureName(#)'
Now I'm going to teach you the RadialWalk function. Here is the layout:
RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
TheColor: this is the color of the place your walking. Put the color of the place your walking to on your mini map here.
StartRadial & EndRadial: this is the start and end of the section of the mini map you want this to search for. It is measured in degrees. So say you want it to search the north/east quarter of the mini map for your color, you would put '0, 90,'. (If you fail at angles, get a protractor ;))
Radius: this is, in pixels, how far away from the center of the mini map you want it to search for your color. 60 is the furthest point.
Xmod & Ymod: if it clicks somewhere, and the flag doesn't show up, how many pixels do you want it to click away from that area?
Here's an example of this procedure I used in one of my scripts:
procedure RadialWalking(RadialWalkin: Integer);
begin
case RadialWalkin of
1: RadialWalk(15855597, 0, 100, 60, 5, 5); //the 15855597 would be where your color would go. to pick a color, go to SCAR, and press Ctrl + Alt + P and click on the spot that your color is. It will wright the color in the debug box.
2: RadialWalk(42495, 0, 90, 60, 5, 5); //0, 90 is the section on the mini map it searches for, in this case, the whole north/west corner
3: RadialWalk(8083520, 90, 180, 60, 5, 5); //60 means it will search all the way out to the edge of the mini map from the center
4: RadialWalk(5606229, 35, 140, 60, 5, 5); //the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
end;
end;
Now to incorporate this into your script. Here is an example, again, from one of my scripts:
procedure WalkToBank;
var
i: Integer;
begin
if not loggedin then exit; //this should be at the beginning of each of your procedures or functions
Setrun(true); //this turns run on
for i := 1 to 5 do //if you don't know what this is, look up my tut on loops ;)
begin
RadialWalking(i); //this means that the first loop through it will use RadialWalking(1), then the second time through, RadialWalking(2), etc. Remember, this is the procedure we made before?
end;
end;
Single Radial Walking--IF YOU HAVE MULTIPLE RADIALS, SKIP THIS--
Now I'm going to teach you the RadialWalk function. Here is the layout:
RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
TheColor: this is the color of the place your walking. Put the color of the place your walking to on your mini map here.
StartRadial & EndRadial: this is the start and end of the section of the mini map you want this to search for. It is measured in degrees. So say you want it to search the north/east quarter of the mini map for your color, you would put '0, 90,'. (If you fail at angles, get a protractor ;))
Radius: this is, in pixels, how far away from the center of the mini map you want it to search for your color. 60 is the furthest point.
Xmod & Ymod: if it clicks somewhere, and the flag doesn't show up, how many pixels do you want it to click away from that area?
Now to add this into your script. Here is an example of one in mine:
RadialWalk(15855597, 0, 90, 60, 5, 5); //the 15855597 would be where your color would go. to pick a color, go to SCAR, and press Ctrl + Alt + P and click on the spot that your color is. It will wright the color in the debug box.
//0, 90 is the section on the mini map it searches for, in this case, the whole north/west corner
//60 means it will search all the way out to the edge of the mini map from the center
//the 5, 5, means that if the flag doesn't appear, it will search 5 pixels away from that area
AutoColor
AutoColor is very useful. What it is, is it finds the color of a specific place/object specified. There are very few of these though, they are:
// * function FindColorRecordEx(var rx, ry: Integer; ColorRecord: TAutoColorInfo; x1, y1, x2, y2: Integer; RGBXYZCheck: Boolean): Integer; | by Sumilion, small edits by EvilChicken!
// * function FindColorRecord(var rx, ry: Integer; Road: TAutoColorInfo): Integer; | by Sumilion
// * function FindWaterColor: Integer; | by: Tarajunky, fixed by BobboHobbo and edited by EvilChicken!
// * function FindRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindVarrockRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindFallyRoadColor: Integer; | by Tarajunky, edited by EvilChicken!
// * function FindLumbyRoadColor: Integer; | by ZephyrsFury, small edit by EvilChicken!
// * function FindRockColor: Integer; | by Tarajunky
// * function FindStoneColor: Integer; | by Tarajunky
// * function FindDirtRoadColor: Integer; | by ZephyrsFury
// * function FindBridgeColor: Integer; | by Tarajunky
// * function FindLadderColor: Integer; | by Tarajunky
// * function FindSandColor: Integer; | by Tarajunky
// * function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2:Integer) : integer; | by Sumilion
// * function FindTreeColor: Integer;
So an example of using one of these AutoColors would be the following, this one would find Varrock road and click on it, if you were near it:
RadialWalk(FindVarrockRoadColor, 0, 90, 60, 5, 5);
Now you are officially able to use radial walks! Congratulations! Thanks for reading my tut, any questions, comments or corrections please post below :p and if you like my tut, use the blue check mark at the top corner of this box ;)!