This script is pretty outdated, and the use of a single log is ultimately useless, but you just call the function (assuming you joined the class to the player on login) that it provides to you like so:
PHP Code:
function onCreated() {
player.addExperience("Physical", 1000);
}