void main() { object oItem = GetFirstItemInInventory(OBJECT_SELF); while (oItem != OBJECT_INVALID) { SpeakString("ResRef for " + GetName(oItem) + " is:" + GetResRef(oItem)); oItem = GetNextItemInInventory(OBJECT_SELF); } }