PGCC_PRC8/_module/nss/inc_baseitem001.nss
Jaysyn904 e51634d39b Initial upload
Initial upload.
2024-10-09 14:17:22 -04:00

128 lines
3.6 KiB
Plaintext

int isArmor(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_ARMOR ) ||
(iTyp == BASE_ITEM_LARGESHIELD ) ||
(iTyp == BASE_ITEM_SMALLSHIELD ) ||
(iTyp == BASE_ITEM_TOWERSHIELD )
) return TRUE;
else return FALSE;
}
int isWearable(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_HELMET ) ||
(iTyp == BASE_ITEM_BELT ) ||
(iTyp == BASE_ITEM_BOOTS ) ||
(iTyp == BASE_ITEM_BRACER ) ||
(iTyp == BASE_ITEM_CLOAK )||
(iTyp == BASE_ITEM_AMULET ) ||
(iTyp == BASE_ITEM_RING )
) return TRUE;
else return FALSE;
}
int isGauntlet(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (iTyp == BASE_ITEM_GLOVES )
return TRUE;
else return FALSE;
}
int isMelee(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_BASTARDSWORD ) ||
(iTyp == BASE_ITEM_BATTLEAXE ) ||
(iTyp == BASE_ITEM_CLUB ) ||
(iTyp == BASE_ITEM_DAGGER ) ||
(iTyp == BASE_ITEM_DIREMACE ) ||
(iTyp == BASE_ITEM_DOUBLEAXE ) ||
(iTyp == BASE_ITEM_DWARVENWARAXE ) ||
(iTyp == BASE_ITEM_GREATAXE ) ||
(iTyp == BASE_ITEM_GREATSWORD ) ||
(iTyp == BASE_ITEM_HALBERD ) ||
(iTyp == BASE_ITEM_HANDAXE ) ||
(iTyp == BASE_ITEM_HEAVYFLAIL ) ||
(iTyp == BASE_ITEM_KAMA ) ||
(iTyp == BASE_ITEM_KATANA ) ||
(iTyp == BASE_ITEM_KUKRI ) ||
(iTyp == BASE_ITEM_LIGHTFLAIL ) ||
(iTyp == BASE_ITEM_LIGHTHAMMER ) ||
(iTyp == BASE_ITEM_LIGHTMACE ) ||
(iTyp == BASE_ITEM_LONGSWORD ) ||
(iTyp == BASE_ITEM_MAGICSTAFF ) ||
(iTyp == BASE_ITEM_MORNINGSTAR ) ||
(iTyp == BASE_ITEM_QUARTERSTAFF ) ||
(iTyp == BASE_ITEM_RAPIER ) ||
(iTyp == BASE_ITEM_SCIMITAR ) ||
(iTyp == BASE_ITEM_SCYTHE ) ||
(iTyp == BASE_ITEM_SHORTSPEAR ) ||
(iTyp == BASE_ITEM_SHORTSWORD ) ||
(iTyp == BASE_ITEM_SICKLE ) ||
(iTyp == BASE_ITEM_TWOBLADEDSWORD ) ||
(iTyp == BASE_ITEM_WARHAMMER ) ||
(iTyp == BASE_ITEM_WHIP )
) return TRUE;
else return FALSE;
}
int isRanged(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_HEAVYCROSSBOW ) ||
(iTyp == BASE_ITEM_LIGHTCROSSBOW ) ||
(iTyp == BASE_ITEM_LONGBOW ) ||
(iTyp == BASE_ITEM_SHORTBOW ) ||
(iTyp == BASE_ITEM_SLING )
) return TRUE;
else return FALSE;
}
int isThrowing(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_DART ) ||
(iTyp == BASE_ITEM_SHURIKEN ) ||
(iTyp == BASE_ITEM_THROWINGAXE )
) return TRUE;
else return FALSE;
}
int isAmmunition(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_ARROW ) ||
(iTyp == BASE_ITEM_BOLT ) ||
(iTyp == BASE_ITEM_BULLET )
) return TRUE;
else return FALSE;
}
int isArcane(object oItem)
{
int iTyp = GetBaseItemType(oItem);
if (
(iTyp == BASE_ITEM_MAGICROD ) ||
(iTyp == BASE_ITEM_MAGICSTAFF ) ||
(iTyp == BASE_ITEM_MAGICWAND ) ||
(iTyp == BASE_ITEM_BLANK_WAND ) ||
(iTyp == BASE_ITEM_BLANK_SCROLL ) ||
(iTyp == BASE_ITEM_BLANK_POTION ) ||
(iTyp == BASE_ITEM_MISCLARGE ) ||
(iTyp == BASE_ITEM_MISCMEDIUM ) ||
(iTyp == BASE_ITEM_MISCSMALL ) ||
(iTyp == BASE_ITEM_MISCTHIN ) ||
(iTyp == BASE_ITEM_MISCWIDE )
) return TRUE;
else return FALSE;
}