Jump to content
adrianhmartinez

colortolorance error unknown identifier

Recommended Posts

everytime i add color tolorance to my script it keeps giving error unknown identifier(colortolorance) [e:findcolortolorance,findbitmaptolorance] am i sopost to download extra things so it works? i keep having to stay with 1 color and having to get multiple color of the samething so it finds the color.

 

how would i go to add tolorance to the bitmap part of this script

 

Result := FindBitmap(x, y, Bmp, 89, 23, 548, 322)

to

Result := FindBitmaptolorance(x, y, Bmp, 89, 23, 548, 322) <- and im not sure where u add the tolorance...

 

 

const
MonsterColor = 65535; 
MonsterColor2 = 65535;
MonsterColor3 = 65535;
MonsterColor4 = 65535;
MonsterColor5 = 65535;
Mistake = 5583690; // not used
Hat = 6587027;
WaitTime = 1000;

var
x, y, c: Integer;
Bmp: TSCARBitmap;

procedure Setup;
begin
 Bmp := TSCARBitmap.Create('deNrjZuBgmD1jwtxZk+Bo2uRuZHTtygVk2XOnj' +
   'gHRiaMHJvS1wRHQhAtnT8LRsUN7gai7oxGOLl04A0GH9u5ARq3NNRB05uRRCNq' +
   '/eysyaqyrgKDjh/dD0J4dm5DR6qXzqyuKgAhu5o7Na+Fo8dzpQFRalJuXkwZRv' +
   '3XDKjhauWQuHKX5SwIAhGOsyQ==');
end;

function Searchforrandom: Boolean; // Search for monster to attk 
var  MonsterColors: TIntArray; 
begin  MonsterColors := [MonsterColor, MonsterColor2, MonsterColor3, MonsterColor4,
MonsterColor5];   
Result := FindColors(x, y, MonsterColors, 496, 13, 572, 31);   
if Result 
then  
begin    
Wait(WaitTime);      
Movemouse(x, y);      
ClickMouse(x, y, False);   
end; 
end; 

function SearchForbitmap: Boolean; 
begin
Result := FindBitmap(x, y, Bmp, 89, 23, 548, 322)
if Result 
then 
begin 
MoveMouse(x, y);
clickmouse(x, y, false); 
wait(1000);
end; 
Bmp.Free;
end;

Begin 
repeat
 c:=c+1;
(Setup); 
Wait(WaitTime +300);
(Searchforrandom)
Wait(WaitTime);
(SearchForbitmap);

until(c>=999999999)
end.

Link to comment
Share on other sites

yea but when i put that FindBitmapTolerance(x, y, Bmp, 89, 23, 548, 322, 15) it says unknown identifier "FindBitmapTolerance". thats the problem

 

yea i kind of misspelled it in the title and everything on the post but i was actualy puting Tolerance.

Edited by adrianhmartinez
Link to comment
Share on other sites

Oh, right.. You are using SCAR Divi 3.35+... Of course, sorry.. My bad. :P

 

In 3.35+ it is FindBitmapTol()

 

Note: Type "FindBitmap" in SCAR Divi's script editor area and hit CTRL + SPACE, that will pop up you the list of bitmap finding functions.

 

You can do this same action for any sort of functions/procedures/constants/variables you are after.. Simply type something of the name and then press CTRL + SPACE.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...