Cancel event-block - Skript

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

Mads Bille

Member
Oct 15, 2018
10
0
1
20
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_language.skript:
on place of cobblestone wall:
    set {_check} to middlecheck(location of event-block)
    if {_check} is true:
        stop
    if block north of event-block is locked chest:5 or cobblestone wall:
    set block at block 1 north event-location to oak wood plank   
        set {_check} to middlecheck(location of block north of event-block)
        if {_check} is true:
            stop
    if block east of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block east of event-block)
        if {_check} is true:
            stop
    if block south of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block south of event-block)
        if {_check} is true:
            stop
    if block west of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block west of event-block)
        if {_check} is true:
            stop
 
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_language.skript:
on place of cobblestone wall:
    set {_check} to middlecheck(location of event-block)
    if {_check} is true:
        stop
    if block north of event-block is locked chest:5 or cobblestone wall:
    set block at block 1 north event-location to oak wood plank  
        set {_check} to middlecheck(location of block north of event-block)
        if {_check} is true:
            stop
    if block east of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block east of event-block)
        if {_check} is true:
            stop
    if block south of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block south of event-block)
        if {_check} is true:
            stop
    if block west of event-block is locked chest:5 or cobblestone wall:
        set {_check} to middlecheck(location of block west of event-block)
        if {_check} is true:
            stop
code_language.skript:
on place of cobblestone:
    loop all blocks in radius 1 of event-block:
        if loop-block is cobblestone:
            cancel event
            stop loop
 
  • Like
Reactions: Mads Bille
Status
Not open for further replies.