Initial commit
Initial commit.
This commit is contained in:
30
_module/nss/cook_meat.nss
Normal file
30
_module/nss/cook_meat.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user