Files
HeroesStone_PRC8/_module/nss/se_stopswap_ei.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

24 lines
695 B
Plaintext

#include "se_stopswap_inc"
// -----------------------------------------------------------------------------
// MAIN
// -----------------------------------------------------------------------------
// module event - UnPlayerEquipItem
// file name - se_stopswap_ei v1.2
void main()
{
object oItem = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
// is this the key?
int nSlot = GetRestictedInventorySlot(oItem);
if(GetLocalObject(oPC, VAR_SLOT_KEY + IntToString(nSlot)) == oItem)
{
// unlock the slot
DeleteLocalInt(oPC, VAR_SLOT_LOCK + IntToString(nSlot));
DeleteLocalObject(oPC, VAR_SLOT_KEY + IntToString(nSlot));
}
}