View difference between Paste ID: KMJWh0ZB and eNZEkHC4
SHOW: | | - or go back to the newest paste.
1
#KillerCaptains
2
#By Winter
3
#Thanks to 8bit for doing a bit of fine tuning!
4
#There is a few things to set up while doing this, please contact me on skype @ sketchypeanut if you need any help!
5
#Setup Tutorial - https://docs.google.com/document/d/1Xcn47ZdYTCQASXg43lD5h15eh4MU1s1KgYWTArEWnpI/edit
6
7
options:
8
	P: &8[&6KillerCaptains&8]&c
9
	Op: jdawgiscute.admin
10
	PM: &4You don't have the required permission to use this command.
11
12
command /setteams:
13
	permission: {@Op}
14
	permission message: {@PM}
15
	description: "Sets up teams for the game!"
16
	trigger:
17
		loop all players:
18
			execute console command "/team leave %loop-player%"
19
			command "/team create 1"
20
			command "/team create 2"
21
			command "/team create 3"
22
			command "/team create 4"
23
			command "/team create 5"
24
			command "/team create 6"
25
			command "/team create 7"
26
			command "/team create 8"	
27
			broadcast "{@P} Teams have been setup by &l&c%command sender%
28
	
29
command /resetkc:
30
	permission: {@Op}
31
	permission message: {@PM}
32
	description: "Do this before you start the game, resets everything."
33
	trigger:
34
		loop all players:
35
			delete {Captain.%loop-player%::*}
36
			delete {death::*}
37
			delete {slayers::*}
38
			delete {MyTeamNumber::%loop-player%}
39
		loop all players:
40
			add loop-player to {death::*}
41
			broadcast "{@P} has been reset!"
42
			stop
43
			
44
command /setkiller <integer> <player>:
45
	permission: {@Op}
46
	permission message: {@PM}
47
	description: "Sets the killer to the second argument."
48
	trigger:
49
		#Set Captain
50
		set {_captain} to arg 2
51
		set {MyTeamNumber::%arg 2%} to arg 1
52
		add {_captain} to {Captain.%arg 2%::*}
53
		add {_captain} to {slayers::*}
54
		remove {_captain} from {death::*}	
55
		broadcast "{@P} %arg 2% is Killer of Team %arg 1%!"
56
57
		#Add Captain
58
		set {_killer} to arg 2
59
		set {_TeamNumber} to arg 1
60
		command "/team join %{_TeamNumber}% %{_killer}%"
61
		
62
command /tparena:
63
	permission: {@Op}
64
	permission message: {@PM}
65
	description: "Teleports all players to the arena you will kill in."
66
	trigger:
67
		command sender command "/freeze"
68
		loop {death::*}:
69
			execute console command "/warp deathspawn %loop-value%"
70-
			give slowness 1 to loop-value
70+
			apply slowness 1 to loop-value
71
		loop {slayers::*}:
72
			execute console command "/warp slayersspawn %loop-value%"
73
			execute console command "/god %loop-value%"
74
			command "/give %loop-value% stone_sword 1"
75
			wait 5 seconds
76
			stop
77
			
78
command /startkill:
79
	permission: {@Op}
80
	permission message: {@PM}
81
	description: "Starts the killing process of killer captains."
82
	trigger:
83
		broadcast "{@P} will start in 10 seconds! Get ready to kill! (Or run!)"
84
		set {slay.inprogress} to true
85
		wait 4 seconds
86
		command sender command "/playsoundkc fireworks.launch"
87
		wait 1 second
88
		broadcast "{@P} 5..."
89
		command sender command "/playsoundkc note.harp"
90
		wait a second
91
		broadcast "{@P} 4..."
92
		command sender command "/playsoundkc note.harp"
93
		wait a second
94
		broadcast "{@P} 3..."
95
		command sender command "/playsoundkc note.harp"
96
		wait a second
97
		broadcast "{@P} 2..."
98
		command sender command "/playsoundkc note.harp"
99
		wait a second
100
		broadcast "{@P} 1..."
101
		command sender command "/freeze"
102
		command sender command "/playsoundkc note.harp"
103
		loop {death::*}:
104-
			give slowness 1 to loop-value
104+
			apply slowness 1 to loop-value
105
		wait a second
106
		broadcast "{@P} GO! Slay, slay, slay!"
107
		command "/playsoundkc mob.wither.death"
108
		
109
command /endkill:
110
	permission: {@Op}
111
	permission message: {@PM}
112
	description: "Ends the killing process."
113
	trigger:
114
		set {slay.inprogress} to false
115
		command sender command "/spawn"
116
		command sender command "/tpall"
117
		broadcast "{@P} The slaying has ended! All players have been eliminated!"
118
		loop {slayers::*}:
119
			execute console command "/god %loop-value%"
120
		loop all players:
121
			command sender command "/ci *"
122
123
on death of a player:
124
	if {slay.inprogress} is true:
125
		set {_dead} to victim
126
		set {_TeamNumber} to {MyTeamNumber::%attacker%}
127
		command "/team join %{_TeamNumber}% %{_dead}%"
128
		set {IAmDead.Dead::%victim%} to true
129
130
on respawn:
131
	wait 5 ticks
132
	{slay.inprogress} is true
133
	{IAmDead.Dead::%player%} is true
134
	execute console command "/warp killercaptains %player%"
135
	delete {IAmDead.Dead::%player%}
136
137
command /playsoundkc <text>:
138
	permission: {@Op}
139
	permission message: {@PM}
140
	trigger:
141
		loop all players:
142
			execute console command "playsound %arg 1% %loop-player%"