You need to use NWNX to do it, either the Letoscript or Exalt plugin.
Here's the Get/Set if you're using eXalt, with two other required functions:
[nwscript]
int NWNXFuncsZero (object oObject, string sFunc) {
SetLocalString(oObject, sFunc, " ");
return StringToInt(GetLocalString(oObject, sFunc));
}
int NWNXFuncsOne (object oObject, string sFunc, int nVal1) {
SetLocalString(oObject, sFunc, IntToString(nVal1) + " ");
return StringToInt(GetLocalString(oObject, sFunc));
}
int GetWizardSpecialization (object oCreature) {
return NWNXFuncsZero(oCreature, "NWNX!FUNCS!GETWIZARDSPECIALIZATION");
}
int SetWizardSpecialization (object oCreature, int nSchool) {
return NWNXFuncsOne(oCreature, "NWNX!FUNCS!SETWIZARDSPECIALIZATION", nSchool);
}
[/nwscript]
I'd offer up the letoscript version if I had it handy, but you can find it on the old forums - I've posted it numerous times there.
Funky