#Map reset
1 messages · Page 1 of 1 (latest)
Something like resetting all blocks placed by players every X hours? and allow players to break only blocks placed by players.
not exactly like that so you are like in a box 100x100 and you can build and destroy blocks and after like 1 hour the 100x100 gets reseted to the point where no one has placed a block or destoryed one (the box is flat and it is 100block high and there is like 10 blocks above the bedrock are like stone and ore and above them is 1 layer dirt and than only air)
then you could do something like this, using the SkBee expression:
https://skripthub.net/docs/?id=4057
options:
loc1: location(32.5, 50, 32.5, "Spawn")
loc2: location(-31.5, 148, -31.5, "Spawn")
loopMaxBlocks: 10000
function mapReset(p:player):
loop (all blocks within {@loc1} and {@loc2} where [input != air]):
set {_n} to ({_n} + 1 if {_n} + 1 <= {@loopMaxBlocks}, else 1)
set loop-block to air
wait 0.125 second if {_n} = {@loopMaxBlocks}
broadcast "&aDone..!"
on block place:
cancel event if (block's x coord) isn't between ({@loc1}'s x coord) and ({@loc2}'s x coord)
cancel event if (block's y coord) isn't between ({@loc1}'s y coord) and ({@loc2}'s y coord)
cancel event if (block's z coord) isn't between ({@loc1}'s z coord) and ({@loc2}'s z coord)
on block break:
cancel event if (block's x coord) isn't between ({@loc1}'s x coord) and ({@loc2}'s x coord)
cancel event if (block's y coord) isn't between ({@loc1}'s y coord) and ({@loc2}'s y coord)
cancel event if (block's z coord) isn't between ({@loc1}'s z coord) and ({@loc2}'s z coord)
Although to avoid blocks being placed and broken outside of 100x100 it would be better to use regions https://skripthub.net/docs/?id=918
It doesn't make sense, the guy is here to get help with the skript, not minecraft commands like /fill
After I putted the skript on my server I was not anymore able to place or destroy blocks
Yeah, well, do you want to allow only those with certain permissions to break and place blocks outside of the 100x100? add a condition...
https://skripthub.net/docs/?id=1161
I want that like everybody can build and destroy there blocks
but just there and not on the spawn
and when I write !mapReset(me) I write it in the chat
is there a way to change it
you could use a periodic event
https://skripthub.net/docs/?id=2050
I really dont know how to add the periodical
every X hours:
mapReset()
Just remove "p:player" from the function
It worked half
like now the box is completly empty
the grass and stone(ore) got cleard too and not send back
:/