intégration deacoudre à la commande /party

This commit is contained in:
Mylloon 2021-06-28 14:04:44 +02:00
parent 2b86363c28
commit 4b59075402
2 changed files with 27 additions and 23 deletions

View file

@ -2,36 +2,37 @@ command deacoudre: # lancement de la partie
executable by: players
description: Lance une partie de dé à coudre.
trigger:
if player is op:
if {party.player.%uuid of player%} is set:
if {thimble} is true:
delete {thimble}
teleport player to location at 101.5, 83, -314 in world "world"
execute player command "fill 103 57 -313 99 57 -305 water"
broadcast "&cPartie de dé à coudre terminée."
set gamemode of all players to creative
loop {party.list::*}:
send "&cPartie de dé à coudre terminée." to loop-value
set gamemode of loop-value to creative
else:
set {thimble} to true
broadcast "&aDémarrage de la partie de dé à coudre !"
loop all players:
teleport loop-player to location at 101.5, 83, -314 in world "world"
set gamemode of loop-player to adventure
feed loop-player
heal loop-player
cure loop-player
loop {party.list::*}:
send "&aDémarrage de la partie de dé à coudre !" to loop-value
teleport loop-value to location at 101.5, 83, -314 in world "world"
set gamemode of loop-value to adventure
feed loop-value
heal loop-value
cure loop-value
else:
send option("errorMessage")
send "&4Tu n'es pas dans une partie."
every 0.5 second in "world": # pose du bloc et téléporatation
if {thimble} is not true:
stop
loop all players:
set action bar of loop-player to "&dEn partie de &lDé à coudre&r&d."
if block at loop-player is water:
set {_xLocationBlock1} to difference between X-location of block at loop-player and 103.5
set {_xLocationBlock2} to difference between X-location of block at loop-player and 99.5
set {_zLocationBlock1} to difference between Z-location of block at loop-player and -312.5
set {_zLocationBlock2} to difference between Z-location of block at loop-player and -304.5
set {_yLocationBlock} to difference between Y-location of block at loop-player and 57.5
loop {party.list::*}:
set action bar of loop-value to "&dEn partie de &lDé à coudre&r&d."
if block at loop-value is water:
set {_xLocationBlock1} to difference between X-location of block at loop-value and 103.5
set {_xLocationBlock2} to difference between X-location of block at loop-value and 99.5
set {_zLocationBlock1} to difference between Z-location of block at loop-value and -312.5
set {_zLocationBlock2} to difference between Z-location of block at loop-value and -304.5
set {_yLocationBlock} to difference between Y-location of block at loop-value and 57.5
if {_xLocationBlock1} and {_xLocationBlock2} and {_zLocationBlock1} and {_zLocationBlock2} <= 0:
continue
if {_xLocationBlock1} and {_xLocationBlock2} >= 4:
@ -40,7 +41,7 @@ every 0.5 second in "world": # pose du bloc et téléporatation
continue
if {_zLocationBlock1} and {_zLocationBlock2} >= 8:
continue
set block at loop-player to wool
teleport loop-player to location at 101.5, 83, -314 in world "world"
feed loop-player
heal loop-player
set block at loop-value to wool
teleport loop-value to location at 101.5, 83, -314 in world "world"
feed loop-value
heal loop-value

View file

@ -31,6 +31,7 @@ command party [<player>] [<text>]: # commande party
send "%player%&c a quitté la partie." to loop-value
remove player from {party.list::*}
send "&cTu as quitté la partie."
stop
else:
send "&4Tu n'es pas dans la partie."
stop
@ -50,6 +51,8 @@ command party [<player>] [<text>]: # commande party
if arg-2 is "delete":
if player is {party.creator}:
if {party} is set:
if {thimble} is true:
execute player command "deacoudre"
loop {party.list::*}:
delete {party.player.%uuid of loop-value%}
send "&cPartie supprimée." to loop-value