SRL Archive - OSR Help

Using ACA


Hazzah

2012-06-23 00:23:34

I have been trying for probably an hour now trying to select this NPC, the clothes dont seem to work because they end up matching the floor/wall and the head seems to work, but only part of the time.


This is my first script I have been trying to write and have had nothing but problem after problem! :fiery:

Based Lord

2012-06-23 00:28:44

Are you using CTS 2 at the bottom right? Usually helps with accuracy for npcs. Also you want to try to get as much of the area you want to click on to be marked when you press mark best color

Edit: Also what are you using to find the guy?

Hazzah

2012-06-23 00:41:58

Using Findobject, never used ACA and has been a while since I last read a tutorial/forum post that explained how to use it. Might end up going back and re-reading the tutorials and such. Might Try CTS2 aswell, although I seem to have gotten it to find him better, seem it started searching for him while my character was still moving so it had a hard time locating him.

I ended up increasing the wait time and the tolerance on him.

Based Lord

2012-06-23 01:08:37

From: Hazzah
Using Findobject, never used ACA and has been a while since I last read a tutorial/forum post that explained how to use it. Might end up going back and re-reading the tutorials and such. Might Try CTS2 aswell, although I seem to have gotten it to find him better, seem it started searching for him while my character was still moving so it had a hard time locating him.

I ended up increasing the wait time and the tolerance on him.


Well from what i've heard using TPA's / ATPA's to find objects is much better than findObject. AutoColorAid actually will make a function for you as well you just need to add in the mouse and what not.


function AutoColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;//Saves the previous CTS which needs to be set back after finishing the color finding
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(*HueMod*, *SatMod*);//Sets the Hue / Sat Mod for CTS2

FindColorsSpiralTolerance(MSCX, MSCY, arP, *Color*, MSX1, MSY1, MSX2, MSY2, * Tolerance*);//Searches starting from MSC out
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

So you would just pick your colors in ACA using CTS 2 until you get most of the NPC covered when you hit mark best color. Then you plug in the Color, Tolerance, Hmod, Smod (Put * * Around them in the code). Hope this helps :)

NKN

2012-06-23 01:11:30

I wrote a tutorial on Autocoloring, and writing your own function to go with it, so you know how it works, not just copy/pasting.

It's in my sig. (Autocolor = ACA)