I dont know about scripting
I dont know what's possible (or impossible)
I do know I have an idea though

animal companions are disabled due to balance issues, I'm not sure what the issues are exactly no-one has spelled them out anywhere that I've seen.
animal empathy is still available and implemented however.
would it be possible to use the animal empathy skill to acquire an animal companion from this realm ?
for example
druid walks out the front gate of melencia, uses animal empathy on a stag, then while the stag is dominated uses an item that makes the stag the animal companion for the druid (in an RP sense the item assists the druid in forming a bond with the creature, perhaps a food source ?)
may work for rangers as well.
would be a lot of fun to go and actually have to select and bond with the animal companion yourself instead of selecting the companion at level up or at character creation.