-
Notifications
You must be signed in to change notification settings - Fork 5
/
events.sk
194 lines (163 loc) · 6.44 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
command /now:
trigger:
message "%now%"
command /event:
trigger:
message "&8[&dEvent&8] &7Next event in &e%{event.next}% minutes"
command /eventnow:
permission: is.Pluto
trigger:
set {event.next} to 0
every minute:
if {event.next} <= 0:
set {event.next} to 45
set {_players} to 0
loop all players:
add 1 to {_players}
if {_players} < 13:
stop
set {_i} to random integer from 4 to 5
if {_i} is 1:
delete {oitc::*}
set {event.name} to "OITC"
set {event.minutes} to 10
broadcast "&8[&dEvent&8] &6Serverwide Event&7: &fOne In The Chamber Event"
broadcast " &6Prize&7: &f3 Radioactive Keys"
broadcast " &6Duration&7: &f10 minutes"
broadcast " &6Join&7: &b/oitc"
else if {_i} is 2:
delete {blockparty::*}
set {event.name} to "blockparty"
set {event.minutes} to 6
broadcast "&8[&dEvent&8] &6Serverwide Event&7: &fBlockParty"
broadcast " &6Prize&7: &a$10,000,000"
broadcast " &6Duration&7: &f6 minutes"
broadcast " &6Join&7: &b/blockparty"
else if {_i} is 3:
delete {kitpvp.event.kills::*}
delete {kitpvp.points::*}
loop players in world "FortCraft":
teleport loop-player to {pos::kitpvp}
clear loop-player's inventory
heal loop-player
set {event.name} to "kitpvp"
set {event.minutes} to 20
set {fortnite.storm.width} to 100
broadcast "&8[&dEvent&8] &6Serverwide Event&7: &fKitPvP"
broadcast " &6Prize&7: &a6 Valentines Keys"
broadcast " &6Duration&7: &f20 minutes"
broadcast " &6Join&7: &b/kitpvp"
else if {_i} is 4 or 5:
loop players in world "FortCraft":
teleport loop-player to {pos::kitpvp}
clear loop-player's inventory
heal loop-player
set {event.name} to "bedwars"
set {event.minutes} to 1
broadcast "&8[&dEvent&8] &6Serverwide Event&7: &fBEDWARS"
broadcast " &6Prize&7: &a$20,000,000 &7(Split between winners)"
broadcast " &6Duration&7: &f1 Minute To Join"
broadcast " &6Join&7: &b/bw"
set {_barFill} to {event.minutes} * 13
create bossbar titled "&6Event &e%{event.name}% &3%{event.minutes}% Minutes &d/%{event.name}%" and id "event" for all players with value {_barFill} with colors YELLOW with style SEGMENTED_6
else:
subtract 1 from {event.next}
every minute:
if {event.minutes} is set:
subtract 1 from {event.minutes}
if {event.minutes} <= 0:
remove bossbar "event"
delete {event.minutes}
if {event.name} = "OITC":
loop {oitc::*}:
add 1 to {_size}
if {_low.to.high.list::%loop-value%} is not set:
set {_low.to.high.list::%loop-value%} to loop-index
else:
set {_n} to 0
loop {_size} times:
set {_n} to {_n}+1
{_low.to.high.list::%loop-value-1%.%{_n}%} is not set
set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
stop loop
wait 1 tick
set {_n} to size of {_low.to.high.list::*}
loop {_low.to.high.list::*}:
set {_high.to.low.list::%{_n}%} to loop-value
set {_n} to {_n}-1
loop {_high.to.low.list::*}:
set {_winner} to "%{uuidName::%loop-value%}%"
if {_winner} is set:
# OITC Prize
add 3 to {redeem.crate::%{_winner}%::radioactive}
send "&8[&dEvent&8] &aYou Won the Event! Type &b/rc &alater to get your keys." to {_winner} parsed as player
delete {oitc::*}
stop loop
broadcast "&8[&dEvent&8] &cServerwide Event Ended"
broadcast " &cPrize&7: &a3 Radioactive Keys"
broadcast " &cWinner&7: &f%{_winner}%"
else if {event.name} = "blockparty":
loop {blockparty::*}:
add 1 to {_size}
if {_low.to.high.list::%loop-value%} is not set:
set {_low.to.high.list::%loop-value%} to loop-index
else:
set {_n} to 0
loop {_size} times:
set {_n} to {_n}+1
{_low.to.high.list::%loop-value-1%.%{_n}%} is not set
set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
stop loop
wait 1 tick
set {_n} to size of {_low.to.high.list::*}
loop {_low.to.high.list::*}:
set {_high.to.low.list::%{_n}%} to loop-value
set {_n} to {_n}-1
loop {_high.to.low.list::*}:
set {_winner} to "%{uuidName::%loop-value%}%"
if {_winner} is set:
# blockparty Prize
execute console command "eco give %{_winner}% 10000000"
send "&8[&dEvent&8] &aYou Won the Event!" to {_winner} parsed as player
delete {blockparty::*}
stop loop
broadcast "&8[&dEvent&8] &cServerwide Event Ended"
broadcast " &cPrize&7: &a$10,000,000"
broadcast " &cWinner&7: &f%{_winner}%"
else if {event.name} = "kitpvp":
loop {kitpvp.event.kills::*}:
add 1 to {_size}
if {_low.to.high.list::%loop-value%} is not set:
set {_low.to.high.list::%loop-value%} to loop-index
else:
set {_n} to 0
loop {_size} times:
set {_n} to {_n}+1
{_low.to.high.list::%loop-value-1%.%{_n}%} is not set
set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
stop loop
wait 1 tick
set {_n} to size of {_low.to.high.list::*}
loop {_low.to.high.list::*}:
set {_high.to.low.list::%{_n}%} to loop-value
set {_n} to {_n}-1
loop {_high.to.low.list::*}:
set {_winner} to "%{uuidName::%loop-value%}%"
if {_winner} is set:
# kitpvp Prize
add 6 to {redeem.crate::%{_winner}%::Valentines}
send "&8[&dEvent&8] &aYou Won the Event! Type &b/rc &alater to get your keys." to {_winner} parsed as player
delete {kitpvp.event.kills::*}
stop loop
broadcast "&8[&dEvent&8] &cServerwide Event Ended"
broadcast " &cPrize&7: &a3 Valentines Keys"
broadcast " &cWinner&7: &f%{_winner}%"
else:
set {_barFill} to {event.minutes} * 10
create bossbar titled "&6Event &e%{event.name}% &3%{event.minutes}% Minutes &d/%{event.name}%" and id "event" for all players with value {_barFill} with colors YELLOW with style SEGMENTED_6
on command:
if player is in world "Events":
if player does not have permission "is.Pluto":
if command contains "auc" or "echest" or "eechest" or "fish" or "mf" or "eec" or "kit" or "fly" or "ender" or "auction" or "setwarp" or "ah" or "auctionhouse" or "shop" or "pack" or "packs" or "ec" or "enderchest" or "heal" or "feed" or "tp" or "setwarp" or "sethome":
cancel event
message "&8[&fChristmas&8] &7You can't use that command here!"