Log in

View Full Version : Radial Walk



amned92
01-10-2007, 02:01 AM
Sorry for posting another question about radial walk, but I need help. I get the whole radial walk thing, but the problem is the changing colors. I am just making a little script for my self to walk me between desert mines and Al Kahirid bank. It worked fine one time and then when I logged in to a different world the colors changed and it didn't work. Can someone please tell me how to solve a way around this, or tell me how to add tolerance to radial walk.

the nerd
01-12-2007, 08:55 AM
It is easy to solve this kind of problem. Simply create an auto colour function. Make a bitmap about 4 x 4 in size that has got the colour of the ground that you want to follow from the MiniMap. Then use " FindDeformedBitmapToleranceIn" with the bitmap and a Toleranace of about 10, on the MiniMap. Use "Getcolor" on the x and y cords that it returns to get your color.

Example


procedure GetNewColor;
var
bmp ,DesertColor :integer;
acc :extended;
begin
bmp := BitmapFromString(4,4,'lkkj45lkjwrwkj32kj23' +
'sldkjfw9fsljdf9sldjf9sldj9elsjdf9spdljfsd')

FindDeformedBitmapToleranceIn (x,y,MMX1, MMY1, MMX2, MMY2, 10, 0, True, Acc)
DesertColor := GetColor(x,y)
end;


You will need to replace the bmp with your own, and some of the vars. But that kind of procedure will solve your problem.

amned92
01-17-2007, 11:39 PM
OK I need help with this. I keep trying to get radial walk to work, but it never clicks on map. I tested my bitmap by telling it to search in an area and move the mouse there and it did, but when I try to use radial it never clicks. Here is the clicking part.


program New;
{.include SRL/SRL.SCAR}
{.include SRL/SRL/extended/xText.Scar}

var Color1:integer

procedure GetNewColor;
var
Color ,Color1 :integer;
acc :extended;
begin
Color := BitmapFromString(9, 12, 'z78DA7D914B12C4200844AF64' +
'2448B28CBFFB1F691AD04C5299CCE695D5D80DA8146E5464E 74C2' +
'21B1F94E4E04A2C853B98C1A08C5D4A0AB14906B354E81537 0B6D' +
'831939E9D5E56C291012909F6F5E758925C4334DBDCE9E164 28EC' +
'D39AB75DCF769E996E66CDCD7307AF976AACFED36288B12F9 1B97' +
'3877A9C8EC3867F4D2D7B867AA0B41D0C3F03E5DDA6BBFB81 2944' +
'2EBF0EA39FE751D36F36E0A0FFACCEEDAEDCE2F56AB56EBF8 E59C' +
'C4DFFCFAF27E6ED677524E8E5FB079944FE5597D733DAB771 DDD3' +
'F3104930D');

FindDeformedBitmapToleranceIn(Color,x,y,640, 137, 666, 153, 50, 0, True, Acc)
Color1 := GetColor(x,y)
end;

Procedure WalkBank;
Begin
GetNewColor;
RadialWalk(Color1 , 187, 547, 52, 0, 0);
GetNewColor;
RadialWalk(Color1 , 190, 550, 71, 0, 1);
GetNewColor;
RadialWalk(Color1 , 184, 544, 69, 0, 1);
end;

Begin
DeclarePlayers;
SetUpSRL;
MouseSpeed:=20;
RandomDisguise;
ClearDebug;
repeat
wait(1000)
If(IsFKeyDown(6))then
WalkBank;
end.


Can someone please explain why this is happening. I need to know this for some future scripts I am panning. :wink:

LordGregGreg
06-07-2007, 01:42 PM
BitmapFromString(9, 12, 'z78DA7D914B12C4200844AF64' +
'2448B28CBFFB1F691AD04C5299CCE695D5D80DA8146E5464E 74C2' +
'21B1F94E4E04A2C853B98C1A08C5D4A0AB14906B354E81537 0B6D' +
'831939E9D5E56C291012909F6F5E758925C4334DBDCE9E164 28EC' +
'D39AB75DCF769E996E66CDCD7307AF976AACFED36288B12F9 1B97' +
'3877A9C8EC3867F4D2D7B867AA0B41D0C3F03E5DDA6BBFB81 2944' +
'2EBF0EA39FE751D36F36E0A0FFACCEEDAEDCE2F56AB56EBF8 E59C' +
'C4DFFCFAF27E6ED677524E8E5FB079944FE5597D733DAB771 DDD3' +
'F3104930D');
If you ask me, (I only did a quick skim of your code...)

It looks like your bitmap is WAY too big. You want it to be as small as possible, like a tiny little square that is nothing but the road color. I'll attach an example of mine.