-
Notifications
You must be signed in to change notification settings - Fork 0
/
Events
43 lines (32 loc) · 1.29 KB
/
Events
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
# code by MonkeDFA, give credit!
on load:
set {eventcore.%server%::eventopen} to 0
command /events <text> [<text>]:
trigger:
if arg-1 is set:
if arg-1 is "join":
if {eventcore.%server%::eventopen} is 1:
execute console command "mvtp %player% event"
send " &c&l[MonkeSkript] &aYou have joined event world!"
else if {eventcore.%server%::eventopen} is 0:
send "&c&l[MonkeSkript] Practice world is not open!"
if arg-1 is "open":
if player has permission "event.admin":
if {eventcore.%server%::eventopen} is 0:
send " &c&l[MonkeSkript] &a&lYou have successfully opened the event!"
set {eventcore.%server%::eventopen} to 1
if arg-1 is "close":
if player has permission "event.admin":
if {eventcore.%server%::eventopen} is 1:
send " &l&c[MonkeSkript] &aYou have successfully closed the event!"
set {eventcore.%server%::eventopen} to 0
if arg-1 is "bc":
if player has permission "event.admin":
broadcast " &c&l[MonkeSkript] %arg-2%"
if arg-1 is "tp":
if player has permission "event.admin":
loop all players:
if "%region at loop-player%" contains "eventspawn":
if command sender is player:
teleport loop-player to sender
send "&c&lYou have teleported all players in the event spawn to you!" to sender