Script for adding 10 of each weapon and armor

Hi!

Yanfly's Test Play Assist has a script for adding 10x every non-key item, which is very useful. I've modified it to load key items as well and it works fine:

Code:
for (var i = 1; i < $dataItems.length; ++i) {
var item = $dataItems[i];
if (!item) continue;
if (item.name.trim().length <= 0) continue;
$gameParty.gainItem(item, 10);
}

But I'd love to have the same functionality with weapons and armors. I've tried to repurpose this script using what I can learn from the script call spreadsheet but it hasn't worked thus far, and I bet this is ultra easy for lots of you out there.

Thank you :LZSsmile::LZSsmile::LZScheeze:
But I'd love to have the same functionality with weapons and armors
at the minimum, you'd copy paste and do the same as what youve shown, but you'd replace both references to $dataItems to $dataWeapons and $dataArmors. it would be less effort to add those data objects together and iterate through that through instead of copy pasting that an additional 2 times though

Code:
var items = $dataWeapons.concat($dataArmors.concat($dataItems));
for (var i = 1; i < items.length; ++i) {
    var item = items[i];
    if (!item) continue;
    if (item.name.trim().length <= 0) continue;
    $gameParty.gainItem(item, 10);
}
Perfect, thank you it works!

Original thread: https://forums.rpgmakerweb.com/threads/script-for-adding-10-of-each-weapon-and-armor.170405/