OK, it's working but it's ugly coding e.g. you could replace the 4 generation functions gen_south, gen_north... by four lines of code if you would rename your clone rooms like west_1 instead of west_A
<function name="gen" parameters="direction" type="object">
variable = GetRandomInt(1,14)
return (GetObject(direction + "_" + variable))
</function>
Then you only have to call gen("west") to clone one room. The going_xxx functions have nearly the same code so I think you could replace them by one function, too.
And instead of using rooms for cloning it should be possible to create them by script