When you change the value on source, you have to update your registry instead of the sd-> variable.
Example:
pc_setglobalreg(sd,script->add_variable("TRAINING_POINT"), sd->training_point + pontos);
This would update both the script var and your sd-> data.
Also, your atcommand has some issues:
1. sscanf
pontos = sscanf(message, "%12d", &pontos);
// should be
sscanf(message, "%12d", &pontos);
because sscanf will set values from string in the pointers passed by parameter. sscanf return is actually how many of these variables were filled (in this case it would always set "pontos" to 1 if you gave one number in the command). (Reference: http://www.cplusplus.com/reference/cstdio/sscanf/ )
2.
clif->message( fd, resultado + "/200"); // message - show points
C doesn't let you concat strings like that. You would need to use something like sprintf (Reference: http://www.cplusplus.com/reference/cstdio/sprintf/ ) to make a string to hold your value. Take a look on costume atcommand, it uses a safe version of sprintf. Something like: (untested)
// Where your str will be stored
char buffer [50];
// writes into buffer a string in the format %d/200, where %d is the value of "resultado"
sprintf (buffer, "%d/200", resultado);
// sends string to client
clif->message(fd, buffer);
-------
If you fix the pc_setregistry you'll be able to use your TRAINING_POINT in scripts like:
prontera,150,150,4 script TestGet 1_M_01,{
mes "Hi";
mes "> " + TRAINING_POINT;
close;
}
prontera,150,152,4 script TestSet 1_M_01,{
mes "Hi";
TRAINING_POINT++;
close;
}