Your code example is not readable. But same answer as with the statistics functions recently: Build your own custom function by either copying, renaming and modifying the original or use the "get" versions to build a complete custom one.
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImages