It definitely won't be. First, Pokemon are encrypted using a value that depends on your trainer ID, so while you might be able to write a Pokemon with a specific OT, you'd never get to write a Pokemon that belongs to the current trainer. Second, you can't write to the PC since that exists in the saveblock which moves around (DMA). writebytetooffset requires a static address.
You'd need ASM. Something like this
exists for FireRed, and it shouldn't be hard to port it to Emerald.