The RemoveItemIntoStash export allows you to remove items from a specified stash dynamically.
How to Use
To remove an item from a stash, use the following code:
local stashID ="stash_house" -- Identifier for the stashlocal itemName ="bread" -- Name of the item to removelocal itemAmount =5-- Quantity of the item to removelocal itemSlot =nil-- Specify a slot or use nil for automatic targetinglocal stashSlots =50-- Total slots available in the stashlocal stashMaxWeight =1000-- Maximum weight capacity of the stashexports['qs-inventory']:RemoveItemIntoStash(stashID, itemName, itemAmount, itemSlot, stashSlots, stashMaxWeight)print("Removed " .. itemAmount .." " .. itemName .." from stash: " .. stashID)
This export ensures efficient management of stash contents by removing specified items while respecting slot and weight parameters.