the AI traffic system, and especially its route manager/autopilot are unfortunately implemented as "black boxes", so while implementing the scripting side is really easy, what is needed for that to be possible is that the C++ exposes the relevant information either via some kind of dedicated Nasal API or via corresponding properties in the tree, so that the script can access that information.
Likewise, the transponder is easy, but making it play nicely with the rest of the hard-coded code does again require an interfacing mechanism, so that it doesn't pick a number that is already in use, but also so that the C++ code is aware of transponder numbers used by scripted ai traffic