-
Notifications
You must be signed in to change notification settings - Fork 0
/
-squidgame-events.sk
66 lines (56 loc) · 2.24 KB
/
-squidgame-events.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on join:
checkGameSettings(player) = true
yaml value "BungeeCord" from "config" is true #faire ce check dans checkgamesettings?
joinSquidgame(player)
on quit:
{squidgame::status} is "queue" or "game"
metadata "status" of player is "game" or "queue"
set quit message to ""
leaveSquidgame(player)
on weather change:
{squidgame::status} is not "game"
clear weather
on hunger level change:
metadata "status" of player is set
cancel event
on break:
metadata "status" of player is set
cancel event
on place:
metadata "status" of player is set
cancel event
on damage:
if metadata "status" of attacker is "queue" or "spectator":
cancel event
else if metadata "status" of victim is "queue" or "spectator":
cancel event
on death of player:
{squidgame::status} is "game"
metadata "status" of victim is "game"
set death message to ""
if attacker is a player:
set {_message} to yml value "Message_PlayerEliminatedByPlayer" from "messages"
replace all "{VICTIM}" in {_message} with "%victim%"
replace all "{ATTACKER}" in {_message} with "%attacker%"
else:
set {_message} to yml value "Message_PlayerEliminated" from "messages"
replace all "{VICTIM}" in {_message} with "%victim%"
send "%yml value "Message_Logo" from "messages"% %{_message}% &f(&c%size of {squidgame::players::*}%&f/&c%yml value "Maximum_Player" from "config"%&f)" to {squidgame::players::*}
set metadata "status" of victim to "spectator"
force the victim to respawn
on respawn:
if {squidgame::status} is "game":
set {_loc} to metadata "location" of player
teleport player to location(x-coordinate of {_loc}, y-coordinate of {_loc}+10, z-coordinate of {_loc}, world("%world of player%"))
killPlayer(player)
else:
teleport player to {squidgame::mainLobby}
#on TabComplete:
# if event-string contains "/squidgame":
# if player has permission "%yml value "Permission_Squidgame" from "config%":
# add "join" to completions
# add "quit" to completions
# add "setdormlobby" to completions
# else:
# add "join" to completions
# add "quit" to completions