Is there anyway to detect a color/bitmap/dtm/text, and saves the mouse's general location in an array after that detect. That saved data would be places to not look for the color/bitmap/dtm/text when initiating findcolor, etc.
Is this possible?
Is there anyway to detect a color/bitmap/dtm/text, and saves the mouse's general location in an array after that detect. That saved data would be places to not look for the color/bitmap/dtm/text when initiating findcolor, etc.
Is this possible?
Huh? Explain more clearly please.
Try the skipbox functions in srl.
~Hermen
erm, can't find it.
MrPickle, please explain more clearly :<. Then I can help you.
Well, if I understand what you are asking correctly, you would have to save all the bad points to an array like this (Some of the actual stuff in this code may be wrong, but the concept should work.):
SCAR Code:var
B: TBoxArray;
x,y: Integer;
begin
B[0].x1 := BadXPoint - 10;//these four lines create a 20 by 20 square
B[0].y1 := BadYPoint - 10;//around the bad point you do not want to
B[0].x2 := BadXPoint + 10;//search, the bad point being the center of
B[0].y2 := BadYPoint + 10;//the square
B[1].x1 := BadXPoint2 - 10; //same for another box.
B[1].y1 := BadYPoint2 - 10;
B[1].x2 := BadXPoint2 + 10;
B[1].y2 := BadYPoint2 + 10;
if(FindColorSkipBoxArray(x,y,color,MSX1,MSY1,MSX2,MSY2,B))then
//...whatever
end;
Make sense? So you create boxes around the bad points you find, and then FindColorSkipBoxArray does not search the TBox's in the array.
Hope this helps.
Last edited by JAD; 06-04-2009 at 05:47 AM.
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the area specified by the TBox, SkipBox.SCAR Code:function FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBox: TBox): Boolean;
If you'd be using a non-spiral findcolor function, the dot in the green area would be found first, but since it is in the green area which is the part where the skipbox overlaps the search area, it will ignore it, so the other dot will be found.
Works like the regular FindColorSkipBox function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.SCAR Code:function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBox: TBox): Boolean;
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the areas specified by the TBoxArray, SkipBoxes.SCAR Code:function FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBoxes: TBoxArray): Boolean;
Works like the regular FindColorSkipBoxArray function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.SCAR Code:function FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBoxes: TBoxArray): Boolean;
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the coordinates specified by SkipCoords.SCAR Code:function FindColorSkipCoords(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipCoords: TPointArray): Boolean;
Works like the regular FindColorSkipCoords function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.SCAR Code:function FindColorSkipCoordsTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipCoords: TPointArray): Boolean;
ah. this wasn't in the srl manual , but is what I am looking for =).
twas in the scar menual
press F1 when in scar to get to it
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
oh lolz. I looked at other manual xD
SRL Library Version 4
Manual .
if you cant find something in one manual then look in the other
if it is still not in there then make a function yourself
or ask
SRL manual is near enough all RS related stuff
SCAR manual is everything else
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
There are currently 1 users browsing this thread. (0 members and 1 guests)