Shargast_PRC8/_module/Chapter 2/nss/cnr_at_cowchic_f.nss
Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

35 lines
813 B
Plaintext

/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR) by Festyx
//
// Name: cnr_at_cowchic_f
//
// Desc: The player has requested some of the animals
// food.
//
// Author: David Bobeck 24Dec02
//
/////////////////////////////////////////////////////////
void main()
{
string sAnimalTag = GetTag(OBJECT_SELF);
object oPC = GetPCSpeaker();
if (sAnimalTag == "cnrChicken")
{
// produce an egg
string sItemTag = "cnrChickenEgg";
CreateItemOnObject(sItemTag, oPC, 1);
}
if (sAnimalTag == "cnrCow")
{
// produce milk
string sItemTag = "cnrCowsMilk";
CreateItemOnObject(sItemTag, oPC, 1);
}
int nFoodPoints = GetLocalInt(OBJECT_SELF, "nCnrFoodPoints");
SetLocalInt(OBJECT_SELF, "nCnrFoodPoints", nFoodPoints-6);
}