Initial commit

Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
Jaysyn904
2024-01-04 07:49:38 -05:00
parent df18cd54c8
commit 28cdb617b3
12943 changed files with 9727121 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR)
//
// Name: cnr_cowchic_oui
//
// Desc: This script notifies cows and chickens
// within a radius of 20 meters of dropped feed.
// This script should be executed from the
// module's OnUnAquireItem handler.
//
// Author: David Bobeck 24Dec02
//
/////////////////////////////////////////////////////////
void main()
{
object oItem = GetModuleItemLost();
int bAlertChickens = FALSE;
int bAlertCows = FALSE;
if (GetTag(oItem) == "cnrCornMeal")
{
bAlertChickens = TRUE;
bAlertCows = TRUE;
}
else if (GetTag(oItem) == "cnrCornRaw")
{
bAlertChickens = TRUE;
}
else if (GetTag(oItem) == "cnrBarleyRaw")
{
bAlertCows = TRUE;
}
else if (GetTag(oItem) == "cnrOatsRaw")
{
bAlertCows = TRUE;
}
else if (GetTag(oItem) == "cnrRyeRaw")
{
bAlertCows = TRUE;
}
else if (GetTag(oItem) == "cnrWheatRaw")
{
bAlertCows = TRUE;
}
if (bAlertChickens)
{
// find all chickens within 20 meters of the dropped food
object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 20.0, GetLocation(oItem), FALSE, OBJECT_TYPE_CREATURE);
while (oCreature != OBJECT_INVALID)
{
if (GetTag(oCreature) == "cnrChicken")
{
// alert the chicken that feed has been dropped near bye
event eUserDef = EventUserDefined(2701);
SignalEvent(oCreature, eUserDef);
}
oCreature = GetNextObjectInShape(SHAPE_SPHERE, 20.0, GetLocation(oItem), FALSE, OBJECT_TYPE_CREATURE);
}
}
if (bAlertCows)
{
// find all cows within 20 meters of the dropped food
object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, 20.0, GetLocation(oItem), FALSE, OBJECT_TYPE_CREATURE);
while (oCreature != OBJECT_INVALID)
{
if (GetTag(oCreature) == "cnrCow")
{
// alert the cows that feed has been dropped near bye
event eUserDef = EventUserDefined(2701);
SignalEvent(oCreature, eUserDef);
}
oCreature = GetNextObjectInShape(SHAPE_SPHERE, 20.0, GetLocation(oItem), FALSE, OBJECT_TYPE_CREATURE);
}
}
}