How can i make a procedure that finds a dtm in Inv (i can do this Part) and nnce found it clicks it according to slot order( this i need help with)
How can i make a procedure that finds a dtm in Inv (i can do this Part) and nnce found it clicks it according to slot order( this i need help with)
What do you mean? Elaborate more. You want it to click the one closest to first slot or what?
Oh, by the way, don't use titles like this...
What do you mean?
Something like
?SCAR Code:Procedure ClickInvItem;
Begin
if findDtm(your dtm) then
begin
Mouse(x, y, 5, 5, true);
end;
end;
He said he knows how to find it.
And you don't need that begin and end as you only do one thing after it.
Da owner yes thats wat i meant
I believe that when you search for a DTM, it automatically picks the one that is closest to the top of the box picked (in this case, the inventory (MIX1, MIX2, etc.).
well, it doesnt or else i wouldnt be here
Okay then I shall test. Will edit in a second.
Tested. When I had a full inventory of willows and searched for a DTM, it then clicked the first one. Then I dropped that and it clicked the 5th one. I will make a function now.
SCAR Code:function FindDTMInInv(DTM : integer; var x, y : integer; x1, y1, x2, y2 : integer) : boolean;
var
i : integer;
Box : TBox;
begin
for i := 1 to 28 do
if ExistsItem(i) then
begin
Box := InvBox(i);
if FindDTM(DTM, x, y, Box.x1, Box.y1, Box.x2, Box.y2) then
begin
result := true;
exit;
end;
end;
end;
Last edited by Da 0wner; 05-17-2009 at 01:20 PM.
its just that simple wow im dum thanks for ur time
There are currently 1 users browsing this thread. (0 members and 1 guests)