PoA_PRC8/_module/nss/eq_legend.nss
Jaysyn904 8d97886c3f Changed folder name.
Changed folder name.
2022-10-07 21:08:37 -04:00

34 lines
685 B
Plaintext

//Created by Genisys / Guile 5/20/08
#include "x2_inc_switches"
void main()
{
object oPC;
oPC = GetPCItemLastEquippedBy();
object oItem;
int nSlot;
//If not level 20, unequip the item!
if(GetHitDice(oPC)<=20)
{
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
{
oItem=GetItemInSlot(nSlot, oPC);
if (GetIsObjectValid(oItem))
{
//Unequip all items tag named "legend"
if(GetTag(oItem) == "legend")
{
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature
("You are not level 21 and cannot use this item!", oPC);
}
else
{ }
}
}
}
}