adrianhmartinez Posted April 17, 2013 Share Posted April 17, 2013 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. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted April 17, 2013 Share Posted April 17, 2013 It's FindBitmapTolerance, not FindBitmapTolorance. Tolerance is the last parameter for the function. FindBitmapTolerance(x, y, Bmp, 89, 23, 548, 322, 15) Value 15 is tolerance. Quote Link to comment Share on other sites More sharing options...
adrianhmartinez Posted April 18, 2013 Author Share Posted April 18, 2013 (edited) 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 April 18, 2013 by adrianhmartinez Quote Link to comment Share on other sites More sharing options...
Janilabo Posted April 18, 2013 Share Posted April 18, 2013 Oh, right.. You are using SCAR Divi 3.35+... Of course, sorry.. My bad. 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. Quote Link to comment Share on other sites More sharing options...
adrianhmartinez Posted April 18, 2013 Author Share Posted April 18, 2013 ok yes now it works thanks Quote Link to comment Share on other sites More sharing options...