Jump to content

Trying to make a random item skript with varying rarity.


z_conquest

Recommended Posts

This is my current skript. I'm trying to make dirt the most common, oak planks second, then cobblestone third and iron ore somewhere below that. 

command /toggle
  trigger: if {toggleoff::%player%} exists:
     delete {toggleoff::%player%}
    else:
     set {toggleoff::%player%} to true

every 15 seconds:
  loop all players
    if {toggleoff::%loop-player%} does not exist:
      give loop-player random item out of all items

 

Link to comment
Share on other sites

I don't think this will work but give it a try, its super simple, I think I messed up on the syntax's, but hopefully you get the gist. Someone please correct me if I am wrong lol.

command /toggle
  trigger:
  if {toggleoff::%player%} exists:
     delete {toggleoff::%player%}
    else:
     set {toggleoff::%player%} to true

every 15 seconds:
  loop all players
    if {toggleoff::%loop-player%} does not exist:
      loop until {item::%loop-player%} is true:
        chance of 90%:
          give loop-player 1 of dirt
          set {item::%loop-player%} to true
          stop
        chance of 80%:
          give loop-player 1 of oak_wood
          set {item::%loop-player%} to true
          stop
        delete {item::%loop-player%}

 

Edited by 83yWasTaken

Youtube: https://www.youtube.com/c/83y123

Discord: 83y#2552

IGN: 83y

 

If your seeing this I am currently banned from Posting, the Discord and GitHub

I have helped out countless player's and been re-payed with multiple bans.

staff are attention seeking and biased, i'd just leave for your sake.

your just wasting your time.

like.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...