Download - http://www.nexusmods.com/skyrim/mods/53432/?
Description:
This is an SKSE Plugin, which adds functions related to inventories to papyrus.
Requirements:
-http://skse.silverlock.org/ or newer
Added Functions:
-GetNumItemsWithKeyword(ObjectReference objRef, Keyword key)
-GetNthFormWithKeyword(ObjectReference objRef, Keyword key, int KeywordIndex)
Example code:
import _Q2C_FunctionsObjectReference Property PlayerRef AutoKeyword Property VendorItemPotion Auto Function ReWeightPotions()int PotionIndex = GetNumItemsWithKeyword(PlayerRef, VendorItemPotion)While(PotionIndex > 0) Form potion = GetNthFormWithKeyword(PlayerRef, VendorItemPotion, PotionIndex) potion.SetWeight(0.0) PotionIndex -= 1endWhileendFunction
Feel free to package this plugin with your own mods and use it for your own projects.
Please just mention me in a footnote somewhere.
All Credits are going to the SKSE Team!