Inventory code?!

Hey, anyone know how to make an inventory in an RPG?

And please explain the code

Thanks.