Okay I need help again... Okay here's the deal it won't compile for some reason it says that on line 115 "5/9/2005 5:05:58 PM: Error. 'filter' did not compile.
filter.nss(115): ERROR: UNKNOWN STATE IN COMPILER"
here's the script.
void getrid(object oPC, object oItem)
{
itemproperty property=GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(property))
{
if (
(GetItemPropertyType(property) == ITEM_PROPERTY_CAST_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_HIT_PROPERTIES)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_TRAP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_THIEVES_TOOLS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_MONSTER_HIT)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_AC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_MONSTER_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION_VAMPIRIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_REDUCTION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ONHITCASTSPELL)
)
{
RemoveItemProperty(oItem, property);
}
property = GetNextItemProperty(oItem);
}
if(GetGoldPieceValue(oItem) > 500000)
{
DestroyObject(oItem);
}
}
//the function that gets the items and uses the filter on them
void filter_items(object oPC)
{
object oItem = GetFirstItemInInventory(oPC);
object oSlot;
//don't scan dm's
if(GetIsDM(oPC) == TRUE)
{
return;
}
//scan inventory
while(GetIsObjectValid(oItem))
{
getrid(oPC, oItem);
oItem = GetNextItemInInventory(oPC);
}
//scan equiped items
oSlot = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOLTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BULLETS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTRING,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_NECK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC);
getrid(oPC, oSlot);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_GREEN));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "sent");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("teleporter", oPC);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_YELLOW));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "lord");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("teleporter", oPC);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_BLUE));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "dm");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("creaturerune", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint007", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("blueprint006", oPC);
CreateItemOnObject("blueprint005", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("teleporter", oPC);
}
}