A very interesting find! ^_^ I just had a look at InvMouse, and I believe that it is because it uses MouseBoxEx? This was probably for SRL4 because MouseBoxEx looks like it tries to aim for the centre...That would be the only change I'm guessing:
Simba Code:
function InvMouse(InvSlot, Action: Byte) : boolean;
var
TB: TBox;
CurrPT : TPoint;
begin
result := false;
if (not InRange(Action, 0, 3)) then
begin
srl_Warn('InvMouse', 'Action #' + IntToStr(Action) + ' is not a valid action', warn_AllVersions);
Exit;
end;
if (not InRange(InvSlot, 1, 28)) then
begin
srl_Warn('InvMouse', 'Inventory slot #' + IntToStr(InvSlot) + ' is not a valid slot', warn_AllVersions);
Exit;
end;
GameTab(tab_inv);
Result := true;
TB := InvBox(InvSlot);
GetMousePos(CurrPT.x,CurrPT.y);
if PointInBox(CurrPT,TB) then
MouseBox(Max(CurrPT.x-random(2),TB.x1),Max(CurrPT.y-random(2),TB.y1),
Min(CurrPT.x+random(2),TB.x2),Min(CurrPT.y+random(2),TB.y2),Action) //LOL Pro-human much!
else
MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, Action);
end;
EDIT: also as stated above ^, why are the second pair of co-ordinates to high!! O_o
InvBox:
Simba Code:
Slot6 := IntToBox(605, 249, 31415, 92653);
EDIT2: [offtopic]
There is no difference between MouseItem and InvMouse? :S Shouldn't we remove one?
Simba Code:
procedure MouseItem(I: Integer; button: Integer);
begin
InvMouse(i, button);
end;
[/offtopic]