Boss battle loot

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Grandfish

Member
Feb 8, 2021
13
0
1
22
Im making a boss system where when u kill the boss, it has some drops, here is my current code:
Code:
on damage:
    if victim is pufferfish named "Spike":
        if the final damage is bigger than the health of victim:
        loop all entities in radius 15 around victim:
            chance of 12%:
                give loop-entities prismarine shard named "&aSea Shard" with lore "&aRARE"
            chance of 1%:
                give loop-entities diamond sword named "&6Prismablade" with lore "&6LEGENDARY"
            chance of 50%:
                give loop-entities sponge named "&aSpike's Dolly" with lore "&aRARE"
            chance of 5%:
                give loop-entities music disc named "&6Spike's Music" with lore "&6LEGENDARY"
            chance of 32%:
                give loop-entities potion named "&aSpike's Baby Bottle" with lore "&aRARE"
The problem is, it will give the entire team the same loot, and I wan't each player to get a different item, but they each have the same probability.

So when u kill a pufferfish named spike, every entity in a 15 block radius has a chance at each of the items in the code box.
 
here
Code:
thingy:
  set {_x} to random integer between 1 and 5 #change this to the amount like 1 and 6 if you want to make something more common
  if {_x} is 1:
    give player 1 blaze powder named "&5Dragon's breath" with lore "&5&lEPIC"
  if {_x} is 2:
    #etc
 
Status
Not open for further replies.