-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvoting.dsc
636 lines (617 loc) · 42.1 KB
/
voting.dsc
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
voting_worlds:
type: data
debug: false
worlds:
- s1
- theendkek
- newnether
- s2
- spawn
- s3
- s3_nether
voting_prizes:
type: data
debug: false
prizes:
rare:
- Flytime_15-Minutes
- Flytime_10-Minutes
- zc_courage_shell
- zc_power_dust
- shulker_shell
- diamond_block
- iron_block[quantity=5]
- gold_block[quantity=5]
- netherite_scrap[quantity=4]
- experience_bottle[quantity=15]
- trident
- name_tag[quantity=5]
- heart_of_the_sea
- wither_skeleton_skull
- turtle_egg[quantity=10]
- beacon
- nether_star
- netherite_helmet
- netherite_chestplate
- netherite_leggings
- netherite_boots
- netherite_sword
- netherite_axe
- netherite_pickaxe
- turtle_helmet
- budding_amethyst
- spectral_arrow[quantity=256]
- <list[bee|cat|cow|dolphin|donkey|fox|horse|llama|mule|ocelot|panda|parrot|pig|polar_bear|pufferfish|rabbit|sheep|tropical_fish|wolf|axolotl].random>_spawn_egg
- royal_halberd
- bomb_item[quantity=8]
- spore_blossom
- paper[custom_model_data=5000;display_name=Lon Lon Milk Jar;quantity=5]
- paper[custom_model_data=7000;display_name=DCaff95 Plushie]
- paper[custom_model_data=7100;display_name=Mergu Plushie]
- paper[custom_model_data=8400;display_name=EyelessTenshi Plushie]
- paper[custom_model_data=12211;display_name=Froggy Chair]
- paper[custom_model_data=16001;display_name=Drippy Dampe Plushie]
- paper[custom_model_data=16002;display_name=Postman Plushie]
- paper[custom_model_data=16003;display_name=Speckled Man Plushie]
- paper[custom_model_data=16005;display_name=King's Crown]
- paper[custom_model_data=16006;display_name=Loftwing Plushie]
- royal_hoe
- royal_pickaxe
- royal_axe
- royal_shovel
- kass_theme_custom_record
common:
- Flytime_6-Minutes
- zc_study_stone
- zc_soft_iron
- diamond[quantity=2]
- iron_ingot[quantity=10]
- gold_ingot[quantity=10]
- sponge[quantity=10]
- experience_bottle[quantity=8]
- golden_horse_armor
- iron_horse_armor
- diamond_horse_armor
- leather_horse_armor
- name_tag[quantity=2]
- nautilus_shell[quantity=2]
- golden_apple[quantity=5]
- anvil
- enchanting_table
- turtle_egg[quantity=5]
- end_crystal[quantity=4]
- ender_chest[quantity=2]
- ancient_debris[quantity=2]
- shield[base_color=<list[black|blue|brown|cyan|gray|green|light_blue|light_gray|lime|magenta|orange|pink|purple|red|white|yellow].random>]
- tropical_fish_bucket
- diamond_helmet
- diamond_chestplate
- diamond_leggings
- diamond_boots
- diamond_sword
- diamond_axe
- diamond_pickaxe
- arrow[quantity=128]
- spectral_arrow[quantity=64]
- honey_bottle[quantity=3]
- wither_rose[quantity=8]
- lodestone
- shroomlight[quantity=16]
- amethyst_shard[quantity=4]
- phantom_membrane[quantity=8]
- dragon_breath[quantity=24]
- <list[flower|creeper|skull|mojang|globe|piglin].random>_banner_pattern
- music_disc_<list[13|cat|blocks|chirp|far|mall|mellohi|stal|strad|ward|11|wait|pigstep].random>
- bomb_item[quantity=3]
- <list[paper[custom_model_data=5000;display_name=Lon Lon Milk Jar]|paper[custom_model_data=900;quantity=<util.random.int[3].to[15]>;display_name=Banana Crate]|paper[custom_model_data=1000;quantity=<util.random.int[3].to[15]>;display_name=Mythril Crate]|paper[custom_model_data=1100;quantity=<util.random.int[3].to[15]>;display_name=Potato Crate]|paper[custom_model_data=1200;quantity=<util.random.int[3].to[15]>;display_name=Honey Crate]|paper[custom_model_data=1300;quantity=<util.random.int[3].to[15]>;display_name=Water Crate]|paper[custom_model_data=1400;quantity=<util.random.int[3].to[15]>;display_name=Amethyst Crate]|paper[custom_model_data=1500;quantity=<util.random.int[3].to[15]>;display_name=Apple Crate]|paper[custom_model_data=1600;quantity=<util.random.int[3].to[15]>;display_name=Beetroot Crate]|paper[custom_model_data=1700;quantity=<util.random.int[3].to[15]>;display_name=Cobblestone Crate]|paper[custom_model_data=1800;quantity=<util.random.int[3].to[15]>;display_name=Dirt Crate]|paper[custom_model_data=2600;quantity=<util.random.int[3].to[15]>;display_name=Gold Crate]|paper[custom_model_data=2700;quantity=<util.random.int[3].to[15]>;display_name=Green Apple Crate]|paper[custom_model_data=2800;quantity=<util.random.int[3].to[15]>;display_name=Iron Crate]|paper[custom_model_data=2900;quantity=<util.random.int[3].to[15]>;display_name=Milk Crate]|paper[custom_model_data=3500;quantity=<util.random.int[3].to[15]>;display_name=Strawberry Planter]|paper[custom_model_data=2100;quantity=<util.random.int[3].to[15]>;display_name=Blue Fairy Jar]|paper[custom_model_data=2300;quantity=<util.random.int[3].to[15]>;display_name=Pink Fairy Jar]|paper[custom_model_data=2500;quantity=<util.random.int[3].to[15]>;display_name=Purple Fairy Jar]|paper[custom_model_data=2400;quantity=<util.random.int[3].to[15]>;display_name=Yellow Fairy Jar]|paper[custom_model_data=2000;quantity=<util.random.int[3].to[15]>;display_name=Honey Jar]|paper[custom_model_data=2200;quantity=<util.random.int[3].to[15]>;display_name=Fern Jar]|paper[custom_model_data=3100;quantity=<util.random.int[3].to[15]>;display_name=Mushroom Jar]|paper[custom_model_data=3400;quantity=<util.random.int[3].to[15]>;display_name=Sapling Jar]|paper[custom_model_data=3000;quantity=<util.random.int[3].to[15]>;display_name=Milk Jar]|paper[custom_model_data=3700;quantity=<util.random.int[3].to[15]>;display_name=Acacia Table]|paper[custom_model_data=3800;quantity=<util.random.int[3].to[15]>;display_name=Spruce Table]|paper[custom_model_data=3900;quantity=<util.random.int[3].to[15]>;display_name=Warped Table]|paper[custom_model_data=4000;quantity=<util.random.int[3].to[15]>;display_name=Birch Table]|paper[custom_model_data=4100;quantity=<util.random.int[3].to[15]>;display_name=Oak Table]|paper[custom_model_data=4200;quantity=<util.random.int[3].to[15]>;display_name=Dark Oak Table]|paper[custom_model_data=4300;quantity=<util.random.int[3].to[15]>;display_name=Crimson Table]|paper[custom_model_data=4400;quantity=<util.random.int[3].to[15]>;display_name=Chess Table]|paper[custom_model_data=4500;quantity=<util.random.int[3].to[15]>;display_name=Chess Board]|paper[custom_model_data=4600;quantity=<util.random.int[3].to[15]>;display_name=Blue Potion Jar]|paper[custom_model_data=4700;quantity=<util.random.int[3].to[15]>;display_name=Red Potion Jar]|paper[custom_model_data=4800;quantity=<util.random.int[3].to[15]>;display_name=Green Potion Jar]|paper[custom_model_data=4900;quantity=<util.random.int[3].to[15]>;display_name=Yellow Potion Jar]|paper[custom_model_data=5100;quantity=<util.random.int[3].to[15]>;display_name=Bottle]|paper[custom_model_data=5200;quantity=<util.random.int[3].to[15]>;display_name=Playing Cards]|paper[custom_model_data=5700;quantity=<util.random.int[3].to[15]>;display_name=basket]|paper[custom_model_data=5500;quantity=<util.random.int[3].to[15]>;display_name=Acacia Mug]|paper[custom_model_data=6000;quantity=<util.random.int[3].to[15]>;display_name=Birch Mug]|paper[custom_model_data=6800;quantity=<util.random.int[3].to[15]>;display_name=Dark Oak Mug]].random>
- <list[paper[custom_model_data=7400;quantity=<util.random.int[3].to[15]>;display_name=Jungle Mug]|paper[custom_model_data=7800;quantity=<util.random.int[3].to[15]>;display_name=Oak Mug]|paper[custom_model_data=8200;quantity=<util.random.int[3].to[15]>;display_name=Spruce Mug]|paper[custom_model_data=6400;quantity=<util.random.int[3].to[15]>;display_name=Crimson Mug]|paper[custom_model_data=8800;quantity=<util.random.int[3].to[15]>;display_name=Warped Mug]|paper[custom_model_data=8500;quantity=<util.random.int[3].to[15]>;display_name=Vine Basket]|paper[custom_model_data=12201;quantity=<util.random.int[3].to[15]>;display_name=Spruce Chair]|paper[custom_model_data=12202;quantity=<util.random.int[3].to[15]>;display_name=Warped Chair]|paper[custom_model_data=12203;quantity=<util.random.int[3].to[15]>;display_name=Birch Chair]|paper[custom_model_data=12204;quantity=<util.random.int[3].to[15]>;display_name=Crimson Chair]|paper[custom_model_data=12205;quantity=<util.random.int[3].to[15]>;display_name=Oak Chair]|paper[custom_model_data=12206;quantity=<util.random.int[3].to[15]>;display_name=Jungle Chair]|paper[custom_model_data=12207;quantity=<util.random.int[3].to[15]>;display_name=Dark_oak Chair]|paper[custom_model_data=12208;quantity=<util.random.int[3].to[15]>;display_name=White Chair]|paper[custom_model_data=12209;quantity=<util.random.int[3].to[15]>;display_name=Black Chair]|paper[custom_model_data=12212;quantity=<util.random.int[3].to[15]>;display_name=Black Stool]|paper[custom_model_data=12213;quantity=<util.random.int[3].to[15]>;display_name=White Stool]|paper[custom_model_data=12215;quantity=<util.random.int[3].to[15]>;display_name=Bar Stool]|paper[custom_model_data=12216;quantity=<util.random.int[3].to[15]>;display_name=Dark Bar Stool]|paper[custom_model_data=5000;quantity=<util.random.int[3].to[15]>;display_name=Lon Lon Milk Jar]|paper[custom_model_data=900;quantity=<util.random.int[3].to[15]>;display_name=Banana Crate]|paper[custom_model_data=1000;quantity=<util.random.int[3].to[15]>;display_name=Mythril Crate]|paper[custom_model_data=1100;quantity=<util.random.int[3].to[15]>;display_name=Potato Crate]|paper[custom_model_data=1200;quantity=<util.random.int[3].to[15]>;display_name=Honey Crate]|paper[custom_model_data=1300;quantity=<util.random.int[3].to[15]>;display_name=Water Crate]|paper[custom_model_data=1400;quantity=<util.random.int[3].to[15]>;display_name=Amethyst Crate]|paper[custom_model_data=1500;quantity=<util.random.int[3].to[15]>;display_name=Apple Crate]|paper[custom_model_data=1600;quantity=<util.random.int[3].to[15]>;display_name=Beetroot Crate]|paper[custom_model_data=1700;quantity=<util.random.int[3].to[15]>;display_name=Cobblestone Crate]|paper[custom_model_data=1800;quantity=<util.random.int[3].to[15]>;display_name=Dirt Crate]|paper[custom_model_data=2600;quantity=<util.random.int[3].to[15]>;display_name=Gold Crate]|paper[custom_model_data=2700;quantity=<util.random.int[3].to[15]>;display_name=Green Apple Crate]|paper[custom_model_data=2800;quantity=<util.random.int[3].to[15]>;display_name=Iron Crate]|paper[custom_model_data=2900;quantity=<util.random.int[3].to[15]>;display_name=Milk Crate]|paper[custom_model_data=3500;quantity=<util.random.int[3].to[15]>;display_name=Strawberry Planter]|paper[custom_model_data=2100;quantity=<util.random.int[3].to[15]>;display_name=Blue Fairy Jar]|paper[custom_model_data=2300;quantity=<util.random.int[3].to[15]>;display_name=Pink Fairy Jar]|paper[custom_model_data=2500;quantity=<util.random.int[3].to[15]>;display_name=Purple Fairy Jar]|paper[custom_model_data=2400;quantity=<util.random.int[3].to[15]>;display_name=Yellow Fairy Jar]|paper[custom_model_data=2000;quantity=<util.random.int[3].to[15]>;display_name=Honey Jar]|paper[custom_model_data=2200;quantity=<util.random.int[3].to[15]>;display_name=Fern Jar]|paper[custom_model_data=3100;quantity=<util.random.int[3].to[15]>;display_name=Mushroom Jar]|paper[custom_model_data=3400;quantity=<util.random.int[3].to[15]>;display_name=Sapling Jar]|paper[custom_model_data=3000;quantity=<util.random.int[3].to[15]>;display_name=Milk Jar]|paper[custom_model_data=3700;quantity=<util.random.int[3].to[15]>;display_name=Acacia Table]|paper[custom_model_data=3800;quantity=<util.random.int[3].to[15]>;display_name=Spruce Table]].random>
- <list[paper[custom_model_data=3900;quantity=<util.random.int[3].to[15]>;display_name=Warped Table]|paper[custom_model_data=4000;quantity=<util.random.int[3].to[15]>;display_name=Birch Table]|paper[custom_model_data=4100;quantity=<util.random.int[3].to[15]>;display_name=Oak Table]|paper[custom_model_data=4200;quantity=<util.random.int[3].to[15]>;display_name=Dark Oak Table]|paper[custom_model_data=4300;quantity=<util.random.int[3].to[15]>;display_name=Crimson Table]|paper[custom_model_data=4400;quantity=<util.random.int[3].to[15]>;display_name=Chess Table]|paper[custom_model_data=4500;quantity=<util.random.int[3].to[15]>;display_name=Chess Board]|paper[custom_model_data=4600;quantity=<util.random.int[3].to[15]>;display_name=Blue Potion Jar]|paper[custom_model_data=4700;quantity=<util.random.int[3].to[15]>;display_name=Red Potion Jar]|paper[custom_model_data=4800;quantity=<util.random.int[3].to[15]>;display_name=Green Potion Jar]|paper[custom_model_data=4900;quantity=<util.random.int[3].to[15]>;display_name=Yellow Potion Jar]|paper[custom_model_data=5100;quantity=<util.random.int[3].to[15]>;display_name=Bottle]|paper[custom_model_data=5200;quantity=<util.random.int[3].to[15]>;display_name=Playing Cards]|paper[custom_model_data=5700;quantity=<util.random.int[3].to[15]>;display_name=basket]|paper[custom_model_data=5500;quantity=<util.random.int[3].to[15]>;display_name=Acacia Mug]|paper[custom_model_data=6000;quantity=<util.random.int[3].to[15]>;display_name=Birch Mug]|paper[custom_model_data=6800;quantity=<util.random.int[3].to[15]>;display_name=Dark Oak Mug]|paper[custom_model_data=7400;quantity=<util.random.int[3].to[15]>;display_name=Jungle Mug]|paper[custom_model_data=7800;quantity=<util.random.int[3].to[15]>;display_name=Oak Mug]|paper[custom_model_data=8200;quantity=<util.random.int[3].to[15]>;display_name=Spruce Mug]|paper[custom_model_data=6400;quantity=<util.random.int[3].to[15]>;display_name=Crimson Mug]|paper[custom_model_data=8800;quantity=<util.random.int[3].to[15]>;display_name=Warped Mug]|paper[custom_model_data=8500;quantity=<util.random.int[3].to[15]>;display_name=Vine Basket]|paper[custom_model_data=12201;quantity=<util.random.int[3].to[15]>;display_name=Spruce Chair]|paper[custom_model_data=12202;quantity=<util.random.int[3].to[15]>;display_name=Warped Chair]|paper[custom_model_data=12203;quantity=<util.random.int[3].to[15]>;display_name=Birch Chair]|paper[custom_model_data=12204;quantity=<util.random.int[3].to[15]>;display_name=Crimson Chair]|paper[custom_model_data=12205;quantity=<util.random.int[3].to[15]>;display_name=Oak Chair]|paper[custom_model_data=12206;quantity=<util.random.int[3].to[15]>;display_name=Jungle Chair]|paper[custom_model_data=12207;quantity=<util.random.int[3].to[15]>;display_name=Dark_oak Chair]|paper[custom_model_data=12208;quantity=<util.random.int[3].to[15]>;display_name=White Chair]|paper[custom_model_data=12209;quantity=<util.random.int[3].to[15]>;display_name=Black Chair]|paper[custom_model_data=12212;quantity=<util.random.int[3].to[15]>;display_name=Black Stool]|paper[custom_model_data=12213;quantity=<util.random.int[3].to[15]>;display_name=White Stool]|paper[custom_model_data=12215;quantity=<util.random.int[3].to[15]>;display_name=Bar Stool]|paper[custom_model_data=12216;quantity=<util.random.int[3].to[15]>;display_name=Dark Bar Stool]].random>
voting_sites:
type: data
debug: false
sites:
TopG.org: https://topg.org/minecraft-servers/server-627786
Minecraft-MP.com: https://minecraft-mp.com/server/284225/vote/
MinecraftServers.org: https://minecraftservers.org/server/612670
MinecraftServersList: https://minecraftlist.org/vote/23456
PlanetMinecraft.com: https://www.planetminecraft.com/server/zeldacraft-5068967/vote/
vote_cmd:
type: command
debug: false
name: vote
description: Use this to open the voting menu
usage: /vote
script:
- inventory open d:voting_menu
voting_menu:
type: inventory
inventory: hopper
debug: false
gui: true
title: Voting websites
procedural items:
- define items <list>
- foreach <script[voting_sites].data_key[sites].keys> as:site:
- if !<player.has_flag[voted_<[site]>]>:
- define items <[items].include[<item[voting_link_i]>]>
- else:
- define items <[items].include[<item[cant_vote_i]>]>
- determine <[items]>
voting_world:
type: world
debug: false
events:
on player clicks in voting_menu:
- if !<context.item.has_flag[voting_site]>:
- stop
- define link <script[voting_sites].data_key[sites].get[<context.item.flag[voting_site]>]||error>
- determine passively cancelled
- narrate "Click this Link to vote for <&a><context.item.flag[voting_site]>" format:zc_text
- narrate "<&hover[Click Me!]><&click[<[link].parsed>].type[open_url]><&b><&n><[link].parsed><&end_click><&end_hover>" format:zc_text
on votifier vote:
- define player <server.match_offline_player[<context.username>].if_null[nobody]>
- if <[player]> == nobody:
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Vote has nobody].with[description].as[Username: <context.username><&nl>Service: <context.service>].with[color].as[red].with[timestamp].as[<context.time_sent>]>"
- stop
- if <[player].has_flag[voted_<context.service>]>:
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Player voted already].with[description].as[Username: <context.username><&nl>Service: <context.service>].with[color].as[red].with[timestamp].as[<context.time_sent>]>"
- stop
- if !<script[voting_sites].data_key[sites].keys.contains[<context.service>]>:
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Incorrect voting site].with[description].as[Username: <context.username><&nl>Service: <context.service>].with[color].as[red].with[timestamp].as[<context.time_sent>]>"
- stop
- flag server top_voters_all.<[player]>:++
- flag server top_voters_week.<[player]>:++
- flag <[player]> voted_<context.service> duration:24h
- define rarity <util.random.int[1].to[6]>
- define vote_msg "<element[<&l>ZeldaCraft].color_gradient[from=<&9>;to=<&a>]> <&chr[BB]><&r> <element[Player just voted on !].color_gradient[from=<&e>;to=<&c>].split[ ].insert[<&a><[player].name>].at[2].insert[<&a><context.service>].at[6].separated_by[ ]>"
- run global_announce "def:<[vote_msg].on_hover[<element[Use /vote to claim your own voting rewards!].color_gradient[from=<&e>;to=<&c>]>]>"
- if !<[player].is_online>:
- flag <[player]> vote_prizes:++
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Player was offline].with[description].as[Username: <context.username><&nl>Service: <context.service><&nl>UUID: <[player].uuid><&nl>saved votes: <[player].flag[vote_prizes]>].with[color].as[yellow].with[timestamp].as[<context.time_sent>]>"
- stop
- if !<script[voting_worlds].data_key[worlds].contains[<[player].location.world.name||noworld>]>:
- flag <[player]> vote_prizes:++
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Player was in a wrong world].with[description].as[Username: <context.username><&nl>Service: <context.service><&nl>UUID: <[player].uuid><&nl>saved votes: <[player].flag[vote_prizes]><&nl>World: <[player].location.world.name>].with[color].as[yellow].with[timestamp].as[<context.time_sent>]>"
- narrate "Seems like you voted without being in a survival world." format:zc_text targets:<[player]>
- narrate "Change to a correct world to receive your key" format:zc_text targets:<[player]>
- stop
- if !<[player].inventory.can_fit[rare_vote_key]> || !<[player].inventory.can_fit[common_vote_key]>:
- flag <[player]> vote_prizes:++
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[Players inventory was full].with[description].as[Username: <context.username><&nl>Service: <context.service><&nl>UUID: <[player].uuid><&nl>saved votes: <[player].flag[vote_prizes]>].with[color].as[yellow].with[timestamp].as[<context.time_sent>]>"
- narrate "Seems like you voted with a full inventory" format:zc_text targets:<[player]>
- narrate "empty your inventory and change worlds to receive your key" format:zc_text targets:<[player]>
- stop
- if <[rarity]> == 4:
- define rarity Rare
- give rare_vote_key to:<[player].inventory>
- else:
- define rarity Common
- give common_vote_key to:<[player].inventory>
- narrate "Thank you for voting on <context.service>" format:zc_text
- narrate "You received a <[rarity]> Key" format:zc_text
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[<[player].name> received a <[rarity]> key].with[timestamp].as[<util.time_now>].with[color].as[lime]>"
after player changes world:
- if !<player.has_flag[vote_prizes]>:
- stop
- if <script[voting_worlds].data_key[worlds].contains[<context.destination_world.name>]>:
- wait 2s
- if !<player.has_flag[vote_prizes]>:
- stop
- if !<player.is_online>:
- stop
- if !<script[voting_worlds].data_key[worlds].contains[<player.location.world.name||noworld>]>:
- stop
- if !<player.inventory.can_fit[rare_vote_key]> || !<player.inventory.can_fit[common_vote_key]>:
- stop
- define keys <list>
- repeat <player.flag[vote_prizes]||1>:
- define rarity <util.random.int[1].to[6]>
- if <[rarity]> == 4:
- define rarity Rare
- give rare_vote_key
- define keys "<[keys].include[<&color[#D4AF37]>Rare <&e>Vote Key]>"
- else:
- define rarity Common
- give common_vote_key
- define keys "<[keys].include[<&color[#C0C0C0]>Common <&e>Vote Key]>"
- flag player vote_prizes:!
- narrate "Thank you for voting" format:zc_text
- narrate "You received <&hover[<[keys].separated_by[<&nl>]>]><&a><&n><[keys].size||0> Key(s)<&end_hover>" format:zc_text
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[<player.name> received vote keys].with[description].as[<[keys].size||0> keys received through changing world].add_field[Key Types].value[<[keys].parse[strip_color].separated_by[<&nl>]>].with[timestamp].as[<util.time_now>].with[color].as[lime]>"
after player joins:
- if !<player.has_flag[vote_prizes]>:
- stop
- wait 3s
- if !<player.has_flag[vote_prizes]>:
- stop
- if !<player.is_online>:
- stop
- if !<script[voting_worlds].data_key[worlds].contains[<player.location.world.name||noworld>]>:
- stop
- if !<player.inventory.can_fit[rare_vote_key]> || !<player.inventory.can_fit[common_vote_key]>:
- stop
- define keys <list>
- repeat <player.flag[vote_prizes]||1>:
- define rarity <util.random.int[1].to[6]>
- if <[rarity]> == 4:
- define rarity Rare
- give rare_vote_key
- define keys "<[keys].include[<&color[#D4AF37]>Rare <&e>Vote Key]>"
- else:
- define rarity Common
- give common_vote_key
- define keys "<[keys].include[<&color[#C0C0C0]>Common <&e>Vote Key]>"
- flag player vote_prizes:!
- narrate "Thank you for voting" format:zc_text
- narrate "You received <&hover[<[keys].separated_by[<&nl>]>]><&a><&n><[keys].size||0> Key(s)<&end_hover>" format:zc_text
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[<player.name> received vote keys].with[description].as[<[keys].size||0> keys received through joining].add_field[Key Types].value[<[keys].parse[strip_color].separated_by[<&nl>]>].with[timestamp].as[<util.time_now>].with[color].as[lime]>"
on system time minutely every:5:
- run get_voters
- foreach <server.online_players_flagged[vote_prizes]> as:player:
- if !<[player].is_online>:
- stop
- if !<script[voting_worlds].data_key[worlds].contains[<[player].location.world.name||noworld>]>:
- narrate "You have some vote keys waiting for you" format:zc_text targets:<[player]>
- narrate "Change to a survival world to receive them" format:zc_text targets:<[player]>
- stop
- if !<[player].inventory.can_fit[rare_vote_key]> || !<[player].inventory.can_fit[common_vote_key]>:
- narrate "You have some vote keys waiting for you" format:zc_text targets:<[player]>
- narrate "Make sure your inventory has space, and change to a survival world" format:zc_text targets:<[player]>
- stop
- define keys <list>
- repeat <[player].flag[vote_prizes]||1>:
- define rarity <util.random.int[1].to[6]>
- if <[rarity]> == 4:
- define rarity Rare
- give rare_vote_key to:<[player].inventory>
- define keys "<[keys].include[<&color[#D4AF37]>Rare <&e>Vote Key]>"
- else:
- define rarity Common
- give common_vote_key to:<[player].inventory>
- define keys "<[keys].include[<&color[#C0C0C0]>Common <&e>Vote Key]>"
- flag <[player]> vote_prizes:!
- narrate "Thank you for voting" format:zc_text targets:<[player]>
- narrate "You received <&hover[<[keys].separated_by[<&nl>]>]><&a><&n><[keys].size||0> Key(s)<&end_hover>" format:zc_text targets:<[player]>
- ~discordmessage id:zc-info channel:859064390888587284 "<discord_embed.with[title].as[<[player].name> received vote keys].with[description].as[<[keys].size||0> keys received through the 5 minute timer].add_field[Key Types].value[<[keys].parse[strip_color].separated_by[<&nl>]>].with[timestamp].as[<util.time_now>].with[color].as[lime]>"
votifier_alive_check:
type: world
debug: false
events:
on votifier vote:
- announce "<context.username> voted on <context.service> at <context.time_sent>" to_console
- ~discordmessage id:zc-info channel:859064321299185764 "<discord_embed.with[title].as[<context.username> voted].with[color].as[green].with[footer].as[<context.service>].with[timestamp].as[<context.time_sent>]>"
- wait 2s
- run get_voters
get_voters:
type: task
debug: false
script:
- define voters <list>
- foreach <server.flag[top_voters_all].sort_by_value.keys.reverse>:
- define voters "<[voters].include[<[loop_index]>. <[value].name.replace[_].with[\_]> - **<server.flag[top_voters_all].get[<[value]>]>**]>"
- if <[loop_index]> == 10:
- foreach stop
- if <[voters].is_empty>:
- define voters "<list[No one voted at all, or something went wrong]>"
- ~discordmessage id:zc-info edit:859085204197736498 channel:757903718640517191 "<discord_embed.with[title].as[Top voters all time].with[description].as[<[voters].separated_by[<&nl>]>].with[color].as[aqua].with[footer].as[Last updated].with[timestamp].as[<util.time_now>]>"
voting_crate_world:
type: world
debug: false
events:
on player places common_vote_crate:
- flag <context.location> common_vote_crate
- spawn vote_holo_common <context.location.add[0,1,0].center> save:ent
- flag <context.location> link_ent:<entry[ent].spawned_entity>
on player places rare_vote_crate:
- flag <context.location> rare_vote_crate
- spawn vote_holo_rare <context.location.add[0,1,0].center> save:ent
- flag <context.location> link_ent:<entry[ent].spawned_entity>
on player breaks chest location_flagged:common_vote_crate:
- flag <context.location> common_vote_crate:!
- remove <context.location.flag[link_ent]>
- flag <context.location> link_ent:!
on player breaks ender_chest location_flagged:rare_vote_crate:
- flag <context.location> rare_vote_crate:!
- remove <context.location.flag[link_ent]>
- flag <context.location> link_ent:!
on player right clicks chest location_flagged:common_vote_crate:
- determine passively cancelled
- if <context.item.script.name||none> != common_vote_key:
- narrate "You need a <&hover[common_vote_key].type[show_item]><&e>Common Vote Key<&end_hover><&f> to open this crate"
- playsound <player> sound:block_chest_locked pitch:0.8
- stop
- if <context.location.flag[users].contains[<player>]||false>:
- narrate "You are already using this crate" format:zc_text
- stop
- flag <context.location> users:->:<player>
- wait 2t
- take item:common_vote_key[quantity=1]
- animatechest <context.location> open sound:true <player>
- if <player.has_permission[zc.mod_fly]>:
- define prize <script[voting_prizes].parsed_key[prizes].get[common].exclude[Flytime_6-Minutes].include[Stinky_egg].random>
- else:
- define prize <script[voting_prizes].parsed_key[prizes].get[common].random>
- if <[prize].starts_with[FlyTime]>:
- define time <[prize].after[_].before[-].mul[60]>
- define nar_time <[prize].after[_].replace_text[-].with[<&sp>]>
- define msg "You received <[nar_time]> <&hover[Allows you to use /fly]><&e>Fly Time<&end_hover>"
- define item elytra
- define text "<[nar_time]> Fly Time"
- else:
- define item <item[<[prize]>]>
- define msg "You received <[item].quantity||1> <&a><[item].display.on_hover[<[item]>].type[show_item].if_null[<[item].material.name.replace_text[_].with[<&sp>].to_titlecase.on_hover[<[item]>].type[show_item]>]>"
- define text <[item].display.if_null[<[item].material.name.replace_text[_].with[<&sp>].to_titlecase>]>
- spawn <context.location.sub[0,0.5,0].center> armor_stand[is_small=true;visible=false;marker=true;equipment=air|air|air|<[item]>;custom_name=<[text]>;custom_name_visible=true;hide_from_players=true] save:ent
- define ent <entry[ent].spawned_entity>
- adjust <player> show_entity:<[ent]>
- repeat 60:
- playeffect effect:crit at:<[ent].location.add[0,0.4,0]> quantity:5 offset:0.2,0.4,0.2 targets:<player>
- playeffect effect:totem at:<[ent].location.add[0,0.4,0]> quantity:2 offset:0.2,0.4,0.2 targets:<player>
- teleport <[ent]> <[ent].location.with_y[<[ent].location.y.add[0.02]>].with_yaw[<[ent].location.yaw.add[10]>]>
- if <[value]> == 1:
- playsound sound:zc_sfx.oot.oot_fanfare_item custom pitch:1 <player>
# - if <[value]> == 32:
# - playsound sound:block_note_block_harp pitch:1.0594630943592953 <player>
# - if <[value]> == 36:
# - playsound sound:block_note_block_harp pitch:1 <player>
# - if <[value]> == 40:
# - playsound sound:block_note_block_harp pitch:0.8408964152537145 <player>
# - if <[value]> == 44:
# - playsound sound:block_note_block_harp pitch:0.5946035575013605 <player>
# - if <[value]> == 48:
# - playsound sound:block_note_block_harp pitch:0.5612310241546865 <player>
# - if <[value]> == 52:
# - playsound sound:block_note_block_harp pitch:0.8908987181403393 <player>
# - if <[value]> == 56:
# - playsound sound:block_note_block_harp pitch:1.122462048309373 <player>
# - if <[value]> == 60:
# - playsound sound:block_note_block_harp pitch:1.4142135623730951 <player>
- wait 1t
- wait 0.5s
- remove <[ent]>
- animatechest <context.location> close sound:false <player>
- if <[prize].starts_with[FlyTime]>:
- flag <player> voteflytime:+:<[time]>
- else:
- give <[item]>
- narrate <[msg]> format:zc_text
- flag <context.location> users:<-:<player>
on player right clicks ender_chest location_flagged:rare_vote_crate:
- determine passively cancelled
- if <context.item.script.name||none> != rare_vote_key:
- narrate "You need a <&hover[rare_vote_key].type[show_item]><&e>Rare Vote Key<&end_hover><&f> to open this crate"
- playsound <player> sound:block_chest_locked pitch:0.8
- stop
- if <context.location.flag[users].contains[<player>]||false>:
- narrate "You are already using this crate" format:zc_text
- stop
- flag <context.location> users:->:<player>
- take item:rare_vote_key[quantity=1]
- animatechest <context.location> open sound:true <player>
- if <player.has_permission[zc.mod_fly]>:
- define prize <script[voting_prizes].parsed_key[prizes].get[rare].exclude[Flytime_10-Minutes|Flytime_15-Minutes].include[bottled_fart|Caff_Coupon].random>
- else:
- define prize <script[voting_prizes].parsed_key[prizes].get[rare].random>
- if <[prize].starts_with[FlyTime]>:
- define time <[prize].after[_].before[-].mul[60]>
- define nar_time <[prize].after[_].replace_text[-].with[<&sp>]>
- define msg "You received <[nar_time]> <&hover[Allows you to use /fly]><&e>Fly Time<&end_hover>"
- define item elytra
- define text "<[nar_time]> Fly Time"
- else:
- define item <item[<[prize]>]>
- define msg "You received <[item].quantity||1> <&hover[<[item]>].type[show_item]><&a><[item].display.if_null[<[item].material.name.replace_text[_].with[<&sp>].to_titlecase>]><&end_hover>"
- define text <[item].display.if_null[<[item].material.name.replace_text[_].with[<&sp>].to_titlecase>]>
- spawn <context.location.sub[0,0.5,0].center> armor_stand[is_small=true;visible=false;marker=true;equipment=air|air|air|<[item]>;custom_name=<[text]>;custom_name_visible=true;hide_from_players=true] save:ent
- define ent <entry[ent].spawned_entity>
- adjust <player> show_entity:<[ent]>
- repeat 60:
- playeffect effect:crit at:<[ent].location.add[0,0.4,0]> quantity:5 offset:0.2,0.4,0.2 targets:<player>
- playeffect effect:totem at:<[ent].location.add[0,0.4,0]> quantity:2 offset:0.2,0.4,0.2 targets:<player>
- teleport <[ent]> <[ent].location.with_y[<[ent].location.y.add[0.02]>].with_yaw[<[ent].location.yaw.add[10]>]>
- if <[value]> == 1:
- playsound sound:zc_sfx.albw.lbw_fanfare_bow custom pitch:1 <player>
# - if <[value]> == 32:
# - playsound sound:block_note_block_bit pitch:1.0594630943592953 <player>
# - if <[value]> == 36:
# - playsound sound:block_note_block_bit pitch:1 <player>
# - if <[value]> == 40:
# - playsound sound:block_note_block_bit pitch:0.8408964152537145 <player>
# - if <[value]> == 44:
# - playsound sound:block_note_block_bit pitch:0.5946035575013605 <player>
# - if <[value]> == 48:
# - playsound sound:block_note_block_bit pitch:0.5612310241546865 <player>
# - if <[value]> == 52:
# - playsound sound:block_note_block_bit pitch:0.8908987181403393 <player>
# - if <[value]> == 56:
# - playsound sound:block_note_block_bit pitch:1.122462048309373 <player>
# - if <[value]> == 60:
# - playsound sound:block_note_block_bit pitch:1.4142135623730951 <player>
- wait 1t
- wait 1s
- remove <[ent]>
- animatechest <context.location> close sound:false <player>
- if <[prize].starts_with[FlyTime]>:
- flag <player> voteflytime:+:<[time]>
- else:
- give <[item]>
- if <[item]> == royal_halberd:
- if !<server.has_flag[first_halberd]>:
- flag server first_halberd
- define player <player>
- ~discordmessage id:zc-info channel:152498419569524736 "<discord_embed.with[title].as[Vote announce].with[description].as[<[player].name> received the first<&nl><&nl>**Royal Halberd!**<&nl><&nl>Want your own? be sure to vote daily].with[color].as[green].with[thumbnail].as[https://cdn.discordapp.com/attachments/757894566413205554/861655780607918080/blade_preview.png].with[footer_icon].as[https://cravatar.eu/helmavatar/<[player].name>/190.png].with[timestamp].as[<util.time_now>]>"
- narrate <[msg]> format:zc_text
- flag <context.location> users:<-:<player>
fly_cmd:
type: command
name: fly
usage: /fly
debug: false
description: Lets you fly
script:
- if <player.has_permission[zc.mod_fly]>:
- if <player.has_flag[modfly]> && <player.can_fly>:
- adjust <player> flying:false
- adjust <player> can_fly:false
- flag player modfly:!
- narrate "You disabled flying" format:zc_text
- stop
- narrate "You enabled flying." format:zc_text
- adjust <player> can_fly:true
- flag player modfly
- stop
- if <player.gamemode> != survival:
- narrate "You can only fly in survival" format:zc_text
- stop
- if <player.has_flag[votefly]>:
- define loc <player.location>
- while <[loc].material> == <material[air]>:
- define loc <[loc].sub[0,1,0]>
- teleport <player> <[loc].add[0,1,0]>
- adjust <player> flying:false
- adjust <player> can_fly:false
- flag player votefly:!
- stop
- if <player.flag[voteflytime]||0> <= 0:
- narrate "You do not have any flying time. Get some through <&hover[Use /vote]>voting<&end_hover>" format:zc_text
- stop
- flag player votefly
- flag player liftoff
- adjust <player> can_fly:true
- teleport <player> <player.location.add[0,0.01,0]>
- adjust <player> flying:true
- flag player liftoff:!
fly_world:
type: world
debug: false
events:
on delta time secondly:
- foreach <server.online_players> as:player:
- if !<[player].has_flag[votefly]>:
- foreach next
- if <[player].flag[voteflytime]> <= 0:
- narrate "Your fly time ran out. sending you back to a save spot" targets:<[player]> format:zc_text
- flag <[player]> votefly:!
- if <[player].is_flying>:
- define loc <[player].location>
- while <[loc].material> == <material[air]>:
- define loc <[loc].sub[0,1,0]>
- teleport <[player]> <[loc].add[0,1,0]>
- adjust <[player]> flying:false
- adjust <[player]> can_fly:false
- else:
- flag <[player]> voteflytime:--
- actionbar "You have <&a><[player].flag[voteflytime].as_duration.formatted><&f> left to fly" targets:<[player]>
- if <[player].flag[voteflytime]> == 60:
- narrate "Only 1 minute left on your limited fly!" targets:<[player]> format:zc_text
- playsound sound:block_bell_resonate volume:10 pitch:2 <[player]>
on player teleports:
- if !<player.has_flag[votefly]>:
- stop
- if <player.has_flag[liftoff]>:
- stop
- if <player.is_flying>:
- adjust <player> flying:false
- adjust <player> can_fly:false
- flag player votefly:!
on player quits:
- flag player votefly:!
vote_holo_common:
type: entity
entity_type: armor_stand
mechanisms:
custom_name: <&color[#C0C0C0]>Common <&e>Vote Crate
custom_name_visible: true
marker: true
visible: false
vote_holo_rare:
type: entity
entity_type: armor_stand
mechanisms:
custom_name: <&color[#D4AF37]>Rare <&e>Vote Crate
custom_name_visible: true
marker: true
visible: false
top_voters_weekly:
type: world
debug: false
events:
on system time hourly every:24:
- if <util.time_now.day_of_week_name> == sunday:
- define voters <list>
- foreach <server.flag[top_voters_week].sort_by_value.keys.reverse>:
- define voters "<[voters].include[<[loop_index]>. <[value].name> - **<server.flag[top_voters_week].get[<[value]>]>**]>"
- if <[loop_index]> == 10:
- foreach stop
- flag server top_voters_week:!
- if <[voters].is_empty>:
- define voters "<list[No one voted this week]>"
- ~discordmessage id:zc-info channel:402888223732531200 "<discord_embed.with[title].as[Top voters this week].with[description].as[<[voters].separated_by[<&nl>]>].with[color].as[aqua]>"
voters_command:
type: command
name: voters
usage: /voters (page)
debug: false
description: Shows you a list of top voters
script:
- if <context.args.get[1].is_decimal||false>:
- define page <context.args.get[1]||1>
- else:
- define page 1
- define max <server.flag[top_voters_all].size.div[10].round_up>
- if <[page]> < 1:
- narrate "the page number cannot go lower then 1" format:zc_text
- stop
- if <[page]> > <[max]>:
- narrate "the page number cannot be higher then <[max]>" format:zc_text
- stop
- define start <[page].sub[1].mul[10].add[1]>
- if <[start]> == 0:
- define start 1
- define end <[page].mul[10]>
- define voters <list>
- foreach <server.flag[top_voters_all].sort_by_value.keys.reverse>:
- if <[loop_index]> < <[start]>:
- foreach next
- if <[loop_index]> > <[end]>:
- foreach stop
- define voters "<[voters].include[#<[loop_index]>: <[value].name> - <server.flag[top_voters_all].get[<[value]>]>]>"
- if <[voters].is_empty>:
- define voters "<list[No one voted at all, or something went wrong]>"
- define left_ar "<&hover[Click here to go a page backwards]><&click[/voters <[page].sub[1]>]><&color[#04BA04]><&chr[25C0]><&end_click><&end_hover>"
- define right_ar "<&hover[Click here to go a page forward]><&click[/voters <[page].add[1]>]><&color[#04BA04]><&chr[25B6]><&end_click><&end_hover>"
- narrate "<&a><&l>Zelda<&2><&l>Craft Top Voters"
- narrate "Use <&click[/vote]><&a>/vote<&end_click> to vote for this server<&nl>"
- narrate <[voters].separated_by[<&nl>]>
- if <[page]> == 1:
- narrate "<&nl><&color[#04BA04]><&chr[25C1]> <&r>Page <[page]>/<[max]> <[right_ar]><&nl>"
- stop
- if <[page]> == <[max]>:
- narrate "<&nl><[left_ar]> <&r>Page <[page]>/<[max]> <&color[#04BA04]><&chr[25B7]><&nl>"
- stop
- narrate "<&nl><[left_ar]> <&r>Page <[page]>/<[max]> <[right_ar]><&nl>"
total_votes_command:
type: command
usage: /total_votes
description: Gives you the total votes this server has
name: total_votes
debug: false
script:
- define total_votes 0
- foreach <server.flag[top_voters_all].keys> as:player:
- define num <server.flag[top_voters_all].get[<[player]>]>
- define total_votes <[total_votes].add[<[num]>]>
- narrate -----------------------
- narrate "<&a><[total_votes]><&f> total votes found"
- narrate -----------------------
get_total_task:
type: task
debug: false
script:
- define total_votes 0
- foreach <server.flag[top_voters_all].keys> as:player:
- define num <server.flag[top_voters_all].get[<[player]>]>
- define total_votes <[total_votes].add[<[num]>]>
- announce ------------------------------------
- announce "<[total_votes]> total votes found"
- announce ------------------------------------