Run a php function if a predefined page is visited

Have a look at the is_page() conditional tag and at conditional tags in general.

is_page() takes both post IDs as well as slugs (and more) as arguments, hence you can choose how you’d like to identify the page in question.

With the above given ID, this, for instance, ought to work:

if( function_exists('cp_alterPoints') && is_page(24122) ){
    cp_alterPoints(cp_currentUser(), 1000);
}