Sequence Posted May 14, 2012 Share Posted May 14, 2012 (edited) I've just begun scripting with SCAR and I decided to create some scripts for a private server, just to get some basic knowledge but I've ran in to a problem involving ColorToleranceSpeed and SetColorSpeed2Modifiers. (There's probably a smarter way to find trees, but I'm just a newbie) I used the program ACA to find colors, tolerance, hue and sat. Here's my code (I've just started so I'm not very far): [scar]program PwnXileMagicChopper; Var x, y : Integer; procedure PwnXile; begin FindWindowTitlePart('PwnXileHD', true); ActivateClient; end; procedure ChopLogs; begin ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.12, 0.40); begin If FindColorSpiralTolerance(x, y, 3099987, 0, 0, 516, 336, 5) Then MoveWindMouse(x, y, 0, 0); ClickMouse(x, y, true); end; end; begin PwnXile; Wait(500); ChopLogs; end.[/scar] My problem is, that it's not moving the mouse to the trunk, but on top of the tree instead and half of the times it wont be hitting the tree. Am I doing something wrong? Also is there anyway to check if inventory is full without using OSI since it's a private server. Any help is appreciated ! Edited May 14, 2012 by Sequence Quote Link to comment Share on other sites More sharing options...
Wanted Posted May 14, 2012 Share Posted May 14, 2012 Use FindColorsTolerance to generate a TPA, ATPA := TPAToATPA(30, 30); , SortATPAByMiddleEx(ATPA, Point(MSCX, MSCY)) , for I := 0 to H do begin P := MiddleTPA(ATPA) MMouse(P.X, P.Y...) if IsUpTextMulti (or use countcolor of the blue text) then GetMousePos(P.X, P.Y)... Mouse(P.X, P.Y, 0, 0, True) Exit; Pretty blunt but you should be able to figure it out, if not wait for a tutorial to come out. I'll have some out eventually... Quote Link to comment Share on other sites More sharing options...
Sequence Posted May 14, 2012 Author Share Posted May 14, 2012 Use FindColorsTolerance to generate a TPA, ATPA := TPAToATPA(30, 30); , SortATPAByMiddleEx(ATPA, Point(MSCX, MSCY)) , for I := 0 to H do begin P := MiddleTPA(ATPA) MMouse(P.X, P.Y...) if IsUpTextMulti (or use countcolor of the blue text) then GetMousePos(P.X, P.Y)... Mouse(P.X, P.Y, 0, 0, True) Exit; Pretty blunt but you should be able to figure it out, if not wait for a tutorial to come out. I'll have some out eventually... Thank you I'll try to figure it out Quote Link to comment Share on other sites More sharing options...