Alangara_PRC8/_module/nss/rose_abort_cloak.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

41 lines
1.2 KiB
Plaintext

#include "zep_inc_craft"
void main()
{
// Get and equip correct item.
object oPC = GetPCSpeaker();
object oCloak = GetLocalObject(oPC, "ZEP_CR_ITEM");
object oBackup = GetLocalObject(oPC, "ZEP_CR_BACKUP");
DestroyObject(oCloak);
oCloak = CopyItem(oBackup, oPC, TRUE);
DestroyObject(oBackup);
AssignCommand(oPC, ClearAllActions(TRUE));
AssignCommand(oPC, ActionEquipItem(oCloak, INVENTORY_SLOT_CLOAK));
// Remove custscene immobilize and light from player
//Note from Loki: Doesn't seem to be any light. [FUTURE FIX]
effect eEff = GetFirstEffect(oPC);
while (GetIsEffectValid(eEff))
{
if (GetEffectType(eEff) == EFFECT_TYPE_CUTSCENEIMMOBILIZE)
RemoveEffect(oPC,eEff);
eEff = GetNextEffect(oPC);
}
RestoreCameraFacing();
// Postclean settings
DeleteLocalInt(oPC, "ZEP_CR_CHANGED");
DeleteLocalInt(oPC, "ZEP_CR_COST");
DeleteLocalInt(oPC, "ZEP_CR_DC");
DeleteLocalInt(oPC, "ZEP_CR_DONE");
DeleteLocalInt(oPC, "ZEP_CR_PART");
DeleteLocalString(oPC, "ZEP_CR_PARTNAME");
DeleteLocalObject(oPC, "ZEP_CR_ITEM");
DeleteLocalObject(oPC, "ZEP_CR_BACKUP");
DeleteLocalObject(oPC, "ZEP_CR_NPC");
DeleteLocalObject(oPC, "ZEP_CR_PLACEABLE");
}