Your script can be a lot simpler then the link you posted. You already know the level you want them to be (3) and that they will need and the amount of xp that they will need for that level (3000) . So just set it. Of cource a check to make sure you are not going to take any away would not hurt.
void main()
{
object oPC = GetPCSpeaker();
int xp = GetXP(oPC);
// check to make sure that you are not going to take XP away from the PC.
if (xp < 3000) SetXP(oPC,3000);
}