PDA

View Full Version : Map Walking - Different Approach



Camaro'
02-03-2011, 10:52 PM
Color Walking

This tutorial teaches you how to use a newer extremely simple, and effective method of TPA walking.

The method:


function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);

for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;

rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;

Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;


Explanation:

If you know how to use this, excellent, but for the people are a little confused, let me explain.

It generates a TPA( TPointArray, an array of TPoint) from the color specified, using the tolerance specified. Next, it then sorts the TPA from the point in the parameters, so TPA[0] would be closest to the point specified. Finally it just loops through the TPA checking if the point is on the minimap, if it is, it clicks! :)

How can I use this?

First, open up runescape and when your logged in determine where you want to walk to. For example, I want to walk here:
http://img31.imageshack.us/img31/5900/76710712.png

First, drag Simba(or scars) crosshair to runescape:
http://img713.imageshack.us/img713/4728/crosshairc.png
To do this, just click on the cross hair and drag it on runescape until you see that red box. Then let go of the mouse.

So lets say we are walking here:
http://img31.imageshack.us/img31/5900/76710712.png

Just drag the color picker to the point, and record the color and the point, and just put the tolerance at 15 or higher, I suggest like 23 so it will work better.


if (Walking(55555, 23, Point(623, 89))) then


Auto-Generating:

Lets say, perhaps, you want to make a lot of points... You can use this auto generator script made by Coh3n which is found here (http://villavu.com/forum/showthread.php?t=61522). Basically this will walk through a path in reflection (when you can use tiles and the such) and as it walks it gathers and saves the paths color information.


Things to know:

Very reliable
Can be used at any minimap position using this (http://villavu.com/forum/showthread.php?t=62182)method.
Used in MSI

Awkwardsaw
02-03-2011, 10:56 PM
i'm using this. :)

Iamadam
02-03-2011, 11:58 PM
Cool, but:

Mouse(x, y, 6, 6, true);
Maybe let the user input the randomness?

Awkwardsaw
02-04-2011, 12:20 AM
it's just an example, it's not hard to add your own paramaters :)

trojan
02-05-2011, 11:23 PM
Will this be added to the SRL Includes?

Zyt3x
02-06-2011, 12:19 AM
Will this be added to the SRL Includes?No way.. This is way to unreliable

Camaro'
02-06-2011, 12:22 AM
No way.. This is way to unreliable

Yea, this is for personal use in scripts, but it's more reliable than you think Zyt3x :)

Awkwardsaw
02-06-2011, 12:42 AM
No way.. This is way to unreliable

as long as you use it correctly, this is epic. just use like a 25 tolerance

Echo_
02-08-2011, 04:05 AM
Interesting, I might use it as a failsafe.

Awkwardsaw
02-08-2011, 04:17 AM
here you go, now you hopefully dont have to stay at perfect north :)
when using this
http://villavu.com/forum/showthread.php?p=776871#post776871

Camaro'
02-08-2011, 04:24 AM
Nice :D I'm going to test it tomorrow.

Coh3n
02-08-2011, 07:03 AM
No way.. This is way to unreliable
Explain please?

It's what MSI uses. I've used it several times and I've yet to see it fail.

Camaro, may mention the tool I wrote for people who want to generate an entire path from some tiles? :D

Zyt3x
02-09-2011, 10:28 AM
Explain please?

It's what MSI uses. I've used it several times and I've yet to see it fail."FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);"

Try walking with this in the desert or other places where the colors are nearly the same.. Also CTS1 :p

Coh3n
02-09-2011, 05:59 PM
"FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);"

Try walking with this in the desert or other places where the colors are nearly the same.. Also CTS1 :p
I don't think it would matter that much because of the sorting point. Assuming the compass angle is at north, the sorting point is in the direction you want to walk.

Zyt3x
02-09-2011, 06:19 PM
I don't think it would matter that much because of the sorting point. Assuming the compass angle is at north, the sorting point is in the direction you want to walk.Then this method is almost just as good as coord clicking then :redface:

Coh3n
02-09-2011, 06:24 PM
Then this method is almost just as good as coord clicking then :redface:
But it would only walk if the color is found, so it's better than coord clicking. I suppose it could be made more accurate using CTS2 and the like, but why mess with something that works extremely well as it is?

Sir R. M8gic1an
02-09-2011, 08:15 PM
I think you totally do deserve that Masters Cup. What a great walking method.

Also, this is much better than coord clicking.

It looks for a coord and then looks for the color that should've been there if RS didn't move its compass and you hadn't walked with randomization before.

This is color walking at its best.

Zyt3x
02-09-2011, 10:34 PM
I think you totally do deserve that Masters Cup. What a great walking method.

Also, this is much better than coord clicking.

It looks for a coord and then looks for the color that should've been there if RS didn't move its compass and you hadn't walked with randomization before.

This is color walking at its best.wat

There's way better ways of color walking out there...
To be honest (and unfortunately a little harsh), this kind of code is the code I made when I was learning how to script...

Here's some faults about the current function:
What's the point of looping when you only use the first index of the array? The best would be to get the middle of the TPA and use that one.
What if the coordinates you pass to the Mouse() function is not on the minimap? There's a check (rs_OnMiniMap() ) before the mouse function, but the randomness is added to the coordinates inside the mouse function, so it would be better to add the randomness before calling Mouse() & rs_OnMiniMap().
Using this method is highly detectable as the character is stopping between each step, and the 3 sec wait in there (at maximum) is way too much.

I'm sorry, I would never use this function for my scripts...

Camaro'
02-10-2011, 12:27 AM
wat

There's way better ways of color walking out there...
To be honest (and unfortunately a little harsh), this kind of code is the code I made when I was learning how to script...

Here's some faults about the current function:
What's the point of looping when you only use the first index of the array? The best would be to get the middle of the TPA and use that one.
What if the coordinates you pass to the Mouse() function is not on the minimap? There's a check (rs_OnMiniMap() ) before the mouse function, but the randomness is added to the coordinates inside the mouse function, so it would be better to add the randomness before calling Mouse() & rs_OnMiniMap().
Using this method is highly detectable as the character is stopping between each step, and the 3 sec wait in there (at maximum) is way too much.

I'm sorry, I would never use this function for my scripts...

It doesn't just use the first index in the array? Although I do agree that the 'rs_OnMinimap' should include the randomness. The main reason why the wait is in there is because I took this directly from my pest controller which it didnt matter if it waited three seconds when it was going to exchange, regardless, if someone did use this, they should/would modify the mouse randomness and remove the wait (or make it smaller).

Also, waiting 3 seconds(maximum) is not highly detectable considering the fact that if Jagex was actually monitoring your account, you would be banned regardless if you wait that extra second or so. There is no way a human can mistake SRL for a human. No automated macro detection will flag/detect you for waiting in between clicks. All waiting that extra few seconds does is waits for the character to be at a complete stop and a second or so more.

The fact that you would never use this in one of your scripts is your own opinion, no need to say that you are sorry. Although, I am still confused at why you dislike this so much considering all of MSI's color walking is based around this and also how you wont use this in your scripts because of a few points you made which took less then like 2 minutes to edit and fix.

I made some changes to the original version to use a less wait and fix the random mouse issue. Thanks for pointing that out :)

Also, have you even tried this making your own color walking point?

Coh3n
02-10-2011, 12:36 AM
The fact that you would never use this in one of your scripts is your own opinion, no need to say that you are sorry. Although, I am still confused at why you dislike this so much considering all of MSI's color walking is based around this.
+ just how well it works.

About the stopping after each click - it doesn't have to do that. If fact, MSI's walking doesn't (it may sometimes due to discrepancies with Flag), it will click the next point when it's close enough to the flag.

@Zytex: The issues you bring up can all be resolved with some customization of the function. It's also the scripter's choice. I recommend this, but not everyone will feel the way I do.

Awkwardsaw
02-10-2011, 01:41 AM
i use this in my tut runner, and its far, far greater than using DTMs. the only real difference in this and radialwalk is that radial walk filters the points using filterpointspi, this uses sortpoint. both require you to have the compass in a specific direction, and both wait until you stop walking to go onto the next part

Zyt3x
02-10-2011, 08:24 AM
It doesn't just use the first index in the array? Although I do agree that the 'rs_OnMinimap' should include the randomness. The main reason why the wait is in there is because I took this directly from my pest controller which it didnt matter if it waited three seconds when it was going to exchange, regardless, if someone did use this, they should/would modify the mouse randomness and remove the wait (or make it smaller).

Also, waiting 3 seconds(maximum) is not highly detectable considering the fact that if Jagex was actually monitoring your account, you would be banned regardless if you wait that extra second or so. There is no way a human can mistake SRL for a human. No automated macro detection will flag/detect you for waiting in between clicks. All waiting that extra few seconds does is waits for the character to be at a complete stop and a second or so more.

The fact that you would never use this in one of your scripts is your own opinion, no need to say that you are sorry. Although, I am still confused at why you dislike this so much considering all of MSI's color walking is based around this and also how you wont use this in your scripts because of a few points you made which took less then like 2 minutes to edit and fix.

I made some changes to the original version to use a less wait and fix the random mouse issue. Thanks for pointing that out :)

Also, have you even tried this making your own color walking point?Ah, I didn't see that "Continue;" in there :redface:

And look at the bold section, I think that's exactly how Humans / Automated macro detection system works, but we don't really have any proof of that :/

Camaro'
02-10-2011, 08:14 PM
Ah, I didn't see that "Continue;" in there :redface:

And look at the bold section, I think that's exactly how Humans / Automated macro detection system works, but we don't really have any proof of that :/

I disagree, but we have no proof.

A lot of times when I walk I will stop completely (could be for like 10 seconds) because I'm writing to someone on MSN or writing something for a script. I doubt they use the waiting between clicks to determine if your a macro.

marpis
02-11-2011, 02:13 PM
Yeayeayea it's nice and easy walking. But you should have atleast made it use RotatePoint with compass angle :rolleyes:

SPOILER:

program TEST_SPS;
{.include SRL/SRL.scar}
{.include SRL/SRL/SPS/SPS.simba}

// This will walk from VEB to VEM and back

var
TPA: TPointArray;

begin
SPS_Areas := ['12_4', '12_5'];
// VEM -> BANK
TPA := [Point(5127, 2244), Point(5135, 2210), Point(5148, 2160),
Point(5144, 2111), Point(5135, 2044), Point(5124, 1996),
Point(5082, 1961), Point(5033, 1960), Point(1339, 1960),
Point(4982, 1997)];
SetupSRL;
InvertTPA(TPA);
WalkPath(TPA);
InvertTPA(TPA);
WalkPath(TPA);
end.


You'll see later today.

Sir R. M8gic1an
02-11-2011, 02:17 PM
Lol marpis, yours doesn't use compass does it? well anyway.

Zytex, one fay you'll get just how genious that code is. That is the function from which all other SRL Walking functions derive from.

It's the very core of it, and from that you can build everything.

~RM

marpis
02-11-2011, 02:38 PM
Lol marpis, yours doesn't use compass does it? well anyway.

Zytex, one fay you'll get just how genious that code is. That is the function from which all other SRL Walking functions derive from.

It's the very core of it, and from that you can build everything.

~RM

Well yea mine doesn't but the reason for Camaros function being as good as it is is that it can be used with any compass angle.
It will take like 3 or 4 lines of code to make it do that.

If you want SPS to work regardless of compass angle, you have to rotate a 100x100 bitmap and remove the borders that it will create. And yea I will implement this in the future, I already know how.

Sir R. M8gic1an
02-11-2011, 03:32 PM
Well yea mine doesn't but the reason for Camaros function being as good as it is is that it can be used with any compass angle.
It will take like 3 or 4 lines of code to make it do that.

If you want SPS to work regardless of compass angle, you have to rotate a 100x100 bitmap and remove the borders that it will create. And yea I will implement this in the future, I already know how.

cool :)

I've got some ideas for walking too ;)

~RM

DeSnob
06-20-2011, 01:20 PM
Is there any way of doing this without a complete stop?

masterBB
06-20-2011, 04:57 PM
Is there any way of doing this without a complete stop?

FFlag(0); <- replace the 0 with 1-2 or maybe Random(2) +1. Try some ;).

Camaro'
06-21-2011, 09:45 PM
FFlag(0); <- replace the 0 with 1-2 or maybe Random(2) +1. Try some ;).

Has any one tried what akwardsaw(sp?) made?

http://villavu.com/forum/showthread.php?p=776871#post776871

That should solve the compass issue.

Zyt3x
06-21-2011, 09:51 PM
Has any one tried what akwardsaw(sp?) made?

http://villavu.com/forum/showthread.php?p=776871#post776871

That should solve the compass issue.What compass issue? :redface:

Camaro'
06-21-2011, 10:01 PM
The function posted in the first post only works when the compass is facing north. The function RotatePoint will fix that.

HardRockers
01-02-2012, 02:27 AM
I use this, and am very pleased. I do have trouble with a lot of the colors being the same around me, but I just kept trying until i got it to work.

Camaro'
02-04-2012, 04:31 AM
I use this, and am very pleased. I do have trouble with a lot of the colors being the same around me, but I just kept trying until i got it to work.

I'm glad to hear.

kingarabian
02-12-2012, 01:22 AM
It's not going to work if the Compass is not perfect North so use this:


function RotatePointEx(p, o:tPoint; d:Extended):TPoint ;
begin
p.x := p.x + (0 - o.x);
p.y := p.y + (0 - o.y);

Result.x := (round(p.x * cos(d * (PI / 180)) - (p.y * sin(d * (PI / 180))))) - o.x * -1;
Result.y := (round(sin(d * (PI / 180)) * p.x + cos(d * 1 * (PI / 180)) * p.y)) - o.y * -1;
end;

function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var
i, x, y, rx, ry,a : Integer;
TPA: TPointArray;
xT : TPoint;
begin
if not LoggedIn then Exit;
FindNormalRandoms;

a := round(RS_GetCompassAngleDegrees);
a := (360 - a);
xT := RotatePointEx(SortFrom, Point(MMCX,MMCY), a);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
if (Length(TPA) < 10) then Exit;

SortTPAFrom(TPA, XT);

for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;

rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;

Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;

Credit Camaro for updating.

wazzzup
03-21-2012, 05:56 AM
Is this still up to date?