wyn10 Posted December 14, 2011 Share Posted December 14, 2011 (edited) Auto Color Aid (ACA) By: wyn10 Auto Color Aid (ACA) is known for getting selecting the best color out of an object. ACA is stored in OSI/Tools for anyone to use. Before opening ACA, you need to be logged into Rs with the object you are trying to find, and Alt+Printscreen shown here... Paste the image in Paint and save it as a 24-bit bitmap. Now the fun part. Open ACA, which is in Includes\OSI\Tools. You get something like this... What you want to do now is go into the client Menu on the top-left, and choose Load Bitmap. Select the image you saved earlier in paint. Here's a example of what it should look like...(I have cropped my image beforehand within paint, so it's easier to work with) Now on the bottom right, Under CTS, choose 2. As it's the most common/accurate. Now start clicking the image to gather color points of the Object; 6-7 should be plenty, make sure to follow the detail window near the center to know you're still within boundaries of your object you're trying to find. After choosing your points, make sure you delete your duplicates by right clicking your first number in the list on the right, and selecting Delete duplicates. In my example image I will be getting the chest using the Silver/White outline. When you select "Mark best color" and red is covering only what you want, you've found the right color. Here's my result for my example image. Notice red is only covering what I need. See 11119539 under Color and tolerences? That is the color we are gonna use. The tolerance of the color is shown on the bottom right, above CTS. A perfect example for object finding is under Includes\OSI\RS2\Extended\Object.scar named FindObjSize. Using FindObjSize we can find the color using the parameters.... FindObjSize(var X, Y: Integer; Color, Tol, Width, Height: Integer; UpText: TStringArray): Boolean; Utilzing these parameters (I hope you can play with them yourself) I find the object perfectly with FindObjSize(x, y, 11119539, 13, 32, 35, ['chest', 'hest']) I hope you learned on how to properly use ACA with this guide. Edited December 14, 2011 by wyn10 Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 15, 2011 Share Posted December 15, 2011 (edited) Nooo im sooo sorry i doubled posted on accident i swear on my life :'( Edited December 15, 2011 by BryceTheCoder Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 15, 2011 Share Posted December 15, 2011 ok soooo i think i am doing this right but not too sure.. Can u make sure i am? I have this code after finding the colors: ColorToleranceSpeed(7); SetColorSpeed2Modifiers(0.15, 0.79); if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then AM i correct or is this wrong? if its wrong can u help me out and give me the correct code please:/ Quote Link to comment Share on other sites More sharing options...
wyn10 Posted December 15, 2011 Author Share Posted December 15, 2011 (edited) ok soooo i think i am doing this right but not too sure.. Can u make sure i am? I have this code after finding the colors: ColorToleranceSpeed(7); SetColorSpeed2Modifiers(0.15, 0.79); if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then Image was here AM i correct or is this wrong? if its wrong can u help me out and give me the correct code please:/ Size of the object you are picking I would suggest the method I used as a example. As it shows you would use the color 3891320 with a tolerance of 7 with you're method. ColorToleranceSpeed(2); //If it's not found it will increase the tolerance by two, so don't make it extremely high or it's gonna pick up other objects. SetColorSpeed2Modifiers(0.15, 0.79); if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then //Change 2181720 to the number ACA put out...3891320, 7 is correct as it's the tolerance for the color. If you do use FindColors though make sure to add a uptext check so you know its clicking the right thing. Edited December 15, 2011 by wyn10 Quote Link to comment Share on other sites More sharing options...
Wanted Posted December 15, 2011 Share Posted December 15, 2011 You can use more colors on the object to get a more solid shade of the overall thing. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 15, 2011 Share Posted December 15, 2011 oook soo i did it again with different color codes of cource.. NOOWW this is my code: procedure FindNPC; var w, h: Integer; x, y: Integer; TPA: TPointArray; begin GetClientDimensions(w, h); Begin ColorToleranceSpeed(2); if FindColorsTolerance(TPA, 4220802, MSX1, MSY1, MSX2, MSY2, 8) then WriteLn('Found Chicken NPC: ' + IntToStr(x) + ', ' + IntToStr(y)); MMouse(x, y, 1, 1); Wait(100 + Random(200)); end; end; BUUUTT it will never find a chicken Quote Link to comment Share on other sites More sharing options...
Wanted Posted December 15, 2011 Share Posted December 15, 2011 You forgot SetColorspeed2Modifiers and FindColors a tad more complicated than using FindColor, your X and Y are just null variables never used. The TPA stores the point which you need TPA sorting and stuff for Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 15, 2011 Share Posted December 15, 2011 alriight sooo if my X and Y are nulled variables can u help me out and fix em sooo they work i guess:/ Here is my WHHOOLLEE code so nothign gets messed up: //SCRIPT CREATED BY: Bryce7 {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} {$DEFINE SMART} {.include OSI\OSI.scar} {.include OSI\RS2\Extended\Timing.scar} {.include OSI\RS2\Misc\Anti-Ban.scar} const version = '0.1';//Do NOT Touch yupp = 0;//Do NOT Touch var x, y: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure StartUp; begin WriteLn('--------------------------------------------------------------'); WriteLn(''); WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version); WriteLn(''); WriteLn('Always make sure you have the latest version:)'); WriteLn(''); WriteLn('--------------------------------------------------------------'); ClickCompass(True); Wait(200 + Random(500)); end; procedure RandomMice; var x, y: Integer; begin x := Random(400); Wait(250 + Random(150)); y := Random(300); Wait(50); MoveWindMouse(x, y, 25, 25); Wait(450 + Random(350)); WriteLn('ANTIBAN: Randomly moving mouse.'); end; procedure ClickIt; var x, y: Integer; begin if IsUpTextMulti(['Attack', 'Att','ack']) then SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); Wait(2300 + Random(2800)); if Random(3) = 0then begin RandomMice; Wait(35 + Random(100)); end; end; procedure FindNPC; var w, h: Integer; x, y: Integer; TPA: TPointArray; begin GetClientDimensions(w, h); Begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.14, 0.72); if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then WriteLn('Found Chicken NPC: ' + IntToStr(x) + ', ' + IntToStr(y)); MMouse(x, y, 1, 1); Wait(100 + Random(200)); end; end; begin SetupOSI; repeat StartUp; FindNPC; ClickIt; until False; end. Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 15, 2011 Share Posted December 15, 2011 alriight sooo if my X and Y are nulled variables can u help me out and fix em sooo they work i guess:/ Here is my WHHOOLLEE code so nothign gets messed up: The TPA just holds the coordinate of every instance of the color it found. This will select a random point for you: //SCRIPT CREATED BY: Bryce7 {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} {$DEFINE SMART} {.include OSI\OSI.scar} {.include OSI\RS2\Extended\Timing.scar} {.include OSI\RS2\Misc\Anti-Ban.scar} const version = '0.1';//Do NOT Touch yupp = 0;//Do NOT Touch var x, y: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure StartUp; begin WriteLn('--------------------------------------------------------------'); WriteLn(''); WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version); WriteLn(''); WriteLn('Always make sure you have the latest version:)'); WriteLn(''); WriteLn('--------------------------------------------------------------'); ClickCompass(True); Wait(200 + Random(500)); end; procedure RandomMice; var x, y: Integer; begin x := Random(400); Wait(250 + Random(150)); y := Random(300); Wait(50); MoveWindMouse(x, y, 25, 25); Wait(450 + Random(350)); WriteLn('ANTIBAN: Randomly moving mouse.'); end; procedure ClickIt; var x, y: Integer; begin if IsUpTextMulti(['Attack', 'Att','ack']) then SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); Wait(2300 + Random(2800)); if Random(3) = 0then begin RandomMice; Wait(35 + Random(100)); end; end; procedure FindNPC; var w, h: Integer; p: TPoint; TPA: TPointArray; begin GetClientDimensions(w, h); begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.14, 0.72); if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then begin p := TPA[Random(Length(TPA))]; WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y)); end; MMouse(x, y, 1, 1); Wait(100 + Random(200)); end; end; begin SetupOSI; repeat StartUp; FindNPC; ClickIt; until False; end. Quote Link to comment Share on other sites More sharing options...
wyn10 Posted December 15, 2011 Author Share Posted December 15, 2011 (edited) The TPA just holds the coordinate of every instance of the color it found. This will select a random point for you: //SCRIPT CREATED BY: Bryce7 {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} {$DEFINE SMART} {.include OSI\OSI.scar} {.include OSI\RS2\Extended\Timing.scar} {.include OSI\RS2\Misc\Anti-Ban.scar} const version = '0.1';//Do NOT Touch yupp = 0;//Do NOT Touch var x, y: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure StartUp; begin WriteLn('--------------------------------------------------------------'); WriteLn(''); WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version); WriteLn(''); WriteLn('Always make sure you have the latest version:)'); WriteLn(''); WriteLn('--------------------------------------------------------------'); ClickCompass(True); Wait(200 + Random(500)); end; procedure RandomMice; var x, y: Integer; begin x := Random(400); Wait(250 + Random(150)); y := Random(300); Wait(50); MoveWindMouse(x, y, 25, 25); Wait(450 + Random(350)); WriteLn('ANTIBAN: Randomly moving mouse.'); end; procedure ClickIt; var x, y: Integer; begin if IsUpTextMulti(['Attack', 'Att','ack']) then SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); Wait(2300 + Random(2800)); if Random(3) = 0then begin RandomMice; Wait(35 + Random(100)); end; end; procedure FindNPC; var w, h: Integer; p: TPoint; TPA: TPointArray; begin GetClientDimensions(w, h); begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.14, 0.72); if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then begin p := TPA[Random(Length(TPA))]; WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y)); end; MMouse(x, y, 1, 1); Wait(100 + Random(200)); end; end; begin SetupOSI; repeat StartUp; FindNPC; ClickIt; until False; end. Normal GetMousePos works fine in smart. Also GetClientDimensions(w, h); isn't needed as you're already looking for the color in the MainScreen. Edited December 15, 2011 by wyn10 Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 16, 2011 Share Posted December 16, 2011 sweeeettt love ya freedy, wanted, and wyn10 <3 buuutt noww it perfectly sees the chickens and says its found chicken at (its X and its Y) buuutt does not click it now:'( annndd i have absolutely NOO clue y its not? sooo this is what im getting and it does not click the chcikens: Found Chicken NPC: 134, 331 Found Chicken NPC: 180, 210 ANTIBAN: Randomly moving mouse. Found Chicken NPC: 114, 326 AND HERE IS MY WHOLE SCRIPT CODE: //SCRIPT CREATED BY: Bryce7 {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} {$DEFINE SMART} {.include OSI\OSI.scar} {.include OSI\RS2\Extended\Timing.scar} {.include OSI\RS2\Misc\Anti-Ban.scar} const version = '0.1';//Do NOT Touch var x, y, yupp: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure StartUp; begin if(yupp = 0) then begin WriteLn('--------------------------------------------------------------'); WriteLn(''); WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version); WriteLn(''); WriteLn('Always make sure you have the latest version:)'); WriteLn(''); WriteLn('--------------------------------------------------------------'); yupp:= 1; end; ClickCompass(True); Wait(200 + Random(500)); end; procedure RandomMice; var x, y: Integer; begin x := Random(400); Wait(250 + Random(150)); y := Random(300); Wait(50); MoveWindMouse(x, y, 25, 25); Wait(450 + Random(350)); WriteLn('ANTIBAN: Randomly moving mouse.'); end; procedure ClickIt; var x, y: Integer; begin if IsUpTextMulti(['Attack', 'Att','ack']) then SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); Wait(2300 + Random(2800)); if Random(3) = 0then begin RandomMice; Wait(35 + Random(100)); end; end; procedure FindNPC; var w, h: Integer; p: TPoint; TPA: TPointArray; begin GetClientDimensions(w, h); begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.14, 0.72); if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then begin p := TPA[Random(Length(TPA))]; WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y)); end; MMouse(x, y, 1, 1); Wait(100 + Random(200)); ClickIt; end; end; begin SetupOSI; repeat StartUp; FindNPC; //ClickIt; until False; end. Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 16, 2011 Share Posted December 16, 2011 //SCRIPT CREATED BY: Bryce7 {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} {$DEFINE SMART} {.include OSI\OSI.scar} {.include OSI\RS2\Extended\Timing.scar} {.include OSI\RS2\Misc\Anti-Ban.scar} const version = '0.1';//Do NOT Touch var x, y, yupp: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure StartUp; begin if(yupp = 0) then begin WriteLn('--------------------------------------------------------------'); WriteLn(''); WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version); WriteLn(''); WriteLn('Always make sure you have the latest version:)'); WriteLn(''); WriteLn('--------------------------------------------------------------'); yupp:= 1; end; ClickCompass(True); Wait(200 + Random(500)); end; procedure RandomMice; var x, y: Integer; begin x := Random(400); Wait(250 + Random(150)); y := Random(300); Wait(50); MoveWindMouse(x, y, 25, 25); Wait(450 + Random(350)); WriteLn('ANTIBAN: Randomly moving mouse.'); end; procedure ClickIt; var x, y: Integer; begin if IsUpTextMulti(['Attack', 'Att','ack']) then begin SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); Wait(2300 + Random(2800)); end; if Random(3) = 0 then begin RandomMice; Wait(35 + Random(100)); end; end; procedure FindNPC; var w, h: Integer; p: TPoint; TPA: TPointArray; begin GetClientDimensions(w, h); begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.14, 0.72); if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then begin p := TPA[Random(Length(TPA))]; WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y)); MMouse(x, y, 0, 0); Wait(100 + Random(200)); ClickIt; end; end; end; begin SetupOSI; repeat StartUp; FindNPC; //ClickIt; until False; end. Please watch this while you're at it: Quote Link to comment Share on other sites More sharing options...
kyocera Posted December 16, 2011 Share Posted December 16, 2011 Sorry for being a noob I'll DL scar dumbbbb question Quote Link to comment Share on other sites More sharing options...
rsutton Posted December 16, 2011 Share Posted December 16, 2011 I really think that this program has alot more potentail for upgrading it than anyone thinks. Who made it on the forums? or was it even done by someone who plays runescape and we just jipped it ? Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted December 16, 2011 Share Posted December 16, 2011 ok thanks freddy, iknow how to indent and everything buutt it still wont click the chickens or move the mouse over them maayyybee something under the ClickIt procedure like: SmartGetMousePos(x, y); Mouse(x, y, 1, 1, True); because im thinking the X and Y are just set as 0 or something and the mouse stays at the at 0,0 not doing anything... Sooo is there a way to fix it and make the mouse go to the chickens coordinates and click it. please Quote Link to comment Share on other sites More sharing options...
nielsie95 Posted December 16, 2011 Share Posted December 16, 2011 Nice tutorial! I really think that this program has alot more potentail for upgrading it than anyone thinks. Who made it on the forums? or was it even done by someone who plays runescape and we just jipped it ? You can find more information here. Quote Link to comment Share on other sites More sharing options...
FHannes Posted December 16, 2011 Share Posted December 16, 2011 It was written by Nielsie95 ^ and Sumilion @ the SRL forums for SCAR. I started integrating the tool into SCAR 2 years ago, but I never finished, however, I picked up the development again a bit back, rewriting most from scratch to fit SCAR better, so with some luck you'll find most of the functionality in ACA in SCAR in the near future. Quote Link to comment Share on other sites More sharing options...