#Map reset

1 messages · Page 1 of 1 (latest)

ebon cosmos
#

That Like every randomkit or boxpvp Server has does someone know the Skript for a map reset?

sudden pine
#

Something like resetting all blocks placed by players every X hours? and allow players to break only blocks placed by players.

ebon cosmos
#

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)

sudden pine
# ebon cosmos not exactly like that so you are like in a box 100x100 and you can build and des...

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)
#

It doesn't make sense, the guy is here to get help with the skript, not minecraft commands like /fill

ebon cosmos
sudden pine
ebon cosmos
#

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

sudden pine
ebon cosmos
#

I really dont know how to add the periodical

sudden pine
#
every X hours:
    mapReset()

Just remove "p:player" from the function

ebon cosmos
#

It worked half

#

like now the box is completly empty

#

the grass and stone(ore) got cleard too and not send back

ebon cosmos
#

:/

cold crow
#

uh

#

do you know how to skript