I have a PVP server and there is an area where people can break blocks and put blocks.
When there are too many transactions in this area, I wrote a Script code to turn this area back to the old one.
Field size: ( 100 x 100 )
The script code is as follows:
But this causes the server to lag too much instantly (TPS drops to 15, instant pings go up to 500)
Other servers have arenas and there is no lag when players clear the arena while playing in the game instantly.
How do they achieve that?
Note: my server is not any VDS problem with 20 gb ram and 18 cpu.
When there are too many transactions in this area, I wrote a Script code to turn this area back to the old one.
Field size: ( 100 x 100 )
The script code is as follows:
command /cleararena:
trigger:
# Hava
make player execute command "//pos1 67,6,-479"
wait 1 tick
make player execute command "//pos2 -80,101,-332"
wait 1 tick
make player execute command "//set 0"
# Yeşil Bölge
make player execute command "//pos1 67,1,-479"
wait 1 tick
make player execute command "//pos2 -6,5,-406"
wait 1 tick
make player execute command "//set 80%%lime_terracotta,20%%green_terracotta"
# Kırmızı Bölge
make player execute command "//pos1 -7,5,-406"
wait 1 tick
make player execute command "//pos2 -80,1,-479"
wait 1 tick
make player execute command "//set 80%%red_terracotta,20%%black_terracotta"
# Mavi Bölge
make player execute command "//pos1 -7,5,-405"
wait 1 tick
make player execute command "//pos2 -80,1,-332"
wait 1 tick
make player execute command "//set 80%%light_blue_concrete,20%%blue_concrete"
# Beyaz Bölge
make player execute command "//pos1 -6,5,-405"
wait 1 tick
make player execute command "//pos2 67,1,-332"
wait 1 tick
make player execute command "//set 80%%light_gray_concrete,20%%white_concrete"
But this causes the server to lag too much instantly (TPS drops to 15, instant pings go up to 500)
Other servers have arenas and there is no lag when players clear the arena while playing in the game instantly.
How do they achieve that?
Note: my server is not any VDS problem with 20 gb ram and 18 cpu.