PoA_PRC8/module/nss/eq_legend.nss
Jaysyn904 128e7e59a4 Initial upload
Initial upload
2022-10-07 14:20:31 -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
{ }
}
}
}
}