Form[] kArmors = GetWornArmors(Game.GetPlayer()) Int iIndex = Utility.RandomInt(0, 31) ; ループの開始位置をランダムに決定 Int iMaxIndex = kArmors.Length ; ループの最大回数は配列の個数 Int iCount = 0 while iCount = iMaxIndex ; 配列の最後に達したら先頭に戻す iIndex = 0 endif endif endWhile