Block around

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

SafaYVS

Member
Jun 22, 2018
30
0
0
25
if there is a block named "Coin Spawner" around 100 blocks not placing one more block


variables:
{koyuldusps:%player%} = 0

on place quartz ore:
if tool's display name is "&b&lPCNW &9» &eCoin Spawner":
add 1 to {koyuldusps:%player%}
if {koyuldusps:%player%} is greater than or equal to 2:
if tool's display name is "&b&lPCNW &9» &eCoin Spawner":
set the block to air
cancel event
message "Spawner Biri tarafından koyulmuş" to player

on break quartz ore:
if tool's display name is "&b&lPCNW &9» &eCoin Spawner":
set {koyuldusps:%player%} to 0
message "Spawner'ı kırdın." to player
 
replace the # <things> with the on place and on break stuff

code_language.skript:
on place of quartz ore:
    if name of player's tool is "&b&lPCNW &9» &eCoin Spawner":
        loop all blocks in radius 100 of event-block:
            if {hasplaced::%loop-value%::%location of loop-value%} = true:
                # <cancel event stuff>
            else:
                set {hasplaced::%event-block%::%location of event-block%} to true
                # <on place stuff>

on break of quartz ore:
    if {hasplaced::%event-block%::%location of event-block%} = true:
        set {hasplaced::%event-block%::%location of event-block%} to false
 
Status
Not open for further replies.