SRL Archive - Help and Support

why wont this work


bbri06

2006-11-10 13:06:41

program roadwalk;
{.include SRL/SRL.scar}
var
a,b:integer;

procedure walk;
begin
radialroadwalk(6119013,270,180,35,1,1)
wait(7000)
end;

begin
repeat
walk;
until(false)
end.


whenever i try to use radialroad walk it dosnt do anything! why not?

Sumilion

2006-11-10 14:26:33

Your startradial is higher than the endradial … make it 180, 270 ;)

bbri06

2006-11-10 14:29:50

tyvm i will try that

edit: ok so it only clicks a little bit away from were my guy is standing then repeats that and that seems very detactable to me lol how can i tell it how far on the mini map to click it always clicks the same distance no matter what i set the radius to

Infantry001

2006-11-10 14:52:07

change 35 to 60 or 65

bbri06

2006-11-10 14:54:09

that dosn't change anything no matter wat i set the radius to it clicks the same distance

comon? anybody?

WT-Fakawi

2006-11-10 16:57:26

6119013 is a constant and will most likely work nowhere unless it is one of the rare constant colors of RS. I dont think this will work….

bbri06

2006-11-10 20:55:46

From: WT-Fakawi
6119013 is a constant and will most likely work nowhere unless it is one of the rare constant colors of RS. I dont think this will work….


so what would i use instead of the constant?

Boreas

2006-11-10 21:05:27

Well you can keep the format as it is, but you will have to color pick the road and replace it everytime you run it.

Either that or change it to a var that is set by an auto road color, there are some floating around.

bbri06

2006-11-10 21:12:13

k ty for all the help

tarajunky

2006-11-11 02:02:55

Yeah, you need to detect the roadcolor. This should work.


program roadwalk;
{.include SRL/SRL.scar}
var
a,b:integer;

function FindRoadColor:integer; // By Tarajunky
var red,green,blue:integer;
var TestColor,a,b,GenericRoadColor:integer;
begin
GenericRoadColor:=6842479;
Flag;
a:=MMX1;
b:=MMY1;
repeat
b:=b+1;
repeat;
a:=a+1;
if FindColorTolerance(x,y,GenericRoadColor,a,b,MMX2,MMY2,80) then
begin
a:=x;
b:=y;
TestColor:=GetColor(x,y);
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
if Red-Green>=5 then if Red-Green<=10 then
if Red-Blue>=5 then if Red-Blue<=10 then
begin
if GetColor(a+5,b+5)=TestColor then
if GetColor(a+3,b+3)=TestColor then
if GetColor(a,b+5)=TestColor then
if GetColor(a+5,b)=TestColor then
if GetColor(a,b+3)=TestColor then
if GetColor(a+3,b)=TestColor then
if GetColor(a+5,b+3)=TestColor then
if GetColor(a+3,b+5)=TestColor then
begin
result:=TestColor;
RoadColor:=TestColor;
Writeln('RoadColor = '+IntToStr(TestColor));
exit;
end;
end;
end else a:=MMX2;
until a>=MMX2;
a:=MMX1;
until b>=MMY2;
Writeln('Could not find Road Color!');
result:=0;
end;


procedure walk;
begin
radialroadwalk(RoadColor,270,180,35,1,1)
wait(7000)
end;

begin
RoadColor:=FindRoadColor;
repeat
if not(FindMMColor(x,y,RoadColor)) then RoadColor:=FindRoadColor;
walk;
until(false)
end.

bbri06

2006-11-25 01:00:49

ok…i am totally giving up on this..no matter what i do it just clicks my character roflmao

YoHoJo

2006-11-25 02:52:08

never give up!

bbri06

2006-11-25 04:41:14

From: yohojo8
never give up!



ok…i guess i will keep trying