Not exactly sure what you're asking. In IL, you can write prescriptions as an intern with a temp (trainee) license. Caveat: for narcotics, your institution needs to provide you with a trainee DEA....some hospitals do (mine did) but some do not. Depends on hospital policy. HOWEVER, your prescriptions are supposed to be restricted to those done related to your institution (without a permanent license, it's unlikely that you encounter a scenario outside of your training program as you cannot moonlight with a trainee license).
If you were asking about self-prescribing, you can technically self-prescribe in Illinois with a trainee license as long as it's not a narcotic or other scheduled medication (can't do this with a permanent license either). Ethically, this is a subject of debate, but it is legal.
Be aware that self-prescribing certain medications can result in further investigation of your prescribing habits. For that matter, anything you prescribe can be tracked and investigated....certain patterns, meds or quantities will draw more scrutiny and increase this likelihood.