BazzBarrett
2008-11-11 17:21:00
I realy whanted to start this 40 days ago (u can thank bt for that 1 (Internet was "accudently" cut off)) but now im back ill try and start were i left off :p
Looking in the includes i notice that most of the object finding altough most of it still would most likly work, is mostly unused and some even irelivent.
My main poin is TAutoColorInfo because the whole 5 mounth+ ive been here i havent seen a single script that uses this! so unless there is somthing realy big that i dident see, this is pritty useless. altough there probubly are scripts that use this so i dont know weather it would be worth Removing this or just calling it quits and just adding more relivent newer functions intro the objects.scar file or creating a new include altogether.
I feal all these can pritty much be turned into 1.. id sujest this 1 witch i made but i recon it will need some improvement with u guys cuz im not exsaculy SRL class :p
please post feedback what u think alternate sujestions anything useful :p
Looking in the includes i notice that most of the object finding altough most of it still would most likly work, is mostly unused and some even irelivent.
My main poin is TAutoColorInfo because the whole 5 mounth+ ive been here i havent seen a single script that uses this! so unless there is somthing realy big that i dident see, this is pritty useless. altough there probubly are scripts that use this so i dont know weather it would be worth Removing this or just calling it quits and just adding more relivent newer functions intro the objects.scar file or creating a new include altogether.
I feal all these can pritty much be turned into 1.. id sujest this 1 witch i made but i recon it will need some improvement with u guys cuz im not exsaculy SRL class :p
{*******************************************************************************
function FindObject(Var X, Y :Integer; Color, Tolerance :Integer; UpTextToCheck :String):Boolean;
By: Bazzbarrett
Description: Finds objects using a TPA of the color specified with the
tolerance specified, and then checking the uptext to make
sure we have found the correct object
Parameters:
X, y : Were to store the coordanates of the found object.
Color : The color of your object.
Tolerance : The tolerance to search for the object at i recomend about 15.
UpTextToCheck : Part of the uptext to check if we have the correct object
E.g. 'Oak' or 'tack Cow'
Example: FindObject(TreeX, TreeY, 2777428, 15, 'Oak');
*******************************************************************************}
Function FindObject(Var X, Y : Integer; Color, Tolerance :Integer; UpTextToCheck : String):Boolean;
var
CTS, II, HATPA : Integer;
TPA : TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
HATPA := High(ATPA);
For II := 0 to HATPA do
begin
MiddleTPAEx(ATPA[II], X, Y);
MMouse(X, Y, 2, 2);
Wait(50+Random(10));
If(IsUpText(UpTextToCheck))then
begin
Result := True;
GetMousePos(x, y);
Exit;
end;
end;
end;please post feedback what u think alternate sujestions anything useful :p