You may want to reverse the order of looting to start with the last slot; otherwise you run the risk of the indices shifting as items move up to fill the slots already looted, and items getting skipped.
Code:
for i = GetNumLootItems(), 1, -1 do
LootSlot(i)
end