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

Skellet natural break help

Discussion in 'Skript' started by Selvati, Sep 18, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Selvati

    Selvati Well-Known Member

    Joined:
    Jun 26, 2017
    Messages:
    185
    Likes Received:
    9
    I need this code to exclude the breaking of bedrock and obsidian unless player's tool is a diamond pickaxe, player's can get bedrock using this, thanks.

    Code (Skript):
    1. # 3x3 Mining
    2. on mine:
    3.     if lore of player's held item contains "&eExplosive I":
    4.         set {_1} to location of event-block
    5.         set {_2} to location of event-block
    6.         if player's pitch is between -50 and 50:
    7.             add 1 to y-coord of {_1}
    8.             subtract 1 from y-coord of {_2}
    9.             if player's horizontal facing is west or east:
    10.                 add 1 to z-coord of {_1}
    11.                 subtract 1 from z-coord of {_2}
    12.                 loop blocks within {_1} to {_2}:
    13.                     skellett break loop-value naturally using player's tool          
    14.             else if player's horizontal facing is north or south:
    15.                 add 1 to x-coord of {_1}
    16.                 subtract 1 from x-coord of {_2}
    17.                 loop blocks within {_1} to {_2}:
    18.                     skellett break loop-value naturally using player's tool
    19.         else:
    20.             add 1 to x-coord of {_1}
    21.             add 1 to z-coord of {_1}
    22.             subtract 1 from x-coord of {_2}
    23.             subtract 1 from z-coord of {_2}
    24.             loop blocks within {_1} to {_2}:
    25.                 skellett break loop-block naturally using player's tool
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    perhaps you could just run a check before it breaks? If loop-value is not bedrock:
     
Thread Status:
Not open for further replies.
Loading...