This is something similar to MSTPoint/BankPoint/BankIndex conversions. I figure when we use TPA/DTM for items detection, there's no ready-to-use conversion from the found x,y to the correct inventory index to leverage MouseItem or other inv functions using an inventory index. I actually need this in my scripts quite often, so I think it might as well be a good idea to be added to the SRL includes as well.
Simba Code:function PointToInvIndex(p: TPoint): integer;
var i: integer;
begin
result:=0;
for i:=1 to 28 do
if PointInBox(p, InvBox(i)) then
begin
result:=i;
break;
end;
end;





Reply With Quote






