Initial commit
Initial commit.
This commit is contained in:
36
_module/nss/use_drink_d.nss
Normal file
36
_module/nss/use_drink_d.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
int iDrank = GetLocalInt(oPC,"drank");
|
||||
string sName = GetName(OBJECT_SELF);
|
||||
int iGood = d20(1);
|
||||
|
||||
if (iDrank == 1)
|
||||
{
|
||||
SendMessageToPC(oPC,"Although you are not thirsty, you take a drink from the "+sName);
|
||||
SendMessageToPC(oPC,"The water from the "+sName+" is very unappealing.");
|
||||
|
||||
if (iGood >=16)
|
||||
{
|
||||
effect eEffect = EffectDisease(DISEASE_MUMMY_ROT);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eEffect,oPC);
|
||||
SendMessageToPC(oPC,"You are sick. The water you drank isn't safe.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You take a drink from the "+sName+" and it tastes bad.");
|
||||
SetLocalInt(oPC,"drank",1);
|
||||
|
||||
|
||||
if (iGood >=16)
|
||||
{
|
||||
effect eEffect = EffectDisease(DISEASE_MUMMY_ROT);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eEffect,oPC);
|
||||
SendMessageToPC(oPC,"You are sick. The water you drank isn't safe.");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user