1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Item generator skript

Discussion in 'Requests' started by MinecraftMeme11, Apr 10, 2021.

  1. MinecraftMeme11

    Apr 10, 2021
    Likes Received:
    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!
  2. bobsilowski

    bobsilowski Member

    Apr 20, 2021
    Likes Received:
    For the basic level one gen you could do it like this:

    Code (Text):
    1. on load:
    2.     add BLOCK_NAME to {gen1::*}
    3.     add BLOCK_NAME_2 to {gen1::*}
    5. # And so on until you are happy with the gen 1 items then for the drop:
    7. on form of cobblestone:
    8.     cancel event
    9.     set {drop} to random element out of {gen1::*}
    10.     drop 1 {drop} at event-location
    11.     delete {drop}
    I am not sure if this works but I don't see any reason why it shouldn't.

Share This Page