One of the GetVarString or GetVarFixedString queries will probably do it.
You'd still need an event of some sort though because I don't think Osiris can react on a VarString being set. So just add in a globalflag or an object flag.
But Can you actually rename characters via story script? It wouldn't surprise me if you could I've just never tried.
Is there some particular reason you did the randomization in charscript? I think you'd be better off doing all of it in Osiris if you can. You can easily add the random names to a database, each with a number. Run a Random query to find the number to match the DB entries.