diff --git a/deacoudre.sk b/deacoudre.sk index f42135b..3b53f4c 100644 --- a/deacoudre.sk +++ b/deacoudre.sk @@ -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 diff --git a/party.sk b/party.sk index 0a99ebe..ca93e46 100644 --- a/party.sk +++ b/party.sk @@ -31,6 +31,7 @@ command party [] []: # 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 [] []: # 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