Random Event-Plugin

Hey!

I plan a feature in my game which allows the player to get a random Item in a dungeon. The item will be collectable from a chest and the player can enter the dungeon multiple times to get more items, but never more than one time.

But I couldn't figure out how I can randomize the loot and how I can disable an item that the player already has (I tried to do it with switches and simple eventing but it didn't worked)

So I think I need is a plugin that allows me to get a random event from a trigger, but disable events if a certain switch is off/on.
So you want to get random items, but don't get an item twice? I think you can do this with eventing

Code:
loop
  Set Variable "random" as random number
  If Condition random = 1
    if Condition: Party has item "fiery sword"
      do nothing
     else
      gain item "fiery sword"
      break loop
  If Condition random = 2
    If Condition: Party has item "magical cloak"
      do nothing
    else
      gain item "magical cloak"
      beak loop
end loop

Be aware this eventing will break the game if you have all items from the list.
Thank you very much! I will try it out later.
Can I use it as a common Event so it works with multiple maps?
With some adjustments, yes for sure.

I've moved this thread to MZ Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/random-event-plugin.136422/