mirricraft-skript/mirricraft-kitpvp.sk

240 lines
11 KiB
Plaintext
Raw Permalink Normal View History

2023-04-26 14:44:54 +00:00
#--------------------------------------------------
#
# MIRRICRAFT
# by Christer Warén / Warén Group
#
#--------------------------------------------------
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's name%.map} is set:
if {kitpvp.%player's name%.map} is "winter":
2020-10-24 07:29:45 +00:00
format slot 12 of player with compass named "&fKartta" with lore "Talvi" to close then run [execute player command "/kitpvp setmap"]
if {kitpvp.%player's name%.map} is "nether":
2020-10-24 07:29:45 +00:00
format slot 12 of player with compass named "&fKartta" with lore "Horna" to close then run [execute player command "/kitpvp setmap"]
if {kitpvp.%player's name%.map} is "farm":
2020-10-24 07:29:45 +00:00
format slot 12 of player with compass named "&fKartta" with lore "Farmi" to close then run [execute player command "/kitpvp setmap"]
2020-10-24 07:03:58 +00:00
else:
2020-10-24 07:29:45 +00:00
format slot 12 of player with compass named "&fKartta" to close then run [execute player command "/kitpvp setmap"]
2020-10-24 07:03:58 +00:00
if {kitpvp.%player's name%.kit} is set:
if {kitpvp.%player's name%.kit} is "soldier":
2020-10-24 07:29:45 +00:00
format slot 14 of player with iron chestplate named "&fKitit" with lore "Sotilas" to close then run [execute player command "/kitpvp setkit"]
if {kitpvp.%player's name%.kit} is "speedster":
2020-10-28 00:34:11 +00:00
format slot 14 of player with iron chestplate named "&fKitit" with lore "Vauhtihirmu" to close then run [execute player command "/kitpvp setkit"]
if {kitpvp.%player's name%.kit} is "archer":
2020-10-28 00:51:41 +00:00
format slot 14 of player with iron chestplate named "&fKitit" with lore "Jousimies" to close then run [execute player command "/kitpvp setkit"]
2020-10-24 07:03:58 +00:00
else:
2020-10-24 07:29:45 +00:00
format slot 14 of player with iron chestplate named "&fKitit" to close then run [execute player command "/kitpvp setkit"]
2020-10-24 07:03:58 +00:00
if {kitpvp.%player's name%.started} is set:
2020-10-24 09:08:29 +00:00
format slot 27 of player with barrier named "&fLopeta" to close then run [execute player command "/kitpvp end"]
else:
if {kitpvp.%player's name%.map} and {kitpvp.%player's name%.kit} is set:
2020-10-24 09:08:29 +00:00
format slot 35 of player with nether star named "&fAloita" to close then run [execute player command "/kitpvp start"]
2020-10-24 07:03:58 +00:00
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"]
2020-10-24 09:08:29 +00:00
format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp setmap farm"]
2020-10-24 07:03:58 +00:00
else:
if arg-2 is "winter":
set {kitpvp.%player's name%.map} to "winter"
2020-10-24 09:08:29 +00:00
make player execute command "/kitpvp"
2020-10-24 07:03:58 +00:00
stop
if arg-2 is "nether":
set {kitpvp.%player's name%.map} to "nether"
2020-10-24 09:08:29 +00:00
make player execute command "/kitpvp"
2020-10-24 07:03:58 +00:00
stop
if arg-2 is "farm":
set {kitpvp.%player's name%.map} to "farm"
2020-10-24 09:08:29 +00:00
make player execute command "/kitpvp"
2020-10-24 07:03:58 +00:00
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
2020-10-28 00:20:02 +00:00
format slot 11 of player with iron sword named "&fSotilas" to close then run [execute player command "/kitpvp setkit soldier"]
format slot 13 of player with gold boots named "&fVauhtihirmu" to close then run [execute player command "/kitpvp setkit speedster"]
2020-10-28 00:54:27 +00:00
format slot 15 of player with bow named "&fJousimies" to close then run [execute player command "/kitpvp setkit archer"]
2020-10-24 07:03:58 +00:00
stop
else:
if arg-2 is "soldier":
set {kitpvp.%player's name%.kit} to "soldier"
2020-10-24 09:08:29 +00:00
make player execute command "/kitpvp"
2020-10-28 00:22:10 +00:00
stop
if arg-2 is "speedster":
set {kitpvp.%player's name%.kit} to "speedster"
2020-10-28 00:22:10 +00:00
make player execute command "/kitpvp"
2020-10-24 07:03:58 +00:00
stop
2020-10-28 00:51:41 +00:00
if arg-2 is "archer":
set {kitpvp.%player's name%.kit} to "archer"
2020-10-28 00:51:41 +00:00
make player execute command "/kitpvp"
stop
2020-10-24 07:03:58 +00:00
stop
else if arg-1 is "start":
2020-10-24 09:08:29 +00:00
set gamemode of player to Survival
remove all items from player
if {kitpvp.%player's name%.kit} is set:
if {kitpvp.%player's name%.kit} is "soldier":
2020-10-24 07:35:43 +00:00
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
2020-10-28 00:40:21 +00:00
set slot 0 of player's inventory to 1 of iron sword
if {kitpvp.%player's name%.kit} is "speedster":
2020-10-28 00:20:02 +00:00
set player's helmet to gold helmet
set player's chestplate to gold chestplate
set player's leggings to gold leggings
set player's boots to gold boots
2020-10-29 15:17:02 +00:00
set the player's walk speed to 0.4
2020-10-28 00:40:21 +00:00
set slot 0 of player's inventory to 1 of gold sword
if {kitpvp.%player's name%.kit} is "archer":
2020-10-29 15:17:02 +00:00
set player's helmet to chainmail helmet
set player's chestplate to chainmail chestplate
set player's leggings to chainmail leggings
set player's boots to chainmail boots
2020-10-28 00:51:41 +00:00
set slot 0 of player's inventory to 1 of bow
2020-10-28 01:06:30 +00:00
set slot 9 of player's inventory to 25 of spectral arrow
2020-10-24 07:29:45 +00:00
else:
make player execute command "/kitpvp"
if {kitpvp.%player's name%.map} is set:
if {kitpvp.%player's name%.map} is "winter":
2020-10-24 09:08:29 +00:00
teleport player to location -48, 6, 264
else if {kitpvp.%player's name%.map} is "nether":
2020-10-24 09:08:29 +00:00
teleport player to location 73, 4, 269
else if {kitpvp.%player's name%.map} is "farm":
2020-10-29 15:17:02 +00:00
teleport player to location 57, 5, 357
2020-10-24 07:29:45 +00:00
else:
make player execute command "/kitpvp"
if {kitpvp.%player's name%.started} is not set:
2020-10-24 09:08:29 +00:00
heal the player
set {kitpvp.%player's name%.started} to true
2020-10-24 09:08:29 +00:00
stop
else if arg-1 is "end":
remove all items from player
clear {kitpvp.%player's name%.started}
2023-04-23 15:24:30 +00:00
teleport player to spawn of "%player's world%"
2020-10-24 07:03:58 +00:00
stop
else:
stop
stop
else:
stop
2020-10-24 03:31:01 +00:00
on join:
if player's world is "minigames":
2023-04-23 15:24:30 +00:00
teleport player to spawn of "%player's world%"
2020-10-24 04:33:04 +00:00
remove all items from player
2020-10-28 00:20:02 +00:00
set the player's walk speed to 0.2
set slot 7 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-28 00:20:02 +00:00
set slot 7 of player's inventory to 1 of chest named "&fKitPVP"
2020-10-24 03:31:01 +00:00
stop
2020-10-28 23:34:37 +00:00
on death:
2023-04-23 15:24:30 +00:00
if victim's world is "minigames":
remove all items from victim
set the victim's walk speed to 0.2
clear {kitpvp.%victim%.started}
2020-10-28 23:34:37 +00:00
clear drops
2020-10-24 04:33:04 +00:00
on quit:
if player's world is "minigames":
remove all items from player
clear {kitpvp.%player's name%.started}
2020-10-24 04:33:04 +00:00
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"
2024-03-26 21:27:40 +00:00
cancel event
2020-10-24 03:31:01 +00:00
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"
2024-03-26 21:27:40 +00:00
cancel event
2020-10-24 03:31:01 +00:00
wait 2 tick
on inventory click:
if player's world is "minigames":
if event-item is chest named "&fKitPVP":
2024-03-26 21:27:40 +00:00
cancel event
2020-10-24 03:31:01 +00:00
on drop:
if player's world is "minigames":
if event-item is chest named "&fKitPVP":
2024-03-26 21:27:40 +00:00
cancel event
2020-10-24 03:31:01 +00:00
on pickup:
if player's world is "minigames":
if event-item is chest named "&fKitPVP":
2024-03-26 21:27:40 +00:00
cancel event
2020-10-24 03:31:01 +00:00
2020-10-28 00:28:53 +00:00
on break:
if player's world is "minigames":
if {kitpvp.%player's name%.started} is set:
2020-10-28 00:28:53 +00:00
cancel event
2020-10-28 14:33:48 +00:00
on block damage:
if player's world is "minigames":
if {kitpvp.%player's name%.started} is set:
2020-10-28 14:33:48 +00:00
cancel event
2020-10-28 14:53:38 +00:00
on item damage:
2020-10-28 00:28:53 +00:00
if player's world is "minigames":
if {kitpvp.%player's name%.started} is set:
2020-10-28 00:28:53 +00:00
cancel event
2020-10-24 09:08:29 +00:00
on region exit:
if player's world is "minigames":
wait 1 tick
if "%event-region%" contains "minigames_kitpvp_":
remove all items from player
2020-10-28 00:20:02 +00:00
set the player's walk speed to 0.2
clear {kitpvp.%player's name%.started}
2020-10-27 23:58:38 +00:00
on hunger meter change:
if player's world is "minigames":
wait 1 tick
2023-04-26 14:44:54 +00:00
feed the player