Neverwinter Nights and its sequel use a custom scripting language called NWScript. Why Bioware didn’t use something like Lua, I’m uncertain, but reinventing the wheel isn’t exactly a rarity in the software industry.
NWScript is very much like a cut down version of C. Unfortunately, it lacks arrays, or any form of list-like data structure. This makes designing complicated scripts in it rather trickier than it otherwise would be.
To this end, I’ve created nwn.ss, a PLT Scheme module for turning a custom S-Expression into valid NWScript.