Main
2011-10-24 11:38:47
Back in the color days, how did you guys were able to locate your self during the rune ess place?
2011-10-24 11:38:47
2011-10-24 11:42:40
2011-10-24 11:49:28
2011-10-24 12:03:22
From: Zyt3x
You could use SPS :)
2011-10-24 12:03:44
2011-10-24 12:05:30
2011-10-24 12:11:41
From: WantedK.
I haven't used SPS yet but I assume it uses a massive amount of resources. If this is the case using that might be something I would suggest against.
2011-10-24 12:19:34
2011-10-24 12:22:06
function GetSpawnLocation: string;
var
TPA, dTPA, Dirr: TPointArray;
D, MinC: TIntegerArray;
Dir: TStringArray;
T: Integer;
I: Byte;
tP: TPoint;
label
LastResort;
begin
T := GetSystemTime;
DWriteLn('Determening Spawn Location..');
repeat
Wait(500 + Random(500));
until ((CountColorTolerance(394503, MMX1, MMY1, MMX2, MMY2, 10) > 2000) or (GetSystemTime - T > 10000));
if (UseReflection) then
begin
tP := GetMyPos;
Dir := ['South West', 'North West', 'North East', 'South East', 'Middle South', 'Middle North'];
Dirr := [Point(2896, 4809), Point(2896, 4845), Point(2923, 4846), Point(2925, 4818),
Point(2906, 4826), Point(2912, 4833)];
for I := 0 to 5 do
if (tP.x = Dirr[I].x) then
if (tP.y = Dirr[I].y) then
begin
Result := Dir[I];
Exit;
end;
Writeln('Kidding me..?');
goto LastResort;
end else
begin
LastResort:
Dir := ['South West', 'North West', 'North East', 'South East'];
MinC := [100, 400, 500, 350];
SetArrayLength(D, 4);
Result := 'Unknown';
T := GetSystemTime;
DWriteLn('Determening Spawn Location..');
FindColorsTolerance(TPA, clWhite, MMX1, MMY1, MMX2, MMY2, 421);
DDebugTPA(TPA);
for I := 0 to 3 do
begin
dTPA := TPA;
FilterPointsPie(dTPA, 0 + (90 * I), 90 + (90 * I), 65, 75, MMCX, MMCY);
D[I] := Length(dTPA);
end;
if ((D[0] > 100) and (D[1] > 100) and (D[2] > 100) and (D[3] > 100)) then
begin
dTPA := TPA;
FilterPointsPie(dTPA, 180, 270, 0, 75, MMCX, MMCY);
if (Length(dTPA) > 2500) then
begin
Result := 'Middle South';
Inc(Stats_CustomVars[10]);
end
else
begin
Result := 'Middle North';
Inc(Stats_CustomVars[11]);
end;
ClearTPA;
DWriteLn('Resulted: ' + Result + '!');
Exit;
end;
for I := 0 to 3 do
if (D[I] > MinC[I]) then
begin
Result := Dir[I];
Inc(Stats_CustomVars[I + 6]);
end;
ClearTPA;
DWriteLn('Resulted: ' + Result + '!');
end;
end;
2011-10-24 12:37:17
2011-10-24 12:49:00
From: Flight
How about… 'PercentBlackMM'.
2011-10-24 14:01:12
From: Wanted
The filterpointspie method is the same except for it scans different quadrants because the overall perctange of black MM is to similar amongst all the locations.
2011-10-24 21:32:40
From: Flight
That sounds really neat. Is your function already in the include? Also, the different quadrants you're referring to, is this within the game screen or just the MM? (I assume the MM split into 4 quadrants)