You don't need to capture the ID of register_plugin at all mate.
How I did my tests was I altered my create_bot to include the prototypes, and even the calling plugin doesn't capture the id of register_plugin, its done automactically through the native system.
That iPlugin, iNumParams prototypes are powerful enough to work out what plugin is calling it and with how many parameters