20 lines
661 B
Plaintext
20 lines
661 B
Plaintext
// 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);
|
|
}
|