Alright, so I've updated this. Basically I looked up the vBulletin 4 hashing algorithm:
PHP Code:
md5(md5($password) . $salt)
And I have my script hash the password that is inputted in the vBulletin format. Then it compares it against the database to see if the hashes match. If they match, it returns an error, telling them they can't have the same password. If they don't match, it then hashes their password in the APR1 format and saves it to the .htpasswd file.
The changes I've made are for hash.php and config.ini.php