I made a script that checks if the server is up and running. if not, it says that they are having issues. if it is running, then it checks for illegal pokemon, like how gamefreak does. It then waits for another player, and it starts the trade/battle depending on what variable 0x8005 is equal to. LOTS of math involved :)