Aschbourne_PRC8/_module/nss/vamp_coffinmaker.nss
Jaysyn904 f5ffe7d0b9 Module commit
Module commit.
2024-06-14 10:48:20 -04:00

25 lines
1.1 KiB
Plaintext

void main()
{
object oPC = GetLastUsedBy();
// NOTE: we are not checking if iCoffin is set to TRUE here...
// whether or not the coffin system is in place.
if (GetSubRace(oPC)=="Vampire")
{
PrintString("vamp_coffinmaker: "+GetName(oPC)+" tries to use the coffin maker. If they don't have a coffin token and there is no coffin in the world with their CD Key they will now get one.");
if(GetIsObjectValid( GetItemPossessedBy(oPC,"VampireCoffinToken") )==FALSE && GetIsObjectValid(GetObjectByTag(GetPCPublicCDKey(oPC))) == FALSE)
{
CreateItemOnObject("vampirecoffintok", oPC);
PrintString("vamp_coffinmaker: Coffin wasn't found in "+GetName(oPC)+"'s inventory or anywhere in the module, so we put a new one in inventory.");
SendMessageToPC(oPC,"You receive a new coffin.");
SetLocalInt(oPC,"iCoffinInInventory",TRUE);
} else {
PrintString("vamp_coffinmaker: "+GetName(oPC)+" already has a coffin.");
SendMessageToPC(oPC,"You already have a coffin.");
}
} else {
SendMessageToPC(oPC,"You can not use this.");
}
}