From 08a3a6090f3a646882aa40d6b90e34509f9ed7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 24 Oct 2020 12:08:29 +0300 Subject: [PATCH] KitPVP Update 10 --- mirricraft-kitpvp.sk | 52 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/mirricraft-kitpvp.sk b/mirricraft-kitpvp.sk index 1fa6d54..bb5ccb6 100644 --- a/mirricraft-kitpvp.sk +++ b/mirricraft-kitpvp.sk @@ -28,8 +28,11 @@ command /kitpvp [] []: else: format slot 14 of player with iron chestplate named "&fKitit" to close then run [execute player command "/kitpvp setkit"] - if {kitpvp.%player%.map} and {kitpvp.%player%.kit} is set: - format slot 35 of player with nether star named "&fAloita" to close then run [execute player command "/kitpvp start"] + if {kitpvp.%player%.started} is set: + format slot 27 of player with barrier named "&fLopeta" to close then run [execute player command "/kitpvp end"] + else: + if {kitpvp.%player%.map} and {kitpvp.%player%.kit} is set: + format slot 35 of player with nether star named "&fAloita" to close then run [execute player command "/kitpvp start"] stop else: @@ -45,16 +48,19 @@ command /kitpvp [] []: format slot 11 of player with snow block named "&fTalvi" to close then run [execute player command "/kitpvp setmap winter"] format slot 13 of player with netherrack named "&fHorna" to close then run [execute player command "/kitpvp setmap nether"] - format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp map farm"] + format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp setmap farm"] else: if arg-2 is "winter": set {kitpvp.%player%.map} to "winter" + make player execute command "/kitpvp" stop if arg-2 is "nether": set {kitpvp.%player%.map} to "nether" + make player execute command "/kitpvp" stop if arg-2 is "farm": set {kitpvp.%player%.map} to "farm" + make player execute command "/kitpvp" stop stop else if arg-1 is "setkit": @@ -68,33 +74,48 @@ command /kitpvp [] []: format slot 11 of player with iron helmet named "&fSotilas" to close then run [execute player command "/kitpvp setkit soldier"] #format slot 13 of player with netherrack named "&fHorna" to close then run [execute player command "/kitpvp setmap nether"] - #format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp map farm"] + #format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp setmap farm"] stop else: if arg-2 is "soldier": - set {kitpvp.%player%.kit} to "soldier" + set {kitpvp.%player%.kit} to "soldier" + make player execute command "/kitpvp" stop stop else if arg-1 is "start": + + set gamemode of player to Survival + remove all items from player + if {kitpvp.%player%.kit} is set: if {kitpvp.%player%.kit} is "soldier": set player's helmet to iron helmet set player's chestplate to iron chestplate set player's leggings to iron leggings set player's boots to iron boots + set slot 1 of player's inventory to 1 of iron sword else: make player execute command "/kitpvp" if {kitpvp.%player%.map} is set: if {kitpvp.%player%.map} is "winter": - teleport player to -48, 6, 264 - if {kitpvp.%player%.map} is "nether": - teleport player to 73, 4, 269 - if {kitpvp.%player%.map} is "farm": - teleport player to 57, 4, 357 + teleport player to location -48, 6, 264 + else if {kitpvp.%player%.map} is "nether": + teleport player to location 73, 4, 269 + else if {kitpvp.%player%.map} is "farm": + teleport player to location 57, 4, 357 else: make player execute command "/kitpvp" + if {kitpvp.%player%.started} is not set: + heal the player + + set {kitpvp.%player%.started} to true + stop + else if arg-1 is "end": + remove all items from player + clear {kitpvp.%player%.started} + teleport player to world "%player's world%" stop else: stop @@ -117,7 +138,7 @@ on respawn: on quit: if player's world is "minigames": remove all items from player - clear {kitpvp.%player%} + clear {kitpvp.%player%.started} stop on leftclick: @@ -151,4 +172,11 @@ on pickup: on death: if player's world is "minigames": - clear drops \ No newline at end of file + clear drops + +on region exit: + if player's world is "minigames": + wait 1 tick + if "%event-region%" contains "minigames_kitpvp_": + remove all items from player + clear {kitpvp.%player%.started} \ No newline at end of file