Hello scripting masters, I was wondering if someone would be up for the task of helping me script an Item Property Removal System....
I've tried the suggestion Lightfoot8 gave below, e.g. return io==iProp; (Didn't work)
Here is what I have so far, I believe this is going to require some work, becuase it's removing ALL Properties presently of the same type & subtype for Saving Throws... Obviously I'm going to have to run checks on CostTableValues to ensure both values are the same, but I don't know how to code this efficiently, because the system is already intense enough...
int iMatch(object oScan, itemproperty io)
{
// First read the PC Item's Property & get any Statistics on it...
int ioType = GetItemPropertyType(io);
int ioSub = GetItemPropertySubType(io);
int ioDur = GetItemPropertyDurationType(io);
int ioTable = GetItemPropertyCostTable(io);
int ioVal = GetItemPropertyCostTableValue(io);
itemproperty ip = GetFirstItemProperty(oScan);
while(GetIsItemPropertyValid(ip))
{
if(GetItemPropertyType(ip) == ioType && ioDur != DURATION_TYPE_TEMPORARY)
{
if(GetItemPropertySubType(ip) == ioSub)
{
return TRUE;
}
}
ip = GetNextItemProperty(oScan);
}
return FALSE;
}