SRL Archive - General Botting Help

findcolor method?


petergrayson14

2014-06-07 15:10:35

Hi, im learning this shiz so im in need of spoon feeding a little.

Could anyone tell me the method used for findcolor? Im using this but it's wrong and im getting an error, thanks~

findcolor(5609639, 5, 5, MOUSE_RIGHT);

error,
Exception in Script: Don't know which overloaded method to call with params (Int32, Int32, Int32, Int32) at line 6, column 3

bonsai

2014-06-08 03:41:08

From: petergrayson14
Hi, im learning this shiz so im in need of spoon feeding a little.

Could anyone tell me the method used for findcolor? Im using this but it's wrong and im getting an error, thanks


There's two findcolor functions. One from the base simba, one from the SRL6 include. They don't take a mouse at the end like you did, they take the search area to try to find the color in. Simba takes x/y coordinates, SRL takes a box.

Simba (doc):

function FindColor(var x, y: Integer; col, x1, y1, x2, y2: Integer): Boolean;

SRL6 (doc):

function findColor(var x, y: integer; col: integer; searchBox: TBox): boolean; overload;

Example:

findcolor(foundX, foundY, 65200, mainscreen.getbounds());