Here is the script:
Spoiler
Begin Uvi_Tower_ClosetCheck
Short Check
Short Count
Short Done
;Uvi_CoverCheck is a global variable that tracks what item the npc wants to get from the container. Negative number means it's being checked. Positive number means it's confirmed present in the container.
;Uvi_Cover is a global variable that tracks what item is supposed to be already outside the container.
If ( Done == 1 )
If ( Uvi_CoverCheck &--#62; 0 )
StartScript Uvi_Tower_ChangeBed ;this script handles the actual adding/removal of items from the container
Endif
Set Check to 0
Set Count to 0
StopScript Uvi_Tower_ClosetCheck
Return
Endif
If ( Uvi_CoverCheck == -1 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d01 &--#62; 0 ) ;has the item
Set servant_meiree.ClosetCheck to 1 ;one or the other of these npcs is disabled at a time, so the disabled one sets this variable back to 0 before it executes
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 1
Set Done to 1
Return
Else ;the item is missing
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -2 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 2
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -3 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 3
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -4 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 4
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -5 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d05 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 5
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -6 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d06 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 6
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -7 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d07 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 7
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -8 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d08 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 8
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -9 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d09 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 9
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -10 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d10 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 10
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Endif
Elseif ( Uvi_CoverCheck == -11 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 11
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -12 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 12
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -13 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 13
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -14 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 14
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -15 ) ;the npc is asked to grab a random item from the container and replace the one on display.
If ( Check == 0 )
Set Check to ( Random 14 )
Set Check to ( Check + 1 )
Return
Elseif ( Check == 1 )
If ( Uvi_Cover == 1 ) ;this item is already on display. Move to the next one on the list.
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 1
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 2 )
If ( Uvi_Cover == 2 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 2
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 3 )
If ( Uvi_Cover == 3 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 3
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 4 )
If ( Uvi_Cover == 4 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 4
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 5 )
If ( Uvi_Cover == 5 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d05 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 5
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 6 )
If ( Uvi_Cover == 6 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d06 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 6
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 7 )
If ( Uvi_Cover == 7 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d07 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 7
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 8 )
If ( Uvi_Cover == 8 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d08 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 8
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 9 )
If ( Uvi_Cover == 9 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d09 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 9
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 10 )
If ( Uvi_Cover == 10 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d10 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 10
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 11 )
If ( Uvi_Cover == 11 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 11
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 12 )
If ( Uvi_Cover == 12 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 12
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 13 )
If ( Uvi_Cover == 13 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 13
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 14 )
If ( Uvi_Cover == 14 )
Set Check to + 1
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 14
Set Done to 1
Return
Elseif ( Count &--#60; 14 ) ;last item on this list. If all items have not been checked, bump script back to beginning for one more run though. ( &--#62;= 14 ) means all 14 items are missing, so script continues to the end.
Set Check to 1
Set Count to ( Count + 1 )
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Endif
Endif
End
Short Check
Short Count
Short Done
;Uvi_CoverCheck is a global variable that tracks what item the npc wants to get from the container. Negative number means it's being checked. Positive number means it's confirmed present in the container.
;Uvi_Cover is a global variable that tracks what item is supposed to be already outside the container.
If ( Done == 1 )
If ( Uvi_CoverCheck &--#62; 0 )
StartScript Uvi_Tower_ChangeBed ;this script handles the actual adding/removal of items from the container
Endif
Set Check to 0
Set Count to 0
StopScript Uvi_Tower_ClosetCheck
Return
Endif
If ( Uvi_CoverCheck == -1 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d01 &--#62; 0 ) ;has the item
Set servant_meiree.ClosetCheck to 1 ;one or the other of these npcs is disabled at a time, so the disabled one sets this variable back to 0 before it executes
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 1
Set Done to 1
Return
Else ;the item is missing
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -2 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 2
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -3 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 3
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -4 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 4
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -5 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d05 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 5
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -6 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d06 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 6
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -7 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d07 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 7
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -8 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d08 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 8
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -9 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d09 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 9
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -10 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d10 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 10
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Endif
Elseif ( Uvi_CoverCheck == -11 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 11
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -12 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 12
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -13 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 13
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -14 )
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 14
Set Done to 1
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Elseif ( Uvi_CoverCheck == -15 ) ;the npc is asked to grab a random item from the container and replace the one on display.
If ( Check == 0 )
Set Check to ( Random 14 )
Set Check to ( Check + 1 )
Return
Elseif ( Check == 1 )
If ( Uvi_Cover == 1 ) ;this item is already on display. Move to the next one on the list.
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 1
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 2 )
If ( Uvi_Cover == 2 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 2
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 3 )
If ( Uvi_Cover == 3 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 3
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 4 )
If ( Uvi_Cover == 4 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 4
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 5 )
If ( Uvi_Cover == 5 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d05 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 5
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 6 )
If ( Uvi_Cover == 6 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d06 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 6
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 7 )
If ( Uvi_Cover == 7 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d07 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 7
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 8 )
If ( Uvi_Cover == 8 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d08 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 8
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 9 )
If ( Uvi_Cover == 9 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d09 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 9
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 10 )
If ( Uvi_Cover == 10 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_d10 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 10
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 11 )
If ( Uvi_Cover == 11 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr01 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 11
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 12 )
If ( Uvi_Cover == 12 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr02 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 12
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 13 )
If ( Uvi_Cover == 13 )
Set Check to ( Check + 1 )
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr03 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 13
Set Done to 1
Return
Else
Set Check to ( Check + 1 )
Set Count to ( Count + 1 )
Return
Endif
Elseif ( Check == 14 )
If ( Uvi_Cover == 14 )
Set Check to + 1
Return
Endif
If ( uvi_closet_linen-&--#62;GetItemCount uvi_bedcover_folded_dr04 &--#62; 0 )
Set servant_meiree.ClosetCheck to 1
Set servant_meiree_sweeper.ClosetCheck to 1
Set Uvi_CoverCheck to 14
Set Done to 1
Return
Elseif ( Count &--#60; 14 ) ;last item on this list. If all items have not been checked, bump script back to beginning for one more run though. ( &--#62;= 14 ) means all 14 items are missing, so script continues to the end.
Set Check to 1
Set Count to ( Count + 1 )
Return
Else
Set servant_meiree.ClosetCheck to -1
Set servant_meiree_sweeper.ClosetCheck to -1
Set Done to 1
Return
Endif
Endif
Endif
End