For the rolling you could try to have a list that has the items in it, and each time it changes, remove the first item in the list and add it to the end.
For the giving of items you could make an I'd for the item and store the item given, the item shown, etc in a variable.