SRL Archive - Reflection Development

R_ItemIDExistAt


**BANNED The Man

2010-12-27 07:51:17

Just another little function I have had to make on my way :)
It will check if the Item ID is at the specified slot.
For example in my cooking script I wanted to check if there was still a sardine(example) at slot 28.

function R_IDExistsAT(ID, slot: Integer): Boolean;
var
Items: TInvItemArray;
begin
Result := (GetItemIDAt(slot) = (ID));
end;

Hope this helps :)
-Boom

Dgby714

2010-12-27 07:56:27

You dont need
Items: TInvItemArray;

**BANNED The Man

2010-12-27 08:01:59

From: Dgby714
You dont need
Items: TInvItemArray;


Oh yeah lol, forgot to take out, base was from CountID or something xD

-Boom

Frement

2010-12-27 08:02:44

function R_IDExistsAT(ID, slot: Integer): Boolean;
begin
Result := (GetItemIDAt(slot) = ID);
end;