SRL Archive - Help and Support

Roadwalk


Sjoe

2006-06-15 08:16:09

Sup,

what's the best way for auto roadwalk? :) there are alot of procedures bout roawalking.
And I dunno which to take

Thx!!

XxKanexX

2006-06-15 08:53:00

Radial walks quite good, if you know how to use it. (There's a tutorial by Fakawi somewhere on the board.) ;)

Sjoe

2006-06-15 09:11:41

K I used radialwalk but and I use Roadcolor as Thecolor:longint;

But there comes a debug image of where I'm standing (but's that's the bank)
So it won't find the roadcolor. How do I solve that :)
PS: I really need autocolors, cause I'm learning how too :d( in different ways if possible :p)

ub3r |<1||3r*1337*

2006-06-15 15:03:48

To use autocolors, you need to either use bitmaps to find the road, or use the Misc functions. Or, my favourite, DTM's

WT-Fakawi

2006-06-15 16:17:35

To use RadialRoadWalk you will first need a RoadColor to walk over. You can do this by either manually pick a color and place this inside your setup like:

RoadColor:=7482626;

Or, you might try to do this autocolor.

Now, once RadialRoadWalk gets this first RoadColor as a reference, it will walk over the RoadColor, even when the color changes at LPW-screens.

So, all you need is a first referencecolor, either by autocolor or by manual picking.


P.S. I accidentily left the debugflag on, you can set it to False inside MapWalk.scar. I always have debug on when I run my own scripts.

Avaphi

2006-06-15 16:19:11

Use a 5x5 BMP of the Color you want, Make the tolerance go up by one until it finds the correct color, sets your road color to the correct color, resets your tolerace.

Sjoe

2006-06-16 08:29:43

meeh, I'll just use fawki way . I don't get your way :)

PS: In your Goblin Sched. , you used Roadcolor to walk back to the goblin place :)
how come ? :d

WT-Fakawi

2006-06-16 08:37:04

It walks over the RoadColor, thats why. At LumbyCastle there is a Big Lumb of RoadColor in the upperleft corner of the minimap (The Castle…). I compare it to a 4*4 Bitmap with RoadColor-ish color.
Check the SRL-Library under misc/Colorfinders.scar to understand AutoColor, or the GobbieScheduler's FindLumbridgeRoadColor.

Sjoe

2006-06-16 08:40:41

ooh ok, to advanced now for me :) maybe later :d

Sjoe

2006-06-23 18:49:04

K, got new Prob



How to RadialRoadWalk (the red line)

I tried lot's of number didn't knew how to (my closest was RadialRoadwalk(Roadcolor, 200, 250 , 1 , 1)

realrune

2006-06-23 19:12:56

From: Inholtz
K, got new Prob



How to RadialRoadWalk (the red line)

I tried lot's of number didn't knew how to (my closest was RadialRoadwalk(Roadcolor, 200, 250 , 1 , 1)


Try this… RadialRoadWalk(RoadColor, 225, 360, 70, 2, -1);

225 is southwest, 360 is north. So it looks from SouthWest to North with a Radius of 70.

Sjoe

2006-06-23 23:49:51

Cool, lemme try this out ( btw , is radius distance?)

EDIT: didn't worked that good (it clicks most left, the buliding entrance)

realrune

2006-06-24 00:43:31

Yes, radius is the distance away from the minimap's center.

Try lowering the radius some, it may work.

You might not get it 100% just because of the 3 roads.

Sjoe

2006-06-24 00:56:47

K , I tried something else (RoadWalk) and this worked better then RadialRoadWalk :).
But thx for helping me, I apreciate that (however you spell it lol)

realrune

2006-06-24 14:09:54

From: Inholtz
K , I tried something else (RoadWalk) and this worked better then RadialRoadWalk :).
But thx for helping me, I apreciate that (however you spell it lol)


Well, they're the exact same thing except RadialRoadWalk updates the roadcolor when it changes. (RadialWalk doesn't).

Sjoe

2006-06-25 09:30:02

so I'll need something that checks the roadcolor? (what could I use then?)

realrune

2006-06-27 14:06:52


procedure RoadWalkTol2(RColor: Integer; Dir: String; Tol: Integer);
var
c : Integer;
begin
Uppercase(Dir);
if (Dir = 'S') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 565, 160 - c, 725, 160, Tol)) then
begin
MouseFindFlag(x, y, 0, -1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'SE') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 725 - c, 160 - c, 725, 160, Tol)) then
begin
MouseFindFlag(x, y + 5, -1, -1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'SW') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 565, 160 - c, 565 + c, 160, Tol)) then
begin
MouseFindFlag(x + 5, y + 5, 1, -1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'N') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 565, 5, 725, 5 + c, Tol)) then
begin
MouseFindFlag(x, y, 0, 1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'NE') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 725 - c, 5, 725, 5 + c, Tol)) then
begin
MouseFindFlag(x, y + 5, -1, 1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'NW') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 565, 5, 565 + c, 5 + c, Tol)) then
begin
MouseFindFlag(x, y + 5, 1, 1);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'E') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 725 - c, 5, 725, 160, Tol)) then
begin
MouseFindFlag(x, y + 5, -1, 0);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
if (Dir = 'W') then
begin
repeat
c := c + 5;
if (FindColorTolerance(x, y, RColor, 565, 5, 565 + c, 160, Tol)) then
begin
MouseFindFlag(x, y + 5, 1, 0);
CountFlag(10);
Break;
end;
until (c >= 100);
end;
end;

That should work, countflag will auto update the roadcolor.

WT-Fakawi

2006-06-27 14:50:20

Gha, well well. Nice one realrune. I didnt even intent CountFlag to be part of another angine, but you did it. Impressive!

Sjoe

2006-06-27 16:04:43

aah so this one is not in the scar includes?

K, thx very much then realrune

Sjoe

2006-06-30 11:37:34

k , this clicks not on the roadcolor but besides? How can I fix that :)

realrune

2006-07-01 00:11:15

From: Inholtz
k , this clicks not on the roadcolor but besides? How can I fix that :)

Look in the Procedure I posted, and find all of the mousefindflags, then change it so that they don't add anything to x or y. So this :

MouseFindFlag(x, y + 5, -1, -1);

Would Become :

MouseFindFlag(x, y, -1, -1);

Sjoe

2006-07-01 06:12:46

And I say: thank you very much again :)

realrune

2006-07-01 21:53:01

From: Inholtz
And I say: thank you very much again :)


Your welcome.

Sjoe

2006-07-06 19:46:30

Wouldn't bother make a new thread bout this :) :
Is there a procedure/function that checks if the NPC is dead?

QQu

2006-07-06 20:56:30

Checks if an NPC is dead?
Do you mean Monster? :D

Sjoe

2006-07-07 09:42:41

Not really a Monster, just a big fat Giant with an big stick :p