SRL Archive - Reflection Development

R_clickitemID


JPHamlett

2009-07-25 02:36:41

I give credit to MouseitemId cause i only changed alittle bit




function R_ClickItemID(ID: integer): Boolean;
var
Inv, x, y, itemID, i: integer;
B: TBox;
begin
Inv := GetInterface(149, 0);
Result := False;
for i := 0 to 27 do
begin
itemID := SmartGetFieldArrayInt(Inv, InventoryItemIDs, i);
if (itemID > 0) and (itemID = ID) then
begin
B := InvBox(i+1);
MouseBox(B.x1, B.y1, B.x2, B.y2, 1);
end;
end;
SmartFreeObject(Inv);
end;
lll go into more detail later but i g2g

ZaSz

2009-07-25 02:39:10

I think the one in the includes better?

JPHamlett

2009-07-25 05:51:23

theres isnt on though all the ones in the includes u need an option for what it u jsut wanna click it

senrath

2009-07-25 06:30:19

FYI, this line:
      MouseBox(B.x1, B.y1, B.x2, B.y2, 3);
should be this:
      MouseBox(B.x1, B.y1, B.x2, B.y2, 1);
1 is left click, 3 just moves the mouse.

And you also might want to include credits, since this is just R_MouseItemID with a very small change.

JPHamlett

2009-07-25 06:33:16

omg thats why my procedure wasnt doing anything lol i had more in there i had it check the uptext and everything must have forgotten to change it lol and ok