2020-10-24 03:31:01 +00:00
|
|
|
# --- KitPVP ---
|
2020-10-24 07:10:45 +00:00
|
|
|
command /kitpvp [<string>] [<string>]:
|
2020-10-24 07:03:58 +00:00
|
|
|
description: Spawn
|
|
|
|
executable by: players
|
|
|
|
trigger:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if arg-1 is not set:
|
|
|
|
wait 2 tick
|
|
|
|
open chest inventory with 4 row named "KitPVP" to player
|
|
|
|
wait 2 tick
|
|
|
|
|
|
|
|
loop integers between 0 and 35:
|
|
|
|
format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable
|
|
|
|
|
|
|
|
if {kitpvp.%player%.map} is set:
|
|
|
|
if {kitpvp.%player%.map} is "winter":
|
|
|
|
format slot 11 of player with compass named "&fKartta" with lore "Talvi" to close then run [execute player command "/kitpvp setmap"]
|
|
|
|
if {kitpvp.%player%.map} is "nether":
|
|
|
|
format slot 11 of player with compass named "&fKartta" with lore "Horna" to close then run [execute player command "/kitpvp setmap"]
|
|
|
|
if {kitpvp.%player%.map} is "farm":
|
|
|
|
format slot 11 of player with compass named "&fKartta" with lore "Farmi" to close then run [execute player command "/kitpvp setmap"]
|
|
|
|
else:
|
|
|
|
format slot 11 of player with compass named "&fKartta" to close then run [execute player command "/kitpvp setmap"]
|
|
|
|
|
|
|
|
if {kitpvp.%player%.kit} is set:
|
|
|
|
if {kitpvp.%player%.kit} is "soldier":
|
|
|
|
format slot 13 of player with kit named "&fKitit" with lore "Sotilas" to close then run [execute player command "/kitpvp setkit"]
|
|
|
|
else:
|
|
|
|
format slot 13 of player with kit 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"]
|
|
|
|
|
|
|
|
stop
|
|
|
|
else:
|
|
|
|
if arg-1 is "setmap":
|
|
|
|
if arg-2 is not set:
|
|
|
|
|
|
|
|
wait 2 tick
|
|
|
|
open chest inventory with 4 row named "KitPVP - Valitse kartta" to player
|
|
|
|
wait 2 tick
|
|
|
|
|
|
|
|
loop integers between 0 and 35:
|
|
|
|
format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable
|
|
|
|
|
|
|
|
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"]
|
|
|
|
else:
|
|
|
|
if arg-2 is "winter":
|
|
|
|
set {kitpvp.%player%.map} to "winter"
|
|
|
|
stop
|
|
|
|
if arg-2 is "nether":
|
|
|
|
set {kitpvp.%player%.map} to "nether"
|
|
|
|
stop
|
|
|
|
if arg-2 is "farm":
|
|
|
|
set {kitpvp.%player%.map} to "farm"
|
|
|
|
stop
|
|
|
|
stop
|
|
|
|
else if arg-1 is "setkit":
|
|
|
|
if arg-2 is not set:
|
|
|
|
wait 2 tick
|
|
|
|
open chest inventory with 4 row named "KitPVP - Valitse kitti" to player
|
|
|
|
wait 2 tick
|
|
|
|
|
|
|
|
loop integers between 0 and 35:
|
|
|
|
format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable
|
|
|
|
|
|
|
|
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"]
|
|
|
|
stop
|
|
|
|
else:
|
|
|
|
if arg-2 is "soldier":
|
|
|
|
set {kitpvp.%player%.kit} to "soldier"
|
|
|
|
stop
|
|
|
|
stop
|
|
|
|
else if arg-1 is "start":
|
|
|
|
stop
|
|
|
|
else:
|
|
|
|
stop
|
|
|
|
|
|
|
|
stop
|
|
|
|
else:
|
|
|
|
stop
|
|
|
|
|
2020-10-24 03:31:01 +00:00
|
|
|
on join:
|
|
|
|
if player's world is "minigames":
|
2020-10-24 04:33:04 +00:00
|
|
|
remove all items from player
|
2020-10-24 07:06:18 +00:00
|
|
|
set slot 0 of player's inventory to 1 of chest named "&fKitPVP"
|
2020-10-24 03:31:01 +00:00
|
|
|
stop
|
|
|
|
|
|
|
|
on respawn:
|
|
|
|
if player's world is "minigames":
|
2020-10-24 07:06:18 +00:00
|
|
|
set slot 0 of player's inventory to 1 of chest named "&fKitPVP"
|
2020-10-24 03:31:01 +00:00
|
|
|
stop
|
|
|
|
|
2020-10-24 04:33:04 +00:00
|
|
|
on quit:
|
|
|
|
if player's world is "minigames":
|
|
|
|
remove all items from player
|
|
|
|
stop
|
|
|
|
|
2020-10-24 03:31:01 +00:00
|
|
|
on leftclick:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if event-item is chest named "&fKitPVP":
|
2020-10-24 07:10:45 +00:00
|
|
|
make player execute command "/kitpvp"
|
2020-10-24 03:31:01 +00:00
|
|
|
cancel the event
|
|
|
|
wait 2 tick
|
|
|
|
|
|
|
|
on rightclick:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if event-item is chest named "&fKitPVP":
|
2020-10-24 07:10:45 +00:00
|
|
|
make player execute command "/kitpvp"
|
2020-10-24 03:31:01 +00:00
|
|
|
cancel the event
|
|
|
|
wait 2 tick
|
|
|
|
|
|
|
|
on inventory click:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if event-item is chest named "&fKitPVP":
|
|
|
|
cancel the event
|
|
|
|
|
|
|
|
on drop:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if event-item is chest named "&fKitPVP":
|
|
|
|
cancel the event
|
|
|
|
|
|
|
|
on pickup:
|
|
|
|
if player's world is "minigames":
|
|
|
|
if event-item is chest named "&fKitPVP":
|
|
|
|
delete event-entity
|
|
|
|
|
|
|
|
on death:
|
|
|
|
if player's world is "minigames":
|
|
|
|
clear drops
|