Jump to content

how to make a chance table


SavageCabage619

Recommended Posts

so im trying to write a skript, so whenever we jump a random mob spawns.

What i am trying to do is something like:

on player jump:

    spawn {Mob}

and the {mob} will spawn one of all mobs. because I tried doing

on player jump:

    chance of _% 

        spawn _ mob

    chance of _%

        spawn _mob

and so on.

But doing that sometimes spawns multiple mobs at once and sometimes doesnt spawn mobs at all.

Link to comment
Share on other sites

4 hours ago, SavageCabage619 said:

But doing that sometimes spawns multiple mobs at once and sometimes doesnt spawn mobs at all.

I suggest doing something like this:

on player jump:
  chance of 50%:
    spawn mob
	stop

  chance of 50%:
    spawn mob
	stop

  else:
    spawn mob
	stop

 

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

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