27 lines
891 B
Plaintext
27 lines
891 B
Plaintext
|
|
void main()
|
|
{
|
|
int vDestroy = TRUE;
|
|
object oItem = GetFirstItemInInventory(OBJECT_SELF);
|
|
if (GetIsObjectValid(oItem)) vDestroy=FALSE;
|
|
int vTREE = GetLocalInt(OBJECT_SELF,"ASG_TREEDEATH");
|
|
|
|
if (vDestroy==TRUE)
|
|
{
|
|
location lLoc = GetLocation(OBJECT_SELF);
|
|
int iNow = (GetCalendarMonth()*10000) + (GetCalendarDay()*100) + GetTimeHour();
|
|
// specail for trees
|
|
if (vTREE==TRUE)
|
|
{
|
|
string BLUEPRINT = GetLocalString(OBJECT_SELF,"BLUEPRINT");
|
|
oItem = CreateObject(OBJECT_TYPE_PLACEABLE,BLUEPRINT,lLoc,TRUE);
|
|
SetLocalInt(oItem,"BIRTHEDAT",iNow);
|
|
string s2ndBluePrint = GetLocalString(OBJECT_SELF,"2ndBLUEPRINT");
|
|
SetLocalString(oItem,"2ndBLUEPRINT",s2ndBluePrint);
|
|
DelayCommand(1.0,DestroyObject(OBJECT_SELF));
|
|
}
|
|
DestroyObject(OBJECT_SELF);
|
|
}
|
|
|
|
}
|