MZ Is there a way (script code) to remove all items...

... from for instance Item ID 25 to 101?
Same question for weapons and armors.
Thanks!
Hi there!

The script call to lose an item is:
$gameParty.loseItem(item, amount, includeEquip)

So, if you want to remove several items Id:
For progressive Ids:

JavaScript:
for(let id = 25; id <= 101; id++){
    $gameParty.loseItem($dataItems[id], 99, false)
}

For non-progressive ids, you can create an array with the ids you want:

JavaScript:
const ids = [25, 34, 40, 30]

for(const id of ids){
    $gameParty.loseItem($dataItems[id], 99, false)
}

replace $dataItems with $dataWeapons or $dataArmors.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-script-code-to-remove-all-items.156308/