//:://///////////////////////////////////////////// //:: Name corpse_enter //:: FileName //::////////////////////////////////////////////// /* */ //::////////////////////////////////////////////// //:: Created By: Alexandre BRUNEL //:: Created On: 30/05/2003 //:: Modified On: 02/03/2004 //::////////////////////////////////////////////// #include "corpse_lib" void main() { object pc = GetEnteringObject(); string PCID = GetPCID(pc); object corpse = GetLocalObject(OBJECT_SELF,PCID); string dataBase = GetDataBaseName(); if(!GetIsObjectValid(corpse)) corpse = RetrieveCampaignObject(dataBase,PCID,GetCampaignLocation(CorpseCampainName,PCID+"Location",pc),OBJECT_INVALID,pc); if(GetIsObjectValid(corpse)) { SetLocalObject(pc,CorpsePCCorpse,corpse); SetLocalObject(corpse,CorpsePCCorpse,pc); DeleteLocalString_Corpse(corpse,CorpseDeadPCLeftID); CorpseClearInventory(pc,TRUE); LinkEquipment(corpse); object item = GetFirstItemInInventory(pc); while(GetIsObjectValid(item)) { DestroyObject(item); item = GetNextItemInInventory(pc); } object wayPoint = GetWaypointByTag(CorpseCryptWaypoint); effect death = EffectDeath(FALSE,FALSE); //AssignCommand(corpse,giveBackItems(pc,FALSE)); if(GetArea(pc) != GetArea(wayPoint)) { AssignCommand(pc,ActionJumpToLocation(GetLocation(wayPoint))); //AssignCommand(pc,ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,death,pc))); } AssignCommand(pc,ActionDoCommand(SetCommandable(TRUE))); AssignCommand(pc,SetCommandable(FALSE)); } SetLocalString(pc,CorpsePCID,PCID); }