Log in

View Full Version : Water Walk



whales
02-19-2007, 01:42 AM
How do I use water walk?


{************************************************* ******************************
function WaterWalk(StartRadial, EndRadial: Integer; Radius, FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
By: By Wizzup? and WT-Fakawi.
Description: Walks alongside Water.
************************************************** *****************************}

function WaterWalk(StartRadial, EndRadial: Integer; Radius,
FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;

Basically I just need to know what each variable represents..

Infantry001
02-19-2007, 02:09 AM
StartRadial/EndRadial: Where to start and finish looking for the water color.
Radius: How far out to search (Searches from Radius inwards).
FFlagBreakOut: Distance from the flag before you want to end procedure.
X/Yoff: How far off to click from actual Water COlor.
X/YMod: If you dont find a Flag, clicks +Xmod and +Ymod until it finds a flag (for more info, look in MouseFlag.scar)

And look at the RadialWalk tutorial at Tutorial island if you need anymore help.

whales
02-19-2007, 02:13 AM
Beautiful! Thanks a lot

WT-Fakawi
02-19-2007, 07:25 AM
Dont forget to set the Global WaterColor at script startup :)

whales
02-19-2007, 04:44 PM
Dont forget to set the Global WaterColor at script startup :)

Thats why its not working! Thanks :D

Edit: I tested it out and I'm getting sever lag, I expected a little but I am getting way to much.. Is there anything I need/can do to reduce lag and get this to work?

Heres the basics of it:


Procedure GetWaterColor;
Var Tx, Ty:Integer;
begin
LoadBMPs;
if (findbitmapTol(Tx,Ty,WaterBMP,568,12,704,143)) then
Begin
MMouse(Tx, Ty, 1, 1);
WaterColor:= Getcolor(Tx,Ty);
end
Else
writeln('cannot get water Color');
end;

{--------------------------------------------------------------------------}

Procedure WalkToBank;
begin
If (InvFull) then
begin
MakeCompass('n');
Repeat
WaterWalk(70,1,70,10,20,20,610,30);
Until(FindSymbol(x,y,'bank'))
L := L+1;
end;
end;

whales
02-19-2007, 06:04 PM
Bump I'm stuck right now and can't get any further with out help with this so this is why I am bumping.

Infantry001
02-19-2007, 07:31 PM
Thats why its not working! Thanks :D

Edit: I tested it out and I'm getting sever lag, I expected a little but I am getting way to much.. Is there anything I need/can do to reduce lag and get this to work?

Heres the basics of it:


Procedure GetWaterColor;
Var Tx, Ty:Integer;
begin
LoadBMPs;
if (findbitmapTol(Tx,Ty,WaterBMP,568,12,704,143)) then
Begin
MMouse(Tx, Ty, 1, 1); <--Dont need MMouse here
WaterColor:= Getcolor(Tx,Ty);
end
Else
writeln('cannot get water Color');
end;

{--------------------------------------------------------------------------}

Procedure WalkToBank;
begin
If (InvFull) then
begin
MakeCompass('n');
Repeat
WaterWalk(70,1,70,10,20,20,610,30);
Until(FindSymbol(x,y,'bank'))
L := L+1;
end;
end;

Dont need the MMouse in your GetWaterColor procedure. Also, make sure that the WaterColor is between Radians 70 and 1. If you dont kno what radians are, think of it like the angles of a circle.

For example, WaterWalk(90,1,70,10,20,20,610,30); would search from the 90 degree angle to the 1 degree angle.

whales
02-19-2007, 08:32 PM
Ok, what radians do you recommend? I'm using this at the barb village fishing spot.. Ive got my char to turn to the north and the water runs along the right side when facing north.. I'm trying to walk north to the bank. If this is to much don't worry about it, I may just try something else, but this seems most practical.

Edit: Made my own water walking that works beautifully! And is very simple!