Ancordia_PRC8/_module/nss/cloak_invisib.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

17 lines
455 B
Plaintext

#include "x4_inc_functions"
void main()
{
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
object oCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC);
// Have us fake-cast Invisibility.
ActionCastFakeSpellAtObject(SPELL_INVISIBILITY, oPC);
object oNew = CopyItemAndModify(oCloak, ITEM_APPR_TYPE_SIMPLE_MODEL, 0, 99, TRUE);
if (oNew != OBJECT_INVALID) DestroyObject(oCloak);
EquipItem(oPC, oNew);
}