This repository was archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImpostersMC.sk
More file actions
2277 lines (1857 loc) · 96.9 KB
/
Copy pathImpostersMC.sk
File metadata and controls
2277 lines (1857 loc) · 96.9 KB
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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Created by Creaous on 3/01/2021
# Last edited by Creaous on 21/01/2021 at 10:38 PM
# DO NOT RE-EDIT THE CODE AND RE-UPLOAD, IT WILL BE TAKEN DOWN.
# This code is not for commerical use, do not sell, only use.
# Based off an original game by Innersloth Studios.
# All remaining content that is directed to their game, they own.
options:
# The version of the plugin.
Version: 1.0.0-beta.5
DevMode: false
# CREDITS:
# All credits marked with (J) mean Java Account, all ones marked with (B) mean Xbox Account.
#
# Mostly all if not all of the code is done/made by: Creaous_ (J).
# Original map made by: spadFour (https://www.planetminecraft.com/project/among-us-map-recreation-the-skeld/).
# Edited map made by: Creaous_ (J), RiptideDragon15 (J) and Gamerguy8282 (B).
# Game testers: ibxki1865 (B), Gamerguy8282 (B) and RiptideDragon15 (J).
# Some code was some samples, from my skripts and other peoples skripts.
#
# Original game made by: Innersloth Studios - Thanks for making it :)
# PLUGINS CREDITS:
# CCTV Plugin - Timdecoole123 - https://www.spigotmc.org/resources/security-camera-plugin-cctv-1-12-1-16-2.60310/
# Tablisknu - TIatoani - https://forums.skunity.com/resources/tablisknu.727/
# Skript - SkriptLang fork - https://github.com/SkriptLang/Skript/releases/latest
# SkBee - ShaneBee - https://github.com/ShaneBeee/SkBee/releases/latest
# Reqn - btk5h - https://github.com/btk5h/reqn/releases/latest
# Skent - Olyno - https://github.com/Olyno/skent/releases/latest
# ProtocolLib - dmulloy2 and aadnk - https://www.spigotmc.org/resources/protocollib.1997/
# -----------------------------------------------------------------------------------------------
# THE ACTUAL CODE IS BELOW (PLEASE READ THE WARNING THAT IS SHOWN BELOW):
# NOTE: Only edit if you know what you are doing, you will not receive any support with this.
# If you have the premium support version, you will not receive support using a modified version.
# -----------------------------------------------------------------------------------------------
# COMMANDS:
command /build:
permission: ImpostersMC.Build
permission message: &cYou are lacking the permission node: &eImpostersMC.Build &8| &cPlease contact the server administrator.
trigger:
if {OPTIONS::General::EnableBuildMode} is true:
if {ImpostersMC::BuildMode::Enabled::%player%} is not set:
set {ImpostersMC::BuildMode::Enabled::%player%} to true
send "&a&lEnabled build mode!"
else if {ImpostersMC::BuildMode::Enabled::%player%} is false:
set {ImpostersMC::BuildMode::Enabled::%player%} to true
send "&a&lEnabled build mode!"
else if {ImpostersMC::BuildMode::Enabled::%player%} is true:
set {ImpostersMC::BuildMode::Enabled::%player%} to false
send "&c&lDisabled build mode!"
else:
send "&c&l(!) &6The server's administrator has build mode disabled, they may be using a third-party plugin."
command /sabotage [<text>]:
trigger:
if {ImpostersMC::Game::Imposters::*} contains player:
# If the 1st argument is "lights".
if argument 1 is "Lights":
# Set the block at a location to air (the redstone block).
set block at location(109, 38, 352, "%{OPTIONS::General::World}%" parsed as world) to air
# Use the sabotage function with the argument as "lights".
sabotage(player, "Lights")
# Else if the 1st argument is "comms".
else if argument 1 is "Comms":
# Use the sabotage function with the argument as "comms".
sabotage(player, "Comms")
# Else if the 1st argument is "o2".
else if argument 1 is "O2":
# Use the sabotage function with the argument as "o2".
sabotage(player, "O2")
# Else if the 1st argument is not set.
else if argument 1 is not set:
# Open chest with 3 rows and named "Sabotage" in dark red.
open chest inventory with 3 rows named "&4&lSabotage" to player
# Format the 11th slot with a redstone lamp named "Lights" in light red to sabotage lights.
set slot 11 of player's current inventory to redstone lamp named "&cLights" with lore "&eTurn off all of the lights."
# Format the 13th slot with a nametag named "Comms" in light blue to sabotage comms.
set slot 13 of player's current inventory to nametag named "&9Comms" with lore "&eBlocks security cameras."
# Format the 15th slot with a water bottle named "O2" in gold to sabotage O2.
set slot 15 of player's current inventory to water bottle named "&bO2" with lore "&eRemove the crewmate's oxygen."
command /imc [<text>] [<text>]:
trigger:
if argument 1 is not set:
if player has permission "ImpostersMC.IMC":
send "&cImpostersMC &emade by &6Creaous"
send "&eRunning version: &6v%{OPTIONS::DONOTEDIT::Version}%"
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is not "host", "gamesettings", "start", "end", "wiki", "help":
make player execute command "/imc commands"
stop
else if argument 1 is "start":
if player has permission "ImpostersMC.Commands.IMC.Start":
# Use the start game function with the player as the argument.
startGame(player)
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is "end":
if player has permission "ImpostersMC.Commands.IMC.End":
# Use the end game function with the player as the argument.
endGame(player)
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is "host":
if player has permission "ImpostersMC.HostGame":
hostGame(player)
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is "gamesettings":
if player has permission "ImpostersMC.GameSettings":
openGameSettings(player)
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is "wiki":
if player has permission "ImpostersMC.Commands.IMC.Wiki":
send "&eThe wiki is located here: &6&o&l&n<link:https://github.com/Creaous/ImpostersMC-Skript/wiki>click here<reset>"
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 1 is "help":
if argument 2 is not set:
if player has permission "ImpostersMC.Commands.IMC.Help.Commands":
make player execute command "/imc help commands"
else:
send "&cSorry, but you don't have the permission to run this command!"
send "&f"
if player has permission "ImpostersMC.Commands.IMC.Help.Permissions":
make player execute command "/imc help permissions"
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 2 is "commands":
if player has permission "ImpostersMC.Commands.IMC.Help.Commands":
send "&9Commands Help:"
send "&6/build &8- &7Allows the player to build."
send "&6/whoami &8- &7Shows all information about the player."
send "&6/whoami mini &8- &7Shows tasks that the player has."
send "&6/imc &8- &7Shows the current version and who the script is by."
send "&6/imc host &8- &7Hosts the game."
send "&6/imc gamesettings &8- &7Changes game settings."
send "&6/imc start &8- &7Starts the game."
send "&6/imc end &8- &7Ends the game."
send "&6/imc wiki &8- &7Gives you a clickable link to the wiki."
send "&6/imc help &8- &7Gives you a help menu that contains both commands and permissions."
send "&6/imc help commands &8- &7Gives you a help menu that contains commands."
send "&6/imc help permissions &8- &7Gives you a help menu that contains permissions."
else:
send "&cSorry, but you don't have the permission to run this command!"
else if argument 2 is "permissions":
if player has permission "ImpostersMC.Commands.IMC.Help.Permissions":
send "&9Permissions Help:"
send "&6ImpostersMC.Build &8- &7Used by: /build"
send "&6ImpostersMC.Commands.IMC &8- &7Used by: /imc"
send "&6ImpostersMC.Commands.IMC.Help.Commands &8- &7Used by: /imc help commands & /imc help"
send "&6ImpostersMC.Commands.IMC.Help.Permissions &8- &7Used by: /imc help permissions & /imc help"
send "&6ImpostersMC.Commands.IMC.Start &8- &7Used by: /imc start"
send "&6ImpostersMC.Commands.IMC.End &8- &7Used by: /imc end"
send "&6ImpostersMC.Commands.IMC.Wiki &8- &7Used by: /imc wiki"
else:
send "&cSorry, but you don't have the permission to run this command!"
command /whoami [<text>]:
trigger:
# If the 1st argument isn't set.
if argument 1 is not set:
# Say the players name.
send "&6%player's name%"
# Say what job the player has ("imposter" or "cremwate").
send "&eJob: &6%{ImpostersMC::Game::Info::Job::%player%}%"
# Say what tasks the player has.
send "&eTasks: &6%{ImpostersMC::Game::Info::Tasks::%player%::*}%"
# Say how many finished tasks the player has.
send "&eYour finished tasks: &6%{ImpostersMC::Game::Info::Tasks::Finished::%player%}%"
# Say how many remaining tasks the player has.
send "&eRemaining tasks: &6%size of {ImpostersMC::Game::Info::Tasks::%player%::*}%"
else:
# Say what tasks the player has.
send "&eTasks: &6%{ImpostersMC::Game::Info::Tasks::%player%::*}%"
# EVENTS:
on hunger meter change:
if player's world is "%{OPTIONS::General::World}%":
set the player's food level to 200
on join:
# If the player is in the "impostersmc" world.
if player's world is "%{OPTIONS::General::World}%":
# If the player's job is "crewmate".
if {ImpostersMC::Game::Info::Job::%player%} is "crewmate":
# Remove the player from the crewmates team.
remove player from {ImpostersMC::Game::Crewmates::*}
# Set the player's gamemode to spectator mode.
set player's gamemode to spectator
# Else if the player's job is "imposter":
else if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
# Remove the player from the imposters team.
remove player from {ImpostersMC::Game::Imposters::*}
# Set the player's gamemode to spectator mode.
set player's gamemode to spectator
on quit:
# If the player is in the "impostersmc" world.
if player's world is "%{OPTIONS::General::World}%":
# If the player's job is "crewmate".
if {ImpostersMC::Game::Info::Job::%player%} is "crewmate":
# Remove the player from the crewmates team.
remove player from {ImpostersMC::Game::Crewmates::*}
# Set the player's gamemode to spectator mode.
set player's gamemode to spectator
# Else if the player's job is "imposter":
else if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
# Remove the player from the imposters team.
remove player from {ImpostersMC::Game::Imposters::*}
# Set the player's gamemode to spectator mode.
set player's gamemode to spectator
command /givealltasks:
trigger:
if {@DevMode} is true:
set {_p} to player
add "Lower Engine" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Upper Engine" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Cafeteria: Empty" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Cafeteria: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Weapons: Clear" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Weapons: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Weapons: Divert" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "O2: Empty Chute" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "O2: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "O2: Clean filter" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Nav: Chart" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Nav: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Nav: Divert" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Nav: Stabilize" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Shields: Divert" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Shields: Prime" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Comms: Divert" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Comms: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Storage: Fuel" to {ImpostersMC::Game::Tasks::*}
add "Admin: Swipe Card" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Electric: Calibrate" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Electric: Fix" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Electric: Upload" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Reactor: Start" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Reactor: Unlock" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Security: Divert" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
add "Medbay: Scan" to {ImpostersMC::Game::Info::Tasks::%{_p}%::*}
on chat:
# If the player is in the correct world.
if player's world is "%{OPTIONS::General::World}%":
# If the game's allowed to talk is true.
if {ImpostersMC::Game::AllowedToTalk} is true:
if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "Imposters":
cancel event
send "&aChanged Amount of Imposters."
set {ImpostersMC::Game::Settings::Imposters} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "ConfirmEjects":
cancel event
send "&aChanged Confirm Ejects."
set {ImpostersMC::Game::Settings::ConfirmEjects} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "NumberOfMeetings":
cancel event
send "&aChanged Amount of Meetings."
set {ImpostersMC::Game::Settings::NumberOfMeetings} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "MeetingCooldown":
cancel event
send "&aChanged Meeting Cooldown."
set {ImpostersMC::Game::Settings::MeetingCooldown} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "PlayerSpeed":
cancel event
send "&aChanged Player Speed."
set {ImpostersMC::Game::Settings::PlayerSpeed} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "DiscussionTime":
cancel event
send "&aChanged Discussion Time."
set {ImpostersMC::Game::Settings::DiscussionTime} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "VotingTime":
cancel event
send "&aChanged Voting Time."
set {ImpostersMC::Game::Settings::VotingTime} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else if {ImpostersMC::Game::TEMP::%player%::GameSettingsChat} is "KillCooldown":
cancel event
send "&aChanged Kill Cooldown."
set {ImpostersMC::Game::Settings::KillCooldown} to message
delete {ImpostersMC::Game::TEMP::%player%::GameSettingsChat}
loop all players:
if loop-player's world is "%{OPTIONS::General::World}%":
gameUpdateBoard(loop-player)
make player execute command "/imc gamesettings"
else:
if {ImpostersMC::Dead::%player%} is true:
cancel event
send "&cYou can't speak when your dead."
else:
# Loop all players.
loop all players:
# If the loop-player is in the correct world.
if loop-player's world is "%{OPTIONS::General::World}%":
# If the message is the loop-player.
if message is loop-player:
# If the difference between the vote timer and now is less than 10 seconds.
if difference between {ImpostersMC::Game::VoteTimer} and now is less than "%{ImpostersMC::Game::Settings::VotingTime}% seconds" parsed as timespan:
if {ImpostersMC::Dead::%loop-player%} is true:
cancel event
send "&cThe person you are trying to vote for is dead!"
# If the player's voted isn't set.
else if {ImpostersMC::Game::Voted::%player%} is not set:
# Cancel the event.
cancel event
# Set the player's voted to now.
set {ImpostersMC::Game::Voted::%player%} to now
# Add 1 to the arg-player's vote list.
add 1 to {ImpostersMC::Game::VoteList::%message%}
# Say that your vote has been counted.
send "&aYour vote towards &6%message% &ahas been counted!"
broadcast "&6%player% &evoted!" in world("%{OPTIONS::General::World}%")
else:
cancel event
# Say you have already voted.
send "&cYou have already voted."
else if message is "skip":
if {ImpostersMC::Dead::%player%} is true:
send "&cYou are dead, you can't vote!"
else:
# If the difference between the vote timer and now is less than 10 seconds.
if difference between {ImpostersMC::Game::VoteTimer} and now is less than "%{OPTIONS::Timers::VoteTimer}% seconds" parsed as timespan:
# If the player's voted isn't set.
if {ImpostersMC::Game::Voted::%player%} is not set:
# Cancel the event.
cancel event
# Set the player's voted to now.
set {ImpostersMC::Game::Voted::%player%} to now
# Add 1 to the arg-player's vote list.
add 1 to {ImpostersMC::Game::VoteList::%message%}
# Say that your vote has been counted.
send "&aYou have skipped voting!"
broadcast "&6%player% &evoted!" in world("%{OPTIONS::General::World}%")
else:
# Say you have already voted.
send "&cYou have already voted."
else:
# Cancel the event.
cancel event
# Say that they are not allowed to speak apart during reporting bodies and emergency meetings.
send "&cYou are not allowed to speak. Only during reporting bodies and emergency meetings."
on left-click:
if player's world is "%{OPTIONS::General::World}%":
if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
make player execute command "/sabotage"
on right-click:
# If the player is in the correct world.
if player's world is "%{OPTIONS::General::World}%":
# If the block is a iron trapdoor.
if block is iron trapdoor:
if {ImpostersMC::Game::Started} is true:
# If the player's job is "imposter".
if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
# Teleport the player above the iron trapdoor.
teleport the player above the block
else:
# Say that they aren't the imposter.
send "&c&lYou are not an imposter!"
# If the block is a stone button.
if block is stone button:
# Use the callMeeting function with "emergencyMeeting" as the argument.
callMeeting(player, "emergencyMeeting")
on sneak toggle:
# if the player is in the correct world.
if player's world is "%{OPTIONS::General::World}%":
# If the player is sneaking.
if player is sneaking:
# If the block under the player is an iron trapdoor.
if block under player is iron trapdoor:
if {ImpostersMC::Game::Started} is true:
# If the player's job is "imposter".
if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
# Teleport the player 2 metres under themselves.
teleport player to location 2 meters under the player
# Say vented.
send "&7&lVented!"
else:
# Say that they aren't the imposter.
send "&c&lYou are not an imposter!"
on sign change:
# If line 1 of the sign is "[ImpostersMC]".
if line 1 is "[ImpostersMC]":
# If line 1 of the sign is "[Task]".
if line 2 is "[Task]":
# Send a message in lime green saying placed sign.
send "&aPlaced sign!"
# Set the first line to "[ImpostersMC]" in red.
set line 1 of block to "&c[ImpostersMC]"
# Set the second line to "[Task]" in lime green.
set line 2 of block to "&a[Task]"
# Set the third line to the third line but in yellow.
set line 3 of block to "&e%line 3%"
on damage:
if attacker's world is "%{OPTIONS::General::World}%":
# If the difference between the vote timer and now is less than 10 seconds.
if difference between {ImpostersMC::Game::VoteTimer} and now is more than "%{OPTIONS::Timers::VoteTimer}% seconds" parsed as timespan:
if {ImpostersMC::Game::Started} is true:
# Cancel the event.
cancel event
# Send you are not an imposter to the attacker.
send "&c&lYou are not allowed to kill during meetings or reporting bodies!" to attacker
else:
if {ImpostersMC::Game::Started} is true:
# If the games imposter list contains the attackers name.
if {ImpostersMC::Game::Imposters::*} contains "%attacker%":
increase damage by 1000%
# Set the Kill Cooldown Cooldown to true.
set {ImpostersMC::Game::KillCooldown::%attacker%::OnCooldown} to true
# Set the Kill Cooldown Time to the KillCooldown variable.
set {ImpostersMC::Game::KillCooldown::%attacker%::Time} to {ImpostersMC::Game::Settings::KillCooldown}
else:
# Cancel the event.
cancel event
# Send you are not an imposter to the attacker.
send "&c&lYou are not an imposter!" to attacker
on death of player:
# If the player's world is the correct world.
if player's world is "%{OPTIONS::General::World}%":
# Set the player's death message to nothing.
set death message to ""
set {ImpostersMC::Dead::%player%} to true
if {ImpostersMC::Game::Info::Job::%player%} is "crewmate":
remove player from {ImpostersMC::Game::Crewmates::*}
if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
remove player from {ImpostersMC::Game::Imposters::*}
on right-click:
# If the player's world is the correct world.
if player's world is "%{OPTIONS::General::World}%":
# If the block is a sign.
if block is sign:
# Engines:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eLower Engine":
DoTask(player, "Lower Engine")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eUpper Engine":
DoTask(player, "Upper Engine")
# Cafeteria:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eCafeteria: Empty":
DoTask(player, "Cafeteria: Empty")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eCafeteria: Upload":
DoTask(player, "Cafeteria: Upload")
# Weapons:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eWeapons: Clear":
DoTask(player, "Weapons: Clear")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eWeapons: Upload":
DoTask(player, "Weapons: Upload")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eWeapons: Divert":
DoTask(player, "Weapons: Divert")
# O2:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eO2: Empty Chute":
DoTask(player, "O2: Empty chute")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eO2: Upload":
DoTask(player, "O2: Upload")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eO2: Clean filter":
DoTask(player, "O2: Clean filter")
# Navigation:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eNav: Chart":
DoTask(player, "Nav: Chart")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eNav: Upload":
DoTask(player, "Nav: Upload")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eNav: Divert":
DoTask(player, "Nav: Divert")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eNav: Stabilize":
DoTask(player, "Nav: Stabilize")
# Shields:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eShields: Divert":
DoTask(player, "Shields: Divert")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eShields: Prime":
DoTask(player, "Shields: Prime")
# Communications:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eComms: Divert":
DoTask(player, "Comms: Divert")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eComms: Upload":
DoTask(player, "Comms: Upload")
# Storage:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eStorage: Fuel":
DoTask(player, "Storage: Fuel")
# Admin:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eAdmin: Swipe Card":
DoTask(player, "Admin: Swipe Card")
# Electrical:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eElectric: Calibrate":
DoTask(player, "Electric: Calibrate")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eElectric: Fix":
DoTask(player, "Electric: Fix")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eElectric: Upload":
DoTask(player, "Electric: Upload")
# Reactor:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eReactor: Start":
DoTask(player, "Reactor: Start")
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eReactor: Unlock":
DoTask(player, "Reactor: Unlock")
# Security:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eSecurity: Divert":
DoTask(player, "Security: Divert")
# Medbay:
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eMedbay: Scan":
DoTask(player, "Medbay: Scan")
# Death
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Death]":
callMeeting(player, "reportBody")
break the block
# Fix Lights
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eFix Lights":
if block at location(109, 38, 352, "%{OPTIONS::General::World}%" parsed as world) is air:
DoTask(player, "S: Fix Lights")
else:
send "&cLights aren't out yet."
# Fix Comms
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eFix Comms":
if block at location(149, 34, 376, "%{OPTIONS::General::World}%" parsed as world) is iron block:
DoTask(player, "S: Comms")
else:
send "&cComms aren't out yet."
# Fix O2
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eFix O2: 1":
if {ImpostersMC::Game::Sabotage::O2} is true:
if {ImpostersMC::Game::Sabotage::O2::Finished} is 0 or 1:
DoTask(player, "S: Fix O2: 1")
else:
send "&cO2 isn't out yet."
if line 1 is "&c[ImpostersMC]":
if line 2 is "&a[Task]":
if line 3 is "&eFix O2: 2":
if {ImpostersMC::Game::Sabotage::O2} is true:
if {ImpostersMC::Game::Sabotage::O2::Finished} is 0 or 1:
DoTask(player, "S: Fix O2: 2")
else:
send "&cO2 isn't out yet."
on place:
if {OPTIONS::General::EnableBuildMode} is true:
if player's world is "%{OPTIONS::General::World}%":
if player has permission "ImpostersMC.Build":
if {ImpostersMC::BuildMode::Enabled::%player%} is false:
cancel event
send "&c&l(!) &6Build mode isn't enabled. Please enable it by running &e/build&6."
else:
cancel event
send "&c&l(!) &6You are not allowed to build here!"
on break:
if {OPTIONS::General::EnableBuildMode} is true:
if player's world is "%{OPTIONS::General::World}%":
if player has permission "ImpostersMC.Build":
if {ImpostersMC::BuildMode::Enabled::%player%} is false:
cancel event
send "&c&l(!) &6Build mode isn't enabled. Please enable it by running &e/build&6."
else:
cancel event
send "&c&l(!) &6You are not allowed to break here!"
on join:
if player has permission "ImpostersMC.Build":
set {ImpostersMC::BuildMode::Enabled::%player%} to false
on death of player:
# If the player's in the correct world.
if player's world is "%{OPTIONS::General::World}%":
# Set the block at the victim's location to a OAK sign.
set block at victim's location to oak sign
# Set the first line to [ImpostersMC] in red text.
set 1st line of block at victim to "&c[ImpostersMC]"
# Set the first line to [Death] in lime green text.
set 2nd line of block at victim to "&a[Death]"
# Set the first line to the victim's in yellow text.
set 3rd line of block at victim to "&e%victim%"
add victim's location to {ImpostersMC::Game::Deaths::*}
# Set the {_players::*} to every player in the world.
set {_players::*} to all players in world("%{OPTIONS::General::World}%")
# Set {_playerscount} to the size of the {_players::*} variable.
set {_playerscount} to size of {_players::*}
# If the game started is true.
if {ImpostersMC::Game::Started} is true:
# If the player's job is "imposter".
if {ImpostersMC::Game::Info::Job::%player%} is "imposter":
# Remove the player from the imposters list.
remove player from {ImpostersMC::Game::Imposters::*}
# Else if the player's job is "cremwate".
else if {ImpostersMC::Game::Info::Job::%player%} is "crewmate":
# Remove the player from the cremwates list.
remove player from {ImpostersMC::Game::Crewmates::*}
# If the players count is less than 3.
if {_playerscount} is less than 3:
# Set the game started to false.
set {ImpostersMC::Game::Started} to false
# Force the player to respawn.
force player to respawn
# Set the player's gamemode to spectator.
set player's gamemode to spectator
# Teleport the player to the emergency meeting table location in the world.
teleport the player to location(110, 34, 288, "%{OPTIONS::General::World}%" parsed as world)
# Say that they died in red text.
send "&c&lYou died!"
every 1 second:
# If the Emergency Meeting Cooldown is true.
if {ImpostersMC::EmergencyMeeting::OnCooldown} is true:
# If the Emergency Meeting Time is 0.
if {ImpostersMC::EmergencyMeeting::Time} is less than 0:
# Delete the Emergency Meeting Time.
delete {ImpostersMC::EmergencyMeeting::Time}
# Set the Emergency Meeting Cooldown to false.
set {ImpostersMC::EmergencyMeeting::OnCooldown} to false
# Set the allowed to talk variable to false.
set {ImpostersMC::Game::AllowedToTalk} to true
else:
# Remove 1 from the Emergency Meeting Time.
remove 1 from {ImpostersMC::EmergencyMeeting::Time}
loop all players:
# If the Kill Cooldown is true.
if {ImpostersMC::Game::KillCooldown::%loop-player%::OnCooldown} is true:
# If the Kill Cooldown Time is 0.
if {ImpostersMC::Game::KillCooldown::%loop-player%::Time} is 0:
# Delete the Kill Cooldown Time.
delete {ImpostersMC::Game::KillCooldown::%loop-player%::Time}
# Set the Kill Cooldown Cooldown to false.
set {ImpostersMC::Game::KillCooldown::%loop-player%::OnCooldown} to false
else:
# Remove 1 from the Kill Cooldown Time.
remove 1 from {ImpostersMC::Game::KillCooldown::%loop-player%::Time}
# If the Sabotage Lights Cooldown is true.
if {ImpostersMC::SabotageCooldown_Lights::OnCooldown} is true:
# If the Sabotage Lights Time is 0.
if {ImpostersMC::SabotageCooldown_Lights::Time} is 0:
# Delete the Sabotage Lights Time.
delete {ImpostersMC::SabotageCooldown_Lights::Time}
# Set the Sabotage Lights Cooldown to false.
set {ImpostersMC::SabotageCooldown_Lights::OnCooldown} to false
else:
# Remove 1 from the Sabotage Lights Time.
remove 1 from {ImpostersMC::SabotageCooldown_Lights::Time}
# If the Sabotage O2 Cooldown is true.
if {ImpostersMC::SabotageCooldown_O2::OnCooldown} is true:
# If the Sabotage O2 Time is 0.
if {ImpostersMC::SabotageCooldown_O2::Time} is 0:
# Delete the Sabotage O2 Time.
delete {ImpostersMC::SabotageCooldown_O2::Time}
# Set the Sabotage O2 Cooldown to false.
set {ImpostersMC::SabotageCooldown_O2::OnCooldown} to false
else:
# Remove 1 from the Sabotage O2 Time.
remove 1 from {ImpostersMC::SabotageCooldown_O2::Time}
# If the Sabotage Comms Cooldown is true.
if {ImpostersMC::SabotageCooldown_Comms::OnCooldown} is true:
# If the Sabotage Comms Time is 0.
if {ImpostersMC::SabotageCooldown_Comms::Time} is 0:
# Delete the Sabotage Comms Time.
delete {ImpostersMC::SabotageCooldown_Comms::Time}
# Set the Sabotage Comms Cooldown to false.
set {ImpostersMC::SabotageCooldown_Comms::OnCooldown} to false
else:
# Remove 1 from the Sabotage Comms Time.
remove 1 from {ImpostersMC::SabotageCooldown_Comms::Time}
# If the difference between the vote timer and now is less than 10 seconds.
if difference between {ImpostersMC::Game::VoteTimer} and now is more than "%{ImpostersMC::Game::Settings::VotingTime}% seconds" parsed as timespan:
# Clear the vote timer.
clear {ImpostersMC::Game::VoteTimer}
# Delete everyone's voted.
delete {ImpostersMC::Game::Voted::*}
# Set "{_sorted::*}" to a storted list of the votes.
set {_sorted::*} to sorted {ImpostersMC::Game::VoteList::*}
# Set "{_top}" to the last element out of the sorted votes.
set {_top} to last element out of {_sorted::*}
# If {_top} isn't set .
if {_top} is not set:
# Broadcast that none voted in the right world.
broadcast "&eNone voted!" in world("%{OPTIONS::General::World}%")
# Do nothing else.
stop
# Loop the vote list.
loop {ImpostersMC::Game::VoteList::*}:
# If loop-value is {_top}.
loop-value is {_top}
# If {_p} is set.
if {_p} is set:
# Broadcast that there was a tie in the right world.
broadcast "&eTie!" in world("%{OPTIONS::General::World}%")
# Do nothing else
stop
# Set {_p} to the loop-index.
set {_p} to loop-index
# Broadcast that the {_p} is getting ejected and had {_top} votes in the right world.
broadcast "&eEjecting &6%{_p}%&e, they had &6%{_top}% &evotes!" in world("%{OPTIONS::General::World}%")
# Eject the player using the function.
ejectPlayer({_p} parsed as player) # IMPLEMENT LATER
# Delete all of the Emergency Meeting seats.
delete {ImpostersMC::Game::EmergencyMeeting::Seats::*}
# All of the seats location for emergency meetings (& reporting bodies).
add location(120, 34, 388, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(120, 34, 389, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(120, 34, 387, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(119, 34, 391, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(118, 34, 391, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(117, 34, 391, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(116, 34, 389, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(116, 34, 388, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(116, 34, 387, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(117, 34, 386, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(118, 34, 386, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
add location(119, 34, 386, "%{OPTIONS::General::World}%" parsed as world) to {ImpostersMC::Game::EmergencyMeeting::Seats::*}
every 2 seconds:
if {ImpostersMC::Game::Started} is true:
set {_players::*} to all players in world("%{OPTIONS::General::World}%")
set {_playerscount} to size of {_players::*}
#if {_playerscount} is less than 3: # !!! CHANGE TO 3 !!!
# set {ImpostersMC::Game::Started} to false
# winGame("imposters")
if size of {ImpostersMC::Game::Imposters::*} is less than 1:
set {ImpostersMC::Game::Started} to false
winGame("crewmates")
if {ImpostersMC::Game::Imposters::*} is not set:
set {ImpostersMC::Game::Started} to false
winGame("crewmates")
if size of {ImpostersMC::Game::Crewmates::*} is less than 2: # !!! CHANGE TO 2 !!!
set {ImpostersMC::Game::Started} to false
winGame("imposters")
if {ImpostersMC::Game::Crewmates::*} is not set:
set {ImpostersMC::Game::Started} to false