There are actually 2 separate encounters. Originally, in a vanilla BG1 game, there would be four women called Lamahla, Maneira, Telka and Zeela that confronted you in the area where you exited the Naskel Mines. This encounter was modified by SCS to occur later, and that one works fine, there are no problems there. When the encounter happens, all four are initially neutral, Lamahla approaches you, there is dialogue, then all four turn hostile.So, how does that modified encounter work? Elka and Natalka disappear from the area where they are initially spawned, together with the other girls, immediately, so that normal encounter does not take place.
Then, during chapter 3, what happens when the SCS encounter is triggered? who appears? Does anyone talk? Are the others already hostile when they appear? or what?
With NTotSC, two women called Elka and Natalka spawn according to the code I posted above. Elka and Natalka are initially neutral, and neither of them have dialogue. Thus, they never turn hostile unless you force-attack them. I don't know what NTotSC is trying to do here, it's almost like this was going to be a different encounter but the coding was never finished. Either this is supposed to be a new encounter with its own dialogue, or Elka and Natalka shouldn't spawn in this area at all and their code should be deleted because SCS has moved the encounter entirely (via separate scripting in baldur.bcs).
I don't know if this is because a lot of mods have tried to fix this quest or not, but I have five(!) different ankheg CRE files. I've got ANKHEG.cre, ANKHEG01.cre, ANKHEGG.cre, ANKHEGQ.cre, and TUANKHEG.cre. In this particular area, I killed none of the six on the surface, and all nine in the cave. All nine in the cave are of the TUANKHEG.cre variety, while all six on the surface (that I did not kill) are of the ANKHEGG.cre variety.If you have killed any ankheg elsewhere, they should be normal ankheg, and not ankhegg. Have you killed those on the surface or in the cave? could you attach ankhegg.cre and the .are file?
SPRITE_IS_DEADTUANKHEG is always set back to 0 in the end of the script, as it's used, if kivan or faldorn are in your party, to determine if they see you killing too many ankheg. In the end of the script, all ankhegg and tuankheg should be gradually 'changed' into normal ankheg, so that each 'special' ankheg is only counted once.
Your script should work correctly; perhaps, the ankheg in that area are wrong? Are you sure you checked the variable "SPRITE_IS_DEADANKHEGG", and not "SPRITE_IS_DEADANKHEG"?
What are the variables TuGerde and HelpGerde set to?
The variable "SPRITE_IS_DEADANKHEG" is at 15, but there is no variable called "SPRITE_IS_DEADANKHEGG". There is, however, a variable called "SPRITE_IS_DEADTUANKHEG" which is set to zero, as it apparently should be. There is no variable called "TuGerde", and "HelpGerde" is at zero.
I've attached the files (AR8301.are is the cave), but I think I've figured it out. The 9 in the cave should have been ANKHEGG.cre instead of TUANKHEG.cre. That would allow the script to run. Killing TUANKHEG.cre's effectively bypasses the script, meaning that "TuGerde" is never incremented.
EDIT: Apologies if this is the wrong place to post this, but since you seem to be fixing bugs for NTotSC, there's a very minor bug regarding the journal entry for the quest given by Wenric (farmer in the area north of the bridge to Baldur's Gate). The NTotSC v1.71 patch is erasing the wrong diary entry upon completion of the quest. Instead of erasing the initial entry regarding the quest (StrRef: 91973), it's erasing the completed quest entry (StrRef: 92442). Thanks for all the work you've done so far!