#map reset

1 messages · Page 1 of 1 (latest)

nimble zealot
#

@true charm

#

Maybe u Can help

sharp nacelle
#

add the placed blocks to a list

#

then set to air

nimble zealot
#

how do i do that @sharp nacelle im new to skript

sharp nacelle
#

then look at some tutorials

#

there are some for lists

nimble zealot
#

?

#

please just help me

#

@sharp nacelle

sharp nacelle
#

do you want help or spoon feeding

#

i wont do the later

nimble zealot
#

spoon feeding

sharp nacelle
#

well too bad

#

thats a waste of time for both of us

nimble zealot
#

💀

#

bruh

sharp nacelle
#

bruh

#

you have to do it yourself so you can learn and fix future issues or take on more complex projects

prime zinc
#

@nimble zealot like this?

#Lines containing "#|" they can be removed, they are just a decorative effect.

function clearBlocks():
    loop {serverBlocks::*}:
        #|add 1 to {_n}
        set block at loop-value to air
        #|wait 1 tick if (mod({_n}, 10) = 0)
    delete {serverBlocks::*}
    #|send "&aThe map was reset." to all players


on block place:
    add block's location to {serverBlocks::*}


on block break:
    if {serverBlocks::*} doesn't contain block's location:
        cancel event
        #|send "&cYou can only break blocks that have been placed by other players." to player
        stop
    remove block's location from {serverBlocks::*}
sharp nacelle
#

why are you spoon feeding

prime zinc
#

For you it's "spoon feeding", for me it's just a code example. ¯_(ツ)_/¯

sharp nacelle
#

its both

#

spoon feeding is anything that someone with 2 braincells can use by copy-pasting

nimble zealot
#

YES OMG TY

#

Do you know how i Can make it reser Every 2 hours?

#

Do you know how i Can reset blocks just in a specific area?

#

@prime zinc

sharp nacelle
#

dont ping him

#

try thinking for yourself

#

you could use a peridocial event

#

and check if the blocks are in a certain region, or within 2 locations

prime zinc
nimble zealot
#

the regions name is box

nimble zealot
#

@prime zinc

prime zinc
# nimble zealot the regions name is box

Simple, you check the region like this:

#Lines containing "#|" they can be removed, they are just a decorative effect.

function clearBlocks():
    loop {serverBlocks::*}:
        #|add 1 to {_n}
        set block at loop-value to air
        #|wait 1 tick if (mod({_n}, 10) = 0)
    delete {serverBlocks::*}
    #|send "&aThe map was reset." to all players


on block place:
    #Here I am checking the region:
    region at block = ("box" parsed as region)

    add block's location to {serverBlocks::*}


on block break:
    #Here I am checking the region:
    region at block = ("box" parsed as region)

    if {serverBlocks::*} doesn't contain block's location:
        cancel event
        #|send "&cYou can only break blocks that have been placed by other players." to player
        stop
    remove block's location from {serverBlocks::*}
nimble zealot
#

how do i get the worldguard thingy'

prime zinc
#

Basically you have two ways to implement it:
1.

    region at block = ("box" parsed as region)
    #YourCodeHere
    if region at block = ("box" parsed as region):
        #YourCodeHere
nimble zealot
#

so can you tell me how i do the full code

#

like how its aligned

prime zinc
#

In my case I use 1. because there is no need for "else:", but if you are going to add an "else:" you should use option 2.

#

#1135223691551195286 message
I already left you the functional code for you to try

nimble zealot
#

how do i get the worldguard thingy

#

@prime zinc

prime zinc
#

The object to see the regions?

#

It depends on your worldguard config.yml

nimble zealot
#

why worldguard cant i use worldedit?

#

@prime zinc

#

how do i select the region

prime zinc
#

WorldGuard takes care of the regions, no worldedit... worldedit only allows you to make the selections.

nimble zealot
#

ohhh ok Ty

#

so if I have a region alr set up named box and I put the skript it will work? @prime zinc

prime zinc
#

In theory it should work, if you already have a region called "box" and use it in your skript, everything should work fine.

nimble zealot
#

and how do I make it reset every 2 hours

#

ok Ty

prime zinc
nimble zealot
#

Ty

#

TY BRO

#

so

#

every 2 hours:

#

What then

prime zinc
#
every X hours:
    clearBlocks()
nimble zealot
#

TY BRO I LOVE U

#

UR THE BEST

prime zinc
#

yw

nimble zealot
#

UR THE BEST BEST

#

Do you know how to make a skript that does like so if u place a shulker then it’s only u that can open it like shulker protection so if someone else placed it then u can’t open it

#

@prime zinc

prime zinc
#

I don't use those versions but I'll give you an example with a chest

nimble zealot
#

alr

prime zinc
#

It would be something like this I guess:

on block place:
    block = chest
    add block's location to {private::%player's uuid%::*}

on block break:
    block = chest
    if {private::%player's uuid%::*} doesn't contain block's location:
        cancel event
        send "&cPrivate!" to player
        stop
    remove block's location from {private::%player's uuid%::*}

on right click:
    clicked block = chest
    if {private::%player's uuid%::*} doesn't contain clicked block's location:
        cancel event
        send "&cPrivate!" to player
nimble zealot
#

ty

nimble zealot
#

@prime zinc the !clearBlocks() doesnt work

prime zinc
nimble zealot
#

i meant when i type !clearBlocks() it dont work

prime zinc
#

Do you have this activated?

nimble zealot
#

dont think so

#

ill check

prime zinc
#

Also remember to enable this option so you don't have to give yourself permission.

nimble zealot
#

nope it wasnt enabled ty

#

alr

#

btw

#

the thing u sent me the private thing it works for shulkers but sometimes it locks you out of your shulker

prime zinc
#

Yes, well, I gave you a simple example... besides, it was in a lower version... let me do another one in the current version.

nimble zealot
#

alr

#

ty

prime zinc
# nimble zealot alr
on block place:
    #region at block = ("myRegion" parsed as region)
    block = any shulker box
    add (block's location) to {private::%player's uuid%::*}
    send "&aThe coordinates &e%block's location% &ahave been saved to your private list."


on block break:
    #region at block = ("myRegion" parsed as region)
    block = any shulker box
    if {private::%player's uuid%::*} doesn't contain (block's location):
        cancel event
        send "Hey! this shulker does not belong to you."
        play sound "BLOCK_NOTE_BLOCK_BELL" with pitch 1.3 to player
        stop
    remove block's location from {private::%player's uuid%::*}
    send "&7The coordinates &e%block's location% &7have been removed from your private list." to player


on right click:
    #region at block = ("myRegion" parsed as region)
    clicked block = any shulker box
    if {private::%player's uuid%::*} doesn't contain (clicked block's location):
        cancel event
        send "Hey! this shulker does not belong to you."
        play sound "BLOCK_NOTE_BLOCK_BELL" with pitch 1.3 to player

It should work, now if I tried it with the shulker box

#

Remove the "#" if you want to check the regions

nimble zealot
#

TY

nimble zealot
prime zinc
#

For example, if you want to prevent shulkers from being placed in mining regions or similar... 🤷‍♂️ idk, there is always the possibility of wanting to check it.

nimble zealot
#

alr

#

Ty

#

@prime zinc

prime zinc
#

your welcome

nimble zealot
#

do you know how to make a plugin that like if you are in the region “afk” and it gives you a gray dye every 15 minutes your in the region, only in the region not outside, like an afk zone

#

@prime zinc

sharp nacelle
#

Yes

#

Dont ping people

#

Wait and be patient

prime zinc
sharp nacelle
#

Just on region enter and a while loop

#

Please dont use a periodical for this

nimble zealot
#

So how do I do the other stuff @prime zinc

#

@prime zinc

prime zinc
#

dude, i'm not going to make you all the codes you need, use your creativity...

sharp nacelle
#

You have to think for yourself

#

If youre solving a puzzle you look at the pieces and figure out where they go, dont ask someone else where to put it

sharp nacelle
nimble zealot
sharp nacelle
nimble zealot
#

@prime zinc so i wrote on region enter: what should i write next to check what region they entered?

#

im kinda confused sorry

#

@true charm think you can help?

true charm
nimble zealot
#

like i want to make a skript but idk what to write next

#

so look

#

i wrote

#

on region enter:

#

how do i check if the reigon is afk

#

the afk region

#

like i want to check when the players goes into the region afk

#

@true charm ????

true charm
#

Later i will make this

nimble zealot
#

alr

#

@true charm i need it NOW asap

#

@sharp nacelle

silk panther
#

bro is pushing the limit even for drcuy

hushed anvil
sharp nacelle
true charm
# nimble zealot <@601704639657934849> think you can help?

Okey! Of curse i can help
First you must set your event https://skripthub.net/docs/
Later check the name of region https://skripthub.net/docs/?id=845 (like in example)
Later add player to variable https://skripthub.net/tutorials/31 (example {afk::%player%}
And in this way you will have checked who is in the afk zone

sharp nacelle
#

why a variable

sharp nacelle
quartz kite
#

set -18,66,37 to -12,58,46 to air Can someone tell me Why this wont work And What would work?

wooden pecan
#

make your own thread or ask in a skript help channel

#

not a 2 month old thread

idle crow
#

omfg stop spoonfeeding

#

make them learn for themselves

#

oh damn this is 2mo old