View difference between Paste ID: rNU13K2g and mG3tUHNf
SHOW: | | - or go back to the newest paste.
1
options:
2
	aliasess2v2sign: [gun2v2]
3
	prefix: &e[ &cGunPvP 2v2 &e]
4
	perm: skript.admin
5
6-
on rightclick on a sign:
6+
command /2v2join:
7-
	if line 1 is "{@aliasess2v2sign}":
7+
	loop {_gun2v2.player::*}:
8-
		set line 1 of block to "[System]"
8+
		if loop-value is less than or equal to 4:
9-
		set line 2 of block to "2v2Duel"
9+
			set {_gun2v2.player::%player%} to player
10-
		set line 3 of block to "Join"
10+
			send "{@prefix} &aDuelに参加しました"
11
			if loop-value is equal to 0:
12-
on rightclick on a sign:
12+
				set {_gun2v2.red::%player%} to player
13-
	if line 1 is "[System]":
13+
				if loop-value is equal to 1:
14-
		if line 2 is "2v2Duel":
14+
					set {_gun2v2.red::%player%} to player
15-
			if line 3 is "Join":
15+
				if loop-value is equal to 2:
16
						set {_gun2v2.blue::%player%} to player
17-
					if loop-value is less than or equal to 4:
17+
				if loop-value is equal to 3:
18-
						set {_gun2v2.player::%player%} to player
18+
						set {_gun2v2.blue::%player%} to player
19-
						send "{@prefix} &aDuelに参加しました"
19+
				if loop-value is equal to 4:
20-
						if loop-value is equal to 0:
20+
						set {_gun2v2.battle} to true
21-
							set {_gun2v2.red::%player%} to player
21+
						send "{@prefix} &a30秒後に試合を開始します" to {_gun2v2.player::*}
22-
						if loop-value is equal to 1:
22+
						wait 30 second
23-
							set {_gun2v2.red::%player%} to player
23+
						if {_gun2v2.battle} is true:
24-
						if loop-value is equal to 2:
24+
							send "{@prefix} 試合開始10秒前" to {_gun2v2.player::*}
25-
							set {_gun2v2.blue::%player%} to player
25+
							wait 5 second
26-
						if loop-value is equal to 3:
26+
27-
							set {_gun2v2.blue::%player%} to player
27+
								send "{@prefix} 試合開始5秒前" to {_gun2v2.player::*}
28-
						if loop-value is equal to 4:
28+
								wait 2 second
29-
							set {_gun2v2.battle} to true
29+
30-
							send "{@prefix} &a30秒後に試合を開始します" to {_gun2v2.player::*}
30+
									send "{@prefix} 試合開始3秒前" to {_gun2v2.player::*}
31-
							wait 20 second
31+
									wait a second
32
									if {_gun2v2.battle} is true:
33-
								send "{@prefix} 試合開始10秒前" to {_gun2v2.player::*}
33+
										send "{@prefix} 試合開始2秒前" to {_gun2v2.player::*}
34-
								wait 5 second
34+
35
										if {_gun2v2.battle} is true:
36-
									send "{@prefix} 試合開始5秒前" to {_gun2v2.player::*}
36+
											send "{@prefix} 試合開始1秒前" to {_gun2v2.player::*}
37-
									wait 2 second
37+
38
												if {_gun2v2.battle} is true:
39-
										send "{@prefix} 試合開始3秒前" to {_gun2v2.player::*}
39+
40
													teleport  {_gun2v2.red::*} to the location {_gun2v2.spawn.red}
41
													teleport  {_gun2v2.blue::*} to the location {_gun2v2.spawn.blue}
42-
											send "{@prefix} 試合開始2秒前" to {_gun2v2.player::*}
42+
43
													if {_gun2v2.player::*} is set:
44-
											if {_gun2v2.battle} is true:
44+
45-
												send "{@prefix} 試合開始1秒前" to {_gun2v2.player::*}
45+
46-
												wait a second
46+
47
														delete {_gun2v2.player::*}
48
		else:
49
			send "{@prefix} &c参加人数に達しています"
50
51
on quit:
52
	if player is {_gun2v2.player::*}:
53
		delete {_gun2v2.player::*}
54
		delete {_gun2v2.red::*}
55
		delete {_gun2v2.blue::*}
56
		set {_gun2v2.battle} to false
57-
					else:
57+
58-
						send "{@prefix} &c参加人数に達しています"
58+
59
60
on damage:
61
	if {_gun2v2.red::*} is attacker and victim:
62
		cancel event
63
	if {_gun2v2.blue::*} is attacker and victim:
64
		cancel event
65
66
on death:
67
	if player is {_gun2v2.red::*}:
68
		wait a tick
69
		force respawn player
70
		wait a tick
71
		remove {_gun2v2.red::*} from player
72
		loop {_gun2v2.red::*}:
73
			if loop-value is equal to 0:
74
				loop {_gun2v2.player::*}:
75
					send "{@prefix} &b青チームの勝利!" to {_gun2v2.player::*}
76
					add 5 emerald to {_gun2v2.blue::*}
77
					delete {_gun2v2.red::*}
78
					delete {_gun2v2.blue::*}
79
					delete {_gun2v2.player::*}
80
	if player is {_gun2v2.blue::*}:
81
		force respawn player
82
		wait a tick
83
		remove {_gun2v2.blue::*} from player
84
		loop {_gun2v2.blue::*}:
85
			if loop-value is equal to 0:
86
				loop {_gun2v2.player::*}:
87
					send "{@prefix} &c赤チームの勝利!" to {_gun2v2.player::*}
88
					add 5 emerald to {_gun2v2.red::*}
89
					delete {_gun2v2.red::*}
90
					delete {_gun2v2.blue::*}
91
					delete {_gun2v2.player::*}
92
93
command /gunduel [<text>] [<text>] [<text>]:
94
	permission: {@perm}
95
	aliases: /gd
96
	trigger:
97
		if arg-1 is "set":
98
			if arg-2 is "spawn":
99
				if arg-3 is "red":
100
					set {_gun2v2.spawn.red} to location of player
101
				if arg-3 is "blue":
102
					set {_gun2v2.spawn.blue} to location of player