I assume you want to apply this effect onto an NPC.
Because the OAMs are overwritten every frame you have to modify the earlier, so that the pokemon engine copies the usual data with your modifications over the current OAMs. And those are the oam_thingies as described at: http://www.pokecommunity.com/showthread.php?t=238937
The base offset for the oam_thingie array is there. The size too. The index is in the associated npc_state.
Because the OAMs are overwritten every frame you have to modify the earlier, so that the pokemon engine copies the usual data with your modifications over the current OAMs. And those are the oam_thingies as described at: http://www.pokecommunity.com/showthread.php?t=238937
The base offset for the oam_thingie array is there. The size too. The index is in the associated npc_state.