I think you really need to learn some coding basics before you start doing these things. You cannot have two functions with the same name so you have to rename your duplicate.
You NEVER should modify core functions. That are all functions that belong to Zenphoto and are in the file in /zp-core. You can do that on your own risk of course. First, if you do that and you get problems you are on your own as we alway will refer to the original behaviour. Second, you will have to do this on every Zenphoto update. Similar of course for plugins.
So instead you copy the function in question, rename it (so printRandomImage() would be something like printMyRandomImages()), place it in your theme functions.php (or your own custom plugin) and modify it to your liking. Then you use that function on your theme instead the original. And yes of course you need to replace all usages if you want to use your own function. In any case you have to maintain your changes since things can change on updates, too.
Edit: Fretz was quicker and shorter ;-)