I am not certain I understand exactly what you are doing. It appears you have created a new greeting for Sacucius Ergalla through which all this magic is accomplished. The easiest way to make it do-once is to declare a global short variable (flag) to toggle. Add a dialog filter to the greeting that adds the disease that checks for Global: diseaseAdded = 0 (or whatever you name the variable). Have dialog results set diseaseAdded to 1 and you will never read that greeting again.
Your solution puts me in mind of a less invasive and more sure-handed approach by not depending upon the player to initiate dialog with Sacucius Ergalla a second time. Place a hidden activator anywhere in the cell with this script:
Begin PlayerDiseaseScriptshort doOnceif ( doOnce >= 1 ) returnendifif ( ( player->GetItemCount "chargen statssheet" ) >= 1 ) ; player has identification papers player->AddSpell "nox vomica" ; disease added set doOnce to 1 ; will not happen againendifEnd PlayerDiseaseScript
This will add the disease at the moment the player picks up the identification papers and only once. You can still have a special greeting for Sacucius Ergalla that comments on the player's health, but it will not actually add the spell. That same script can be used to have Sacucius Ergalla force greet the player (perhaps after a short timed delay so it is not immediately as the player takes the papers). Such a script might look like this:
Begin PlayerDiseaseScriptshort doOncefloat timerif ( doOnce >= 2 ) returnendifif ( menumode == 1 ) ; required for timer to work returnendifif ( doOnce == 0 ) if ( ( player->GetItemCount "chargen statssheet" ) >= 1 ) ; player has identification papers player->AddSpell "nox vomica" ; disease added set doOnce to 1 ; will not happen again endifelseif ( doOnce == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer < 0.5 ) ; short delay return endif set doOnce to 2 "chargen class"->ForceGreeting endifEnd PlayerDiseaseScript
I suggest you filter the new greeting for Item: chargen statssheet >= 1. This assures that greeting will not be available after the player has spoken with Sellus Gravius (since he removes the identification papers).
This puts me in mind of a different solution for your original problem (although it still requires that the player voluntarily speak with Sacucius Ergalla again). Filter the greeting that adds the disease for Item: chargen statssheet >= 1. This will assure that the greeting will not be available after the player speaks with the captain (assuming another mod does not mess things up by adding a second reference to the game of the identification papers).