How do i make a random chance to drop an item when an ore is broken?

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

Haloxx

Member
May 2, 2021
20
0
1
23
i have this code right now

add gold to {freeitems::*}
add diamond to {freeitems::*}
add diamond sword of sharpness 10 to {freeitems::*}
add iron axe of efficiency 4 and fortune 2 to {freeitems::*}
add iron picaxe of efficiency 20 and unbreaking 10 named "OP Pic" to {freeitems::*}
add diamond sword of sharpness 12 and smite 5 and mending 100 and looting 20 and fire aspect 10 and unbreaking 100 and bane of arthropods 5 named "Extra OP Sword" to {freeitems::*}

on mine:
if block is coal ore:
drop a random element of {freeitems::*} at event-block


but it says i have to put all code in triggers

upload_2021-5-2_22-48-8.png
 
Because your command code is invalid.

You need to add a line after you init your command and add "Trigger:"

A command should look like this:

command /test:
trigger:
broadcast "command working"

you're missing the trigger line.
 
Status
Not open for further replies.