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

31 lines
759 B
Plaintext

void main()
{
object oFire =OBJECT_SELF;
object oRaw = GetItemPossessedBy(oFire,"rawmeat");
object oPC = GetLastClosedBy();
string sName = GetName(oPC);
int iGood = d20(1);
if (oRaw != OBJECT_INVALID && iGood <= 18)
{
CreateItemOnObject("food",oFire);
DestroyObject(oRaw,0.0f);
FloatingTextStringOnCreature(sName+" has cooked some meat.",oPC,TRUE);
}
if (oRaw != OBJECT_INVALID && iGood == 19)
{
CreateItemOnObject("food_disease",oFire);
DestroyObject(oRaw,0.0f);
FloatingTextStringOnCreature(sName+" has cooked some meat.",oPC,TRUE);
}
if (oRaw != OBJECT_INVALID && iGood == 20)
{
CreateItemOnObject("food_poison",oFire);
DestroyObject(oRaw,0.0f);
FloatingTextStringOnCreature(sName+" has cooked some meat.",oPC,TRUE);
}
}