Edit: Could some one add me on msn or something and help me please because i read a lot of tuts and tryed a couple of ways bu still cant get started on making a walking function
Edit: Could some one add me on msn or something and help me please because i read a lot of tuts and tryed a couple of ways bu still cant get started on making a walking function
Last edited by rya; 03-01-2010 at 04:08 PM.
I see Now, says the blind man
Nothing from AutoColor.scar works :/
Edit: Use the Auto Color Aid (ACA) v2 from the scripting folder to make your own auto color.
Find FallyRoadColor works sometimes. I am working on re writing one, I will release it when i'm done.
There is no longer a specific color for any road. The best solution is to use tolerance with a color from ACA, or to just use CTS 2 all together in combination with TPAs because whatever single color you return from auto color on a road isn't going to cover all of it.
Is there a function like radialwalk that does not use any colour at all, just a pure geometry walk?
ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457
I wrote this a few days ago for Varrock. Since the roads are now broken up into many colors, it would be nice to return more than one color for the roadcolor and loop through them...
Basically, it returns all matching colors, and then walks based on the color array rather than just one color.Code:function RadialWalks(TheColors:TIntegerArray; StartRadial, EndRadial, Radius, Xmod, Ymod: Integer): Boolean; var TPA,TPA2: TPointArray; I,J,N: Integer; begin Result := False; n:=High(TheColors); if n=0 then exit; for j:= 0 to n do begin if RadialWalkEx(tpa, MMCX, MMCY, TheColors[j], 0, StartRadial, EndRadial, Radius) then TPA2:=CombineTPA(TPA,TPA2); end; SortCircleWise(tpa2, MMCX, MMCY, StartRadial, False, StartRadial > EndRadial); for i:= 0 to High(TPA2) do if MFNF(tpa2[i].x, tpa2[i].y, Xmod, Ymod) then begin FFlag(10); Result := True; Exit; end; end; Function FindVarrockRoadColors:TIntegerArray; var ii, i, c, n, w: Integer; TestColours: TIntegerArray; TPA: TPointArray; x, y, z: Extended; r, g, b: Integer; BlackList, ResultArr: TIntegerArray; RoadColorsString:string; begin FindColorsSpiralTolerance(mmcx, mmcy, tpa, 8881291, mmx1, mmy1, mmx2, mmy2, 70); if length(tpa) > 0 then begin c := high(TPA); TestColours := GetColors(TPA); for i := 0 to c do begin ColorToRGB(TestColours[i], r, g, b); ColorToXYZ(TestColours[i], x, y, z); if not InIntArray(blacklist, TestColours[i]) then if InRange(R - B, -5, 13) then if InRange(R - G, -7, 10) then if InRange(G - B, -5, 9) then if ((x > 22.5) and (x < 26.5)) then if ((y > 22.5) and (y < 27.8)) then if ((z > 23.5) and (z < 28.7)) then begin n := high(ResultArr); SetArrayLength(ResultArr, n + 2); ResultArr[n+1] := TestColours[i]; end; w := high(blacklist); SetArrayLength(BlackList, w + 2); BlackList[w+1] := TestColours[i]; end; end; if length(resultarr) < 1 then begin SetArrayLength(Result, 1); result[0] := -1; writeln('Could not find Varrock road color!'); exit; end; RoadColorsString:=''; w := high(resultArr); for i := 1 to w do begin ii := CountColor(resultarr[i], mmx1, mmy1, mmx2, mmy2); if ii > 20 then begin if (RoadColorsString='') then RoadColorsString:=IntToStr(ResultArr[i]) else RoadColorsString:=RoadColorsString+','+IntToStr(ResultArr[i]); n := high(Result); SetArrayLength(Result, n + 2); Result[n+1] := resultarr[i]; end; end; writeln('Varrock Road Colors Found = '+RoadColorsString); end;
ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457
There are currently 1 users browsing this thread. (0 members and 1 guests)