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.

Cancel event-block - Skript

Discussion in 'Skript' started by Mads Bille, Oct 15, 2018.

Thread Status:
Not open for further replies.
  1. Mads Bille

    Mads Bille Member

    Joined:
    Oct 15, 2018
    Messages:
    10
    Likes Received:
    0
    Hey, I have to try to make a code so you can't place a cobblestone wall at a cobblestone wall. So when you place a cobblestone wall next to a cobblestone wall, will it cancel and do nothing

    Thank you :emoji_slight_smile:
    Code (Skript):
    1. on place of cobblestone wall:
    2.     set {_check} to middlecheck(location of event-block)
    3.     if {_check} is true:
    4.         stop
    5.     if block north of event-block is locked chest:5 or cobblestone wall:
    6.     set block at block 1 north event-location to oak wood plank  
    7.         set {_check} to middlecheck(location of block north of event-block)
    8.         if {_check} is true:
    9.             stop
    10.     if block east of event-block is locked chest:5 or cobblestone wall:
    11.         set {_check} to middlecheck(location of block east of event-block)
    12.         if {_check} is true:
    13.             stop
    14.     if block south of event-block is locked chest:5 or cobblestone wall:
    15.         set {_check} to middlecheck(location of block south of event-block)
    16.         if {_check} is true:
    17.             stop
    18.     if block west of event-block is locked chest:5 or cobblestone wall:
    19.         set {_check} to middlecheck(location of block west of event-block)
    20.         if {_check} is true:
    21.             stop
     
  2. Best Answer:
    Post #2 by Efnilite, Oct 16, 2018
  3. Efnilite

    Supporter

    Joined:
    May 12, 2018
    Messages:
    218
    Likes Received:
    15
    Medals:
    Code (Skript):
    1. on place of cobblestone:
    2.     loop all blocks in radius 1 of event-block:
    3.         if loop-block is cobblestone:
    4.             cancel event
    5.             stop loop
     
    • Like Like x 1
  4. Mads Bille

    Mads Bille Member

    Joined:
    Oct 15, 2018
    Messages:
    10
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...