Looking to adapt "Diffuse Mapper" to work with VRay

I don't know how to script well.

Script is quite old but could do wonder if it was working with VRay mats (and other render engines)

http://www.scriptspot.com/3ds-max/scripts/diffusemapper