Sorry, I'm still new to java, and I don't really know how to apply the code from stack overflow to rmmv.
Basically I'm setting up an event (chest) that gives random item from a pool (array with their IDs).
So I come up with something like this:
pool = {12,23,44,56,77};
loot= Random().pool(array.length);
$gameParty.gainItem($dataItems[loot], 1);
of course it doesn't work... can someone show me the proper way?