57 lines
2.4 KiB
Plaintext
57 lines
2.4 KiB
Plaintext
void main()
|
|
{
|
|
object oPC = GetEnteringObject();
|
|
int nIsMonkItem = FALSE;
|
|
int nIsShouItem = FALSE;
|
|
int nIsDracInitItem = FALSE;
|
|
int nIsHenMyst = FALSE;
|
|
int nIsBrawler = FALSE;
|
|
int nIsSacredFist = FALSE;
|
|
|
|
int nIsElfItem = FALSE;
|
|
object oItem = GetFirstItemInInventory(oPC);
|
|
while (GetIsObjectValid(oItem) == TRUE)
|
|
{
|
|
itemproperty iProp = GetFirstItemProperty(oItem);
|
|
while (GetIsItemPropertyValid(iProp) == TRUE)
|
|
{
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == CLASS_TYPE_MONK)
|
|
nIsMonkItem = TRUE;
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 164)
|
|
nIsShouItem = TRUE;
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 122)
|
|
nIsDracInitItem = TRUE;
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 202)
|
|
nIsHenMyst = TRUE;
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 254)
|
|
nIsBrawler = TRUE;
|
|
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 126)
|
|
nIsSacredFist = TRUE;
|
|
iProp = GetNextItemProperty(oItem);
|
|
}
|
|
if (nIsMonkItem == TRUE && nIsShouItem == FALSE)
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(164), oItem);
|
|
if (nIsMonkItem == TRUE && nIsDracInitItem == FALSE)
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(122), oItem);
|
|
if (nIsMonkItem == TRUE && nIsHenMyst == FALSE)
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(202), oItem);
|
|
if (nIsMonkItem == TRUE && nIsBrawler == FALSE)
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(254), oItem);
|
|
if (nIsMonkItem == TRUE && nIsSacredFist == FALSE)
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(126), oItem);
|
|
|
|
|
|
|
|
|
|
nIsMonkItem = FALSE;
|
|
nIsShouItem = FALSE;
|
|
nIsDracInitItem = FALSE;
|
|
nIsHenMyst = FALSE;
|
|
nIsBrawler = FALSE;
|
|
nIsSacredFist = FALSE;
|
|
|
|
oItem = GetNextItemInInventory(oPC);
|
|
}
|
|
|
|
}
|