PRC8/nwn/nwnprc/trunk/scripts/prc_equip_rstr.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

33 lines
784 B
Plaintext

#include "inc_newspellbook"
#include "prc_inc_itmrstr"
/*
Script to handle removal of items with the ability
or skill restriction itemproperties.
Fired from prc_equip
*/
void main()
{
object oPC = GetItemLastEquippedBy();
object oItem = GetItemLastEquipped();
if(!CheckPRCLimitations(oItem, oPC))
{
// "You cannot equip " + GetName(oItem)
SendMessageToPC(oPC, ReplaceChars(GetStringByStrRef(16828407), "<itemname>", GetName(oItem)));
int i = 0;
object oTest;
do {
oTest = GetItemInSlot(i, oPC);
if(oTest == oItem)
{
DelayCommand(0.3f, ForceUnequip(oPC, oItem, i));
return;
}
i++;
} while(i < NUM_INVENTORY_SLOTS);
}
}