Actually D8CF is for RB... D7CF is for Yellow. It's not the code that is the problem, just the execution.
What you need to do (the easiest way, anyway) is wait until the Pokemon has appeared, then turn the GS on. Then go ahead and throw the master ball, or whatever you need to do to catch it.