Jump to content
Sequence

Clicking tree help.

Recommended Posts

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.

PwffHj.jpg

 

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 :D!

PwffHj.jpg

Edited by Sequence
Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...