Item generator skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Apr 10, 2021
Hey everyone, I’m trying to open a generator server, but just can’t figure out how to code it. I would like my plugin to have multiple different gen tiers, like 10+, but being a starter, I can’t figure out how to get any of it to work, the gen would basically every x seconds, spawn an item above it. This would then be sold to a shop, configured with the plugin, I can’t just figure this out.
Eg: you buy melon gen from shop. You can then sell the melons it makes, earn money, then upgrade it to ——-, people would have unlimited gens etc. this then repeats until they have the max level gen.
If anyone could help code this for me, it would be amazing!
For the basic level one gen you could do it like this:

on load:
    add BLOCK_NAME to {gen1::*}
    add BLOCK_NAME_2 to {gen1::*}

# And so on until you are happy with the gen 1 items then for the drop:

on form of cobblestone:
    cancel event
    set {drop} to random element out of {gen1::*}
    drop 1 {drop} at event-location
    delete {drop}

I am not sure if this works but I don't see any reason why it shouldn't.