31 lines
759 B
Plaintext
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);
|
||
|
}
|
||
|
|
||
|
}
|