MMD_PRC8/_module/nss/food_disease.nss
Jaysyn904 adeff59f82 Initial commit
Initial commit.
2024-08-02 23:18:00 -04:00

22 lines
670 B
Plaintext

void main()
{
object oPC = GetItemActivator();
string sName = GetName(GetItemActivated());
int iHungry = GetLocalInt(oPC,"ate");
if (iHungry <= 1)
{
effect eEffect = EffectDisease(DISEASE_CACKLE_FEVER);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect,oPC);
SetLocalInt(oPC,"ate",1);
FloatingTextStringOnCreature("You eat the "+ sName +" and feel very sick.",oPC,TRUE);
}
else if (iHungry == 1)
{
effect eEffect = EffectDisease(DISEASE_CACKLE_FEVER);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect,oPC);
FloatingTextStringOnCreature("You aren't hungry, but you eat the "+ sName +" and feel very ill.",oPC,TRUE);
}
}