Tim0suprem0
06-23-2007, 03:42 AM
So when I try and do RadialRoadWalk it says RoadColor not found, but by just picking the road color myself I can RadialWalk fine. It said in JAD's tut that you should try and use AutoColorThis and get the color from a bitmap and that sounds a lot messier than just picking the color and setting it as a constant in the beginning of the script. The script I'm making requires very little walking, all on roads, but my question is will the colors change? And is there anything I can do to use RadialRoadWalk or find the road color?
If i didn't put enough info just let me know :)
I posted on JAD's tut as well:
http://www.srl-forums.com/forum/tut-learning-things-t10586p5.html?highlight=member
EDIT: Nevermind! Took me all of 30 seconds to find out about FindVarrockRoadColor(which is where I am) and voila! it found the road fine.
SKy Scripter
06-23-2007, 04:42 AM
Make Your Own AutoColor Hah!
only Works For Fally Road....
program New;
{.include srl/srl.scar}
procedure XYZtoLab(X, Y, Z : Extended; var L, A, B : Extended);
begin
try
L := 10 * Sqrt( Y );
A := 17.5 * ((( 1.02 * x) - y) / Sqrt( Y ));
B := 7 * ((Y - (0.847 * Z)) / Sqrt( Y ));
except
Writeln('ERROR: Math ERROR');
end;
end;
procedure LabToXYZ(L, A, B : Extended; var X, Y, Z : Extended);
begin
try
Y := Pow(L / 10, 2);
X := ((A / 17.5 * L / 10) + Y) / 1.02;
Z := -((B / 7 * L / 10) - Y) / 0.847;
except
Writeln('ERROR: Math ERROR');
end;
end;
procedure ColorToLab(Color : Integer; var L, A, B : Extended);
var
X, Y, Z : Extended;
begin
ColortoXYZ(Color, X, Y, Z);
XYZtoLab(X, Y, Z, L, A, B);
end;
function LabToColor(L, A, B : Extended) : Integer;
var
X, Y, Z : Extended;
begin
LabToXYZ(L, A, B, X, Y, Z);
Result := XYZtoColor(X, Y, Z);
end;
function GetFallyRoadColor : Integer;
var
P : TPointArray;
i, Color, Sx, Sy : integer;
L, A, B : Extended;
begin
sx := MMCX;
sy := MMCY;
If (FindColorSpiralTolerance(sx, sy, 6518140, MMX1, MMY1, MMX2, MMY2, 70)) then
If (rs_OnMinimap(sx, sy)) then
begin
FindColorsSpiralTolerance(sx, sy, P, 6518140, MMX1, MMY1, MMX2, MMY2, 70);
for i := 0 to GetArrayLength(P)-1 do
begin
If (rs_OnMinimap(P[i].x, P[i].y)) then
begin
Color := GetColor(P[i].x, P[i].y);
if (Color < 1) then Color := 1;
ColortoLab(Color, L, A, B);
If (B < 0.0) and (B > -8.0) and (A < 25)then
begin
Result := Color;
Writeln('Found Fally Road Color = ' + IntToStr(Result));
Exit;
end;
end;
end;
end;
end;
begin
SetupSRL;
FindRS;
ActivateClient;
Wait(1000);
GetFallyRoadColor;
//Writeln(inttostr(GetBankColor));
end.
Tim0suprem0
06-23-2007, 04:59 AM
Ok I've got another question, how do I radialwalk my way into a general store? Ive tried using a bitmap of the store symbol but its not working, is there a way to go in based on floor color? how do I get that color though?
SKy Scripter
06-23-2007, 05:20 AM
Ok I've got another question, how do I radialwalk my way into a general store? Ive tried using a bitmap of the store symbol but its not working, is there a way to go in based on floor color? how do I get that color though?
i need to know where your walking from XD
Tim0suprem0
06-23-2007, 03:27 PM
Basically I just want to know how to enter a different building using radialwalk. I would assume I have to find some feature on the minimap, but I'm not sure how to do this or what I would use. Sorry I'm a nub I'm trying lol!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.