PDA

View Full Version : procedure AWalk2(Angle, Radius, Color: Integer);



Starblaster100
06-10-2006, 12:18 AM
AWalk2 is a very powerful way of mapwalking long distances very easily. Basically it clicks at a specific angle and keeps clicking at that specific angle until it finds a color on the minimap that you specify.

For example, if you put:


AWalk2(90, 50, 123456);


It doesn't matter which way the minimap is facing, it will constantly walk east, clicking at a radius of 50 from the minimap center until it finds the color 123456.

It may not be as powerful as Radial and Linear Walk, but its still a useful function to use, and i have used it many times :)



procedure AWalk2(Angle, Radius, Color: Integer);
var
awx, awy, tout, Temp, Radius2, x1, y1 : Integer;
TempAngle, CurrentMinimapAngle : extended;
CompassBool : Boolean;
begin
Radius2 := Radius;
If (Radius = 0)or(Radius2 = 0)or(Radius > 57)or(Radius2 > 57)then
Radius2 := 57;
repeat
Temp := 0;
tout := tout + 1;
TempAngle := Angle;
CurrentMinimapAngle := DetectRS2MinimapAngle(CompassBool);
If (CurrentMinimapAngle = -1)Then
begin
Writeln('Minimap not Found!');
Exit;
end;
CurrentMinimapAngle := 360 - CurrentMinimapAngle * (180 / Pi);
TempAngle := TempAngle - CurrentMinimapAngle;
X1 := Round ( Radius2 * Sin (TempAngle * Pi / 180)) + 648;
Y1 := Round (- Radius2 * Cos (TempAngle * Pi / 180)) + 84;
Mouse(x1-2, y1-2, 4, 4, True);
wait(500);
if (FlagPresent=false) then
begin
repeat
Mouse(x1-2, y1-2, 4, 4, True);
Wait(500);
tout := tout + 1;
until (FlagPresent) or (FindColor(awx, awy, color, 569, 8, 723, 160)) or (Tout > 20);
if (tout > 20) then
begin
writeln('AWalk2 by Starblaster100 - Could not Click!');
logout;
end;
end;
repeat
Wait(250);
Temp := Temp + 1;
until not(FlagPresent)or(Temp > 29)
if(Color = 0)then
Exit;
awx := 648;
awy := 84;
until (FindColor(awx, awy, color, 569, 8, 723, 160)) or (Tout > 20);
end;

Avaphi
06-10-2006, 12:45 AM
Dude, This is just as powerful as radial walk. It didnt work for me(Radial) so I will give this a try. BY the way, Do you use this as a walker in your ess miner?

Starblaster100
06-10-2006, 12:58 AM
Thanks

Its not in my ess miner since you only need 1 click to get to the aubury :P
but i used it in many of my other scripts such as my Nat maker, my mind crafter, air crafter, fire crafter and most other rune crafters :P. If it hink of any more examples of where i have used it ill post

Avaphi
06-10-2006, 01:27 AM
StarBlaster100 = 99 runecrafting ?!!??! :P

Anyways, after I give fakawi's goblin script a 1 hour report, I will test it out on an iron miner banker/rimmington I am trying to put together.

Flat Line
08-06-2006, 11:10 PM
Anyways, after I give fakawi's goblin script a 1 hour report, I will test it out on an iron miner banker/rimmington I am trying to put together.

i was looking at this tut thinking to use it in the very same thing ;) i think it will be useful, thanks starblaster :).

Infantry001
08-17-2006, 08:37 PM
seems helpful! mind if i use it in my script (might become a pay script) and edit it a little bit?

Keen
08-17-2006, 10:27 PM
seems helpful! mind if i use it in my script (might become a pay script) and edit it a little bit?

I think the reason he posted this was to let people know about the function so they would use it, so I doubt he wouldn't like you to use it. ;)

Infantry001
08-17-2006, 11:48 PM
lol yea... just realized it was in SRL o_0

i added tolerance

Starblaster100
08-18-2006, 06:27 PM
sure thing dude, use it how you wish. Ill probably add tolerance in the SRL one

Ruroken
10-15-2006, 06:45 PM
looks nice. I might add a Symbol insted of a color though ;)

Avaphi
12-01-2006, 01:55 AM
SB, Does this still work? Argh ! I just tryed running the script I was working on before I quit and its totally blown apart :(

masquerader
12-01-2006, 02:00 AM
you can try replacing the compass functions with the ones i made
it will probably work, i think i made the outputs be in the same format

sythe
12-14-2006, 02:52 PM
This is the original function, as it appeared in sslibrary.txt

I fear that many people did not understand the angle system and that is why it never caught on. The angle system is the Cartesian polar system whereby the direction of rotation is anticlockwise and east is zero degrees, north is 90, west is 180, south is 270 and so on.

Personally I find this a far more natural system to use having done extended maths in high school. But it is not difficult to change it over to the British navigation system whereby north is 0 and the direction of rotation is clockwise.


////////////////////////////////////////////
/// --- Sythe's Angluar walk function --- //
////////////////////////////////////////////
/// EXAMPLE: AWalk(90,bank); // walks //
/// north until it sees the bank icon. //
/// EXAMPLE2: AWalk(225,dirt); // walks //
/// southwest until it sees what ever //
/// color dirt is set to. //
////////////////////////////////////////////
procedure awalk(angle,color:integer);
var awx,awy,tout:integer;
begin
tout:=0;
angle:=360-angle;
repeat
tout:=tout+1;
mouse(Round(60*cos(angle * (pi/180)))+centerx,Round(60*sin(angle * (pi/180)))+centery,1,1,true);
wait(100);
if (FlagPresent=false) then
begin
repeat
mouse(Round(60*cos(angle * (pi/180)))+centerx,Round(60*sin(angle * (pi/180)))+centery,10,10,true);
wait(100);
tout:=tout+1;
until (FlagPresent) or (findcolor(awx,awy,color,569,8,723,160)) or (tout > 20);
if (tout > 20) then writeln('Library (Sythe`s Walker): Could not click on a spot due to something in the way.');
end;
flag;
wait(300);
awx:=centerx;
awy:=centery;
until (findcolorspiral(awx,awy,color,569,8,723,160)) or (tout > 20);
end;

Lorax
12-14-2006, 03:36 PM
I think people began to find use of it when it was rotation proof and when it was in english angles, but especially rotation proof..

Wizzup?
12-14-2006, 04:06 PM
I don't think that will be to that hard for RW?

Lorax
12-14-2006, 06:31 PM
I don't think that will be to that hard for RW?

Sorry, but I cannot understand what you're trying to say..