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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

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

Discussion in 'Skript' started by Haloxx, May 2, 2021.

Thread Status:
Not open for further replies.
  1. Haloxx

    Haloxx Member

    Joined:
    May 2, 2021
    Messages:
    20
    Likes Received:
    0
    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
     
  2. Jordan

    Jordan Member

    Joined:
    Jan 25, 2017
    Messages:
    190
    Likes Received:
    12
    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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...