You can't read custom variables from moodle inside your scorm package without doing some custom development. Doing with SCORM would also be unwise because it uses basic javascript to read and set variables. If you made it possible for your scorm packages to write to this custom variable it would be easy for anyone to trigger their own javascript call and set the value to.... 1 million dollars....
I'd suggest you take a look through the Moodle plugins db for new activities that might help... and avoid using scorm completely.