If you learn well by example, take a look at scripts.bif -- it contains a good collection of script sources used by the game, including nwscript.nss which is the function decalaration script for swkotor.exe. For external resources, take a look at T7's sticky post -- he has a link to NWN Scripting Forum which contains numerous tutorials. Also of note is NWN Lexicon (
http://www.nwnlexicon.com) which a user's reference for scripting NWN. Not all the functions available to NWN are available to KotOR and vice versa, but it does give some extra commentary and information on data types that nwscript.nss doesn't provide.