Ahh I found it.
R_ClickItem
I've been going through the includes for that past 30 minutes..
Simba Code:
Procedure eat;
var
currentHealth, i: integer;
inv: TInvItem;
Begin
currentHealth := StrToInt(GetInterfaceText(748, 8));
if (currentHealth < Players[0].Integers[5]) then
if(R_ItemExists(Food_To_Eat, inv)) then
begin
writeln('We have FOOD!');
R_ClickItem(i, true, 'at')
end;
End;
This doesn't work, what is the problem here?
Edit: I found the problem. I was thinking like I still had the loop there. Thanks!