Script to make henchmen use Remove Disease

Hello!

I’m trying to complement a henchmen script, I’m trying by looking at the magic examples in the script. It is used through conversation:

“I want you to use Remove Disease.”
Text appears when…

    int StartingConditional()
{
    int iResult;

    iResult = GetHasFeat(FEAT_REMOVE_DISEASE, OBJECT_SELF);
    return iResult;
}

Actions Taken

    void main()
{
   {ActionUseFeat(FEAT_REMOVE_DISEASE, OBJECT_SELF);
   }

       {DecrementRemainingFeatUses(OBJECT_SELF, FEAT_REMOVE_DISEASE);
       }
}

“In who do you want to cast?”
Action taken

    // Generate custom toekns for multiple henchmen.

void main()
{
    object oPC = GetPCSpeaker();
    int i = 1;
    object oHench = GetHenchman(oPC, i);
    while(oHench != OBJECT_INVALID)
    {
        SetCustomToken(77100 + i, GetName(oHench));
        i++;
        oHench = GetHenchman(oPC, i);
    }
}

“In me”
Action taken

    // the henchman targets the PC with the spell

void main()
{
    SetLocalObject(OBJECT_SELF, "Henchman_Feat_Target", GetPCSpeaker());
}

“One moment.”
Action taken

    // Remove the flag for henchmen of casting a group of spells.

void main()
{
    SetLocalInt(OBJECT_SELF, "X2_HENCH_GROUP_CASTING", 0);
}

Well, I copied the other targets but just this doesn’t work anyway. What’s wrong? Can somebody help me out?

Thank you very much!

I managed to find the answers in a module, the creator put exactly what I needed. The module is Red Moon Rising.
https://neverwintervault.org/project/nwn1/module/red-moon-rising

If this is solved, it would be nice if you were to click the “Solution” button on the post where the solution is.

Thank you.

TR

Ok I will. I’m not used to using forums. I’m sorry.