Floor66
02-29-2008, 10:47 AM
Please rate it 1/10 for 2nd function ever
This is my 2nd function.
Its an alternative to FindSymbol.
Plz dont be too hard on me :)
I wont add AntiRandom, seen i'd use it as walking.
If you want it, just add it urself. Without declareplayers, the randoms wont work, thats why i dont use it atm.
If you want them, you need multiplayer, cuz u need a Nick for it.
I commented the randoms.
If you use it (what i -imo- not think :P) please CREDIT!
The function:
UPDATED!
{************************************************* ******************************
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
Author : Floor66
Description : Custom Symbol finder, uses DTMs and toleranced colors.
HowTo : Set color and tol. True for click, False for no click.
You can also set the amount of randomness when clicking.
___________________________
------------------------------------>>>>>>> Created & Tested by Floor66
************************************************** *****************************}
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
var U, X, Y, C, SymbolDTM : Integer;
begin
begin
SymbolDTM := DTMFromString('78DA63EC606260706740012AFE8F18FE036 94' +
'620FE0F048C7D4035CEA86A18191919B8A06AC0FC16A01A47 026A' +
'1A31EDC250D30654E347400DC83DDE04D4F403D5B8E157030 0CA5' +
'E0C6A');
end;
MarkTime(U);
if (DTMRotated(SymbolDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
C := GetColor(x, y);
if (SimilarColors(C, Color, Tol)) then
begin
if (Click = True) then
begin
// FindNormalRandoms;
Mouse(x, y, Rand, Rand, True);
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end else
begin
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end;
end;
end;
FreeDTM(SymbolDTM);
end;
{************************************************* ******************************
^^©Floor 66^^
************************************************** *****************************}
Here its used: (just made these consts for handy-ness)
program SymbolCustom;
{.include srl\srl.scar}
const
SColor = 2893864; //Symbol Color
STol = 25;//Symbol tolerance (15~25 advised)
Rndm = 5;//Amount of randomness if clicking
Speed = 16;//Mouse speed
Yes = False; //Use consts or fill color, tol in at mainloop!
{************************************************* ******************************
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
Author : Floor66
Description : Custom Symbol finder, uses DTMs and toleranced colors.
HowTo : Set color and tol. True for click, False for no click.
You can also set the amount of randomness when clicking.
___________________________
------------------------------------>>>>>>> Created & Tested by Floor66
************************************************** *****************************}
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
var U, X, Y, C, SymbolDTM : Integer;
begin
begin
SymbolDTM := DTMFromString('78DA63EC606260706740012AFE8F18FE036 94' +
'620FE0F048C7D4035CEA86A18191919B8A06AC0FC16A01A47 026A' +
'1A31EDC250D30654E347400DC83DDE04D4F403D5B8E157030 0CA5' +
'E0C6A');
end;
MarkTime(U);
if (DTMRotated(SymbolDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
C := GetColor(x, y);
if (SimilarColors(C, Color, Tol)) then
begin
if (Click = True) then
begin
// FindNormalRandoms;
Mouse(x, y, Rand, Rand, True);
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end else
begin
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end;
end;
end;
FreeDTM(SymbolDTM);
end;
{************************************************* ******************************
^^©Floor 66^^
************************************************** *****************************}
begin
SetUpSRL;
MouseSpeed := Speed;
ActivateClient;
if (Yes = True) then
begin
FindDTMSymbol(SColor, STol, Rndm, False);
end else
FindDTMSymbol(16016699, 25, 5, False);
end.
Please give Positive Criticism.
But not too much .. i am so proud :)
--
Offtopic:
I wanna learn arrays, like u can put 3 colors, and just 1 var to call em all..
This is my 2nd function.
Its an alternative to FindSymbol.
Plz dont be too hard on me :)
I wont add AntiRandom, seen i'd use it as walking.
If you want it, just add it urself. Without declareplayers, the randoms wont work, thats why i dont use it atm.
If you want them, you need multiplayer, cuz u need a Nick for it.
I commented the randoms.
If you use it (what i -imo- not think :P) please CREDIT!
The function:
UPDATED!
{************************************************* ******************************
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
Author : Floor66
Description : Custom Symbol finder, uses DTMs and toleranced colors.
HowTo : Set color and tol. True for click, False for no click.
You can also set the amount of randomness when clicking.
___________________________
------------------------------------>>>>>>> Created & Tested by Floor66
************************************************** *****************************}
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
var U, X, Y, C, SymbolDTM : Integer;
begin
begin
SymbolDTM := DTMFromString('78DA63EC606260706740012AFE8F18FE036 94' +
'620FE0F048C7D4035CEA86A18191919B8A06AC0FC16A01A47 026A' +
'1A31EDC250D30654E347400DC83DDE04D4F403D5B8E157030 0CA5' +
'E0C6A');
end;
MarkTime(U);
if (DTMRotated(SymbolDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
C := GetColor(x, y);
if (SimilarColors(C, Color, Tol)) then
begin
if (Click = True) then
begin
// FindNormalRandoms;
Mouse(x, y, Rand, Rand, True);
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end else
begin
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end;
end;
end;
FreeDTM(SymbolDTM);
end;
{************************************************* ******************************
^^©Floor 66^^
************************************************** *****************************}
Here its used: (just made these consts for handy-ness)
program SymbolCustom;
{.include srl\srl.scar}
const
SColor = 2893864; //Symbol Color
STol = 25;//Symbol tolerance (15~25 advised)
Rndm = 5;//Amount of randomness if clicking
Speed = 16;//Mouse speed
Yes = False; //Use consts or fill color, tol in at mainloop!
{************************************************* ******************************
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
Author : Floor66
Description : Custom Symbol finder, uses DTMs and toleranced colors.
HowTo : Set color and tol. True for click, False for no click.
You can also set the amount of randomness when clicking.
___________________________
------------------------------------>>>>>>> Created & Tested by Floor66
************************************************** *****************************}
function FindDTMSymbol(Color, Tol, Rand : Integer; Click : Boolean): Boolean;
var U, X, Y, C, SymbolDTM : Integer;
begin
begin
SymbolDTM := DTMFromString('78DA63EC606260706740012AFE8F18FE036 94' +
'620FE0F048C7D4035CEA86A18191919B8A06AC0FC16A01A47 026A' +
'1A31EDC250D30654E347400DC83DDE04D4F403D5B8E157030 0CA5' +
'E0C6A');
end;
MarkTime(U);
if (DTMRotated(SymbolDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
C := GetColor(x, y);
if (SimilarColors(C, Color, Tol)) then
begin
if (Click = True) then
begin
// FindNormalRandoms;
Mouse(x, y, Rand, Rand, True);
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end else
begin
Writeln('Found Symbol');
Result := True;
Writeln('Took : '+IntToStr(TimeFromMark(U))+' msec');
Writeln('Symbol is located at : '+IntToStr(X)+', '+IntToStr(Y)+'.');
end;
end;
end;
FreeDTM(SymbolDTM);
end;
{************************************************* ******************************
^^©Floor 66^^
************************************************** *****************************}
begin
SetUpSRL;
MouseSpeed := Speed;
ActivateClient;
if (Yes = True) then
begin
FindDTMSymbol(SColor, STol, Rndm, False);
end else
FindDTMSymbol(16016699, 25, 5, False);
end.
Please give Positive Criticism.
But not too much .. i am so proud :)
--
Offtopic:
I wanna learn arrays, like u can put 3 colors, and just 1 var to call em all..