[Relz]Inventory Functions

Post » Sat Apr 26, 2014 7:12 pm

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!
User avatar
Susan Elizabeth
 
Posts: 3420
Joined: Sat Oct 21, 2006 4:35 pm

Return to V - Skyrim