Checking for presence of items in inventoryGetItemCount, "ObjectID" (returnsShort objectcountSet objectcount to ( "Mob_ID"->GetItemCount,If ( GetItemCount, "Object_ID" >= 1 )
Begin GlassArmorScriptshort objectcount If ( glass == 0 ) set objectcount to ( player->getitemcount, "SM_glass_cuirass" ) if ( getitemcount, "SM_glass_cuirass" >= 2 ) Set glass to 1 endif elseif ( glass == 1 ) set objectcount to ( player->getitemcount, "SM_glass_boots" ) If ( getitemcount, "SM_glass_boots" >= 2 ) set glass to 2 endif elseif ( glass == 2 ) set objectcount to ( player->getitemcount, "SM_glass_helm" ) If ( getitemcount, "SM_glass_helm" >= 2 ) set glass to 3 endif elseif ( glass == 3 ) Journal "SM_glass2" 50 stopscript Glassarmorscript endifend
Begin GlassArmorScriptshort glassset glass to 0if ( player->getitemcount, "SM_glass_cuirass" >= 2 ) Set glass to glass + 1endifIf ( player->getitemcount, "SM_glass_boots" >= 2 ) Set glass to glass + 1endifIf ( player->getitemcount, "SM_glass_helm" >= 2 ) Set glass to glass + 1endif; No greaves? Pauldrons? Gauntlets?if ( glass == 3 ) ; All three checks matched Journal "SM_glass2" 50 stopscript Glassarmorscriptendifend
Begin GlassArmorScript short glass set glass to 0 if ( player->getitemcount, "SM_glass_cuirass" >= 2 ) Set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_boots" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_helm" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_pauldron_left" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_pauldron_right" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_bracer_left" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_bracer_right" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_greaves" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_shield" >= 2 ) set glass to glass + 1 endif If ( player->getitemcount, "SM_glass_towershield" >= 2 ) set glass to glass + 1 endif If ( glass >= 10 ) stopscript Glassarmorscript endif end