
MZ Tips and Tricks Random Loot Gen Script Call RPG Maker MZ
//Add item numbers to itemList to add them to the generator.
let itemList = [1,2,3,4,5];
let itemCount = itemList.length;
let pickItem = Math.floor(Math.random() * itemCount);
$gameParty.gainItem($dataItems[itemList[pickItem]], 1, false);
$gameMessage.add(`You've obtained \\item[${itemList[pickItem]}].`);
DG Discord Server:
https://discord.gg/YcxySsj
If you've enjoyed this video please consider giving it a Like or Share and hit
that Notification bell for updates. You could always Subscribe to the channel if you haven't already and as always, thanks for watching. We'll see you in the next video! :)
Download the last game I released for free:
https://driftwoodgaming.itch.io/the-legend-of-driftwood-v162
I receive 99% of paypal donations, but only 64% of superchats.
http://paypal.me/DriftwoodGamingYT
Website:
http://driftwoodgaming.com
Twitter:
https://www.twitter.com/DriftwoodGaming
Patreon:
https://www.patreon.com/DriftwoodGaming
Tea's Channel:
https://www.youtube.com/channel/UC_XsB3S8AceTjRW-5aIWJbA
Corey's Channel:
Tronogamming Gamer's Youtube channel (Corey):
https://www.youtube.com/channel/UC9x2DRpbcWQucvOmOcRQUYQ