HoS_PRC8/_mod/_module/nss/vamp_place_coffi.nss

20 lines
661 B
Plaintext
Raw Permalink Normal View History

2024-11-25 19:36:07 -05:00
// vamp_place_coffi
#include "offset_h"
void main()
{
object oPC=GetPCSpeaker();
if (oPC==OBJECT_INVALID||GetIsPC(oPC)==FALSE) oPC=OBJECT_SELF;
object oCoffin;
location lLoc=GetOffsetLocation(GetLocation(oPC),0.8);
oCoffin=CreateObject(OBJECT_TYPE_PLACEABLE,"vampirecoffin",lLoc);
while(oCoffin==OBJECT_INVALID)
{ // try a different location
lLoc=GetOffsetLocation(GetLocation(oPC),0.8);
oCoffin=CreateObject(OBJECT_TYPE_PLACEABLE,"vampirecoffin",lLoc);
} // try a different location
SetLocalObject(oPC,"oCoffin",oCoffin);
SetLocalObject(oCoffin,"oVampire",oPC);
SetLocalInt(oPC,"nCoffinPlaced",TRUE);
}