That script is global, so you'll find it in scripts.bif (original source included). It has nothing to do with transitions though:
#include "k_inc_end"
void main()
{
SetTraskState(TRASK_NOTHING_02);
}
It just sets a global number:
void SetTraskState(int nValue)
{
// AurPostString("New State" + IntToString(nValue),5,7,2.0);
SetGlobalNumber("END_TRASK_DLG",nValue);
// AurPostString("Set: " + IntToString(nValue),5,10,3.0);
}
There are a few modules that utilise global scripts for things that really should be module-specific. Manaan is notorious for doing this.
I'd suggest permanently extracting scripts.bif somewhere so you don't need to use KTool. I'd also highly recommend installing Notepad++ along with JC's NWScript language definitions if you haven't already. It makes working with scripts much easier. With the global scripts extracted, you can try doing a Search in Files for examples of a particular function: