News:

Be sure to check out the compiled REVIEWS in the Module Review section, where we have added reviews both past and present.

Main Menu

Cure disease

Started by Andy123, July 22, 2023, 09:30:44 PM

Previous topic - Next topic

Randomdays

Andy - glad to hear you were able to get it work.

If you double check the cure disease spell, you see that it doesn't bother checking to see if you have the condition or not with a "If" line. You might be able to simplify the potion by just having it try to remove those conditions whether you have them or not. You would probably need to keep the "If" for the hitpoint check so you're not "Dead".

Andy123

Quote from: Nol Drek on July 29, 2023, 10:25:25 AMHave you tried this instead?
        $IF ($GET_CHARACTER_SA($CharacterContext(), "IsPoisoned") == "-?-?-" &&
        $GET_CHARACTER_SA($CharacterContext(), "IsDiseased") == "-?-?-" &&
        $GET_CHARACTER_SA($CharacterContext(), "IsDiseasedSpell") == "-?-?-")
            {$RETURN;};
        $IF ($GET_CHARACTER_SA($CharacterContext(), "IsPoisoned") != "-?-?-")
            {$DELETE_CHARACTER_SA($CharacterContext(),"IsPoisoned");};
        $IF ($GET_CHARACTER_SA($CharacterContext(), "IsDiseased") != "-?-?-")
            {$DELETE_CHARACTER_SA($CharacterContext(),"IsDiseased");};
        $IF ($GET_CHARACTER_SA($CharacterContext(), "IsDiseasedSpell") != "-?-?-")
            {$DELETE_CHARACTER_SA($CharacterContext(),"IsDiseasedSpell");};
        $IF ($GET_CHAR_HITPOINTS(char) <=# 0)
        {
                $SET_CHAR_HITPOINTS(char, "1");
                $SET_CHAR_STATUS(char, "0");
            };
       

That did the trick! Thank you.