#include "x2_inc_itemprop"
//ffbj
void main()
{
object oPC=GetEnteringObject();
if (!GetIsPC(oPC)) return;
object oItem = GetItemInSlot( INVENTORY_SLOT_LEFTRING, oPC);
itemproperty iProperty = ItemPropertyLight(IP_CONST_LIGHTBRIGHTNESS_BRIGHT,IP_CONST_LIGHTCOLOR_WHITE);
if
(IPGetItemHasProperty(oItem, iProperty, -1, TRUE))
{
SendMessageToPC(oPC, "Bight White Light");
}
}
Function Description:
IPGetItemHasProperty(object, itemproperty, int, int)
Checks if an item has a matching itemproperty.int IPGetItemHasProperty(
object oItem,
itemproperty ipCompareTo,
int nDurationType,
int bIgnoreSubType = FALSE
);
Parameters
oItemItem to check for property.
ipCompareToItemProperty to compare to
nDurationTypeSee description and remarks.
bIgnoreSubTypeTRUE to ignore subtype. Otherwise FALSE. (Default: FALSE)
Description
Wrapper for GetItemHasItemProperty that returns true if oItem has an itemproperty that matches ipCompareTo by Type AND DurationType AND SubType
nDurationType = Valid DURATION_TYPE_* or -1 to ignore
bIgnoreSubType - If set to TRUE an item property will be considered identical even if the SubType is different.
Remarks
Only DURATION_TYPE_TEMPORARY, DURATION_TYPE_PERMANENT, and -1 are valid for nDurationType.
This differs from GetItemHasItemProperty in several ways. First of all because it also takes duration type and subtype into account. And also because it uses an itemproperty value for parameter, instead of the ITEM_PROPERTY_* integer constant.
Returns TRUE if oItem has the same type of itemproperty that ipCompareTo is. If nDurationType is different from -1, it also needs to be that same duration type. If bIgnoreSubType is FALSE, it also needs to be of the same subtype.
Returns FALSE if the above isn't mean. It also prints "Not Found" to the log.
Requirements
#include "x2_inc_itemprop"
Modifié par ffbj, 10 septembre 2012 - 12:58 .