You need to be more concrete regarding what exactly you need help. I.e, which parts of the code do you not understand and what specifically are you unclear in how to go about?
As for making a script written for Inquisit 5 compatible with Inquisit 4, you need to strip out all Inquisit 5 specific syntax features and replace them with Inquisit 4-compatible equivalents, as far as any exist. For starters, you should open the script in Inquisit 4 Lab, parse it, and then work through the errors one by one. Sometimes it will be easier to just do things from scratch, especially if any existing script (be it for Inquisit 5 or Inquisit 4) only vaguely resembles what you wish to do.
As for adding or subtracting points based on correctness, this can be done using <values> and /ontrialend logic as usual.