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: | |
7 | if line 1 is "{@aliasess2v2sign}": | |
8 | set line 1 of block to "[System]" | |
9 | set line 2 of block to "2v2Duel" | |
10 | set line 3 of block to "Join" | |
11 | ||
12 | on rightclick: | |
13 | - | if line 1 is "[System]": |
13 | + | block is a sign |
14 | - | if line 2 is "2v2Duel": |
14 | + | if line 1 of clicked block is "[System]": |
15 | - | if line 3 is "Join": |
15 | + | if line 2 of clicked block is "2v2Duel": |
16 | - | loop {_gun2v2.player::*}: |
16 | + | if line 3 of clicked block is "Join": |
17 | loop {gun2v2.player::*}: | |
18 | - | set {_gun2v2.player::%player%} to player |
18 | + | |
19 | set {gun2v2.player::%player%} to player | |
20 | send "{@prefix} &aDuelに参加しました" | |
21 | - | set {_gun2v2.red::%player%} to player |
21 | + | |
22 | set {gun2v2.red::%player%} to player | |
23 | - | set {_gun2v2.red::%player%} to player |
23 | + | |
24 | set {gun2v2.red::%player%} to player | |
25 | - | set {_gun2v2.blue::%player%} to player |
25 | + | |
26 | set {gun2v2.blue::%player%} to player | |
27 | - | set {_gun2v2.blue::%player%} to player |
27 | + | |
28 | set {gun2v2.blue::%player%} to player | |
29 | - | set {_gun2v2.battle} to true |
29 | + | |
30 | - | send "{@prefix} &a30秒後に試合を開始します" to {_gun2v2.player::*} |
30 | + | set {gun2v2.battle} to true |
31 | send "{@prefix} &a30秒後に試合を開始します" to {gun2v2.player::*} | |
32 | - | if {_gun2v2.battle} is true: |
32 | + | |
33 | - | send "{@prefix} 試合開始10秒前" to {_gun2v2.player::*} |
33 | + | if {gun2v2.battle} is true: |
34 | send "{@prefix} 試合開始10秒前" to {gun2v2.player::*} | |
35 | - | if {_gun2v2.battle} is true: |
35 | + | |
36 | - | send "{@prefix} 試合開始5秒前" to {_gun2v2.player::*} |
36 | + | if {gun2v2.battle} is true: |
37 | send "{@prefix} 試合開始5秒前" to {gun2v2.player::*} | |
38 | - | if {_gun2v2.battle} is true: |
38 | + | |
39 | - | send "{@prefix} 試合開始3秒前" to {_gun2v2.player::*} |
39 | + | if {gun2v2.battle} is true: |
40 | send "{@prefix} 試合開始3秒前" to {gun2v2.player::*} | |
41 | - | if {_gun2v2.battle} is true: |
41 | + | |
42 | - | send "{@prefix} 試合開始2秒前" to {_gun2v2.player::*} |
42 | + | if {gun2v2.battle} is true: |
43 | send "{@prefix} 試合開始2秒前" to {gun2v2.player::*} | |
44 | - | if {_gun2v2.battle} is true: |
44 | + | |
45 | - | send "{@prefix} 試合開始1秒前" to {_gun2v2.player::*} |
45 | + | if {gun2v2.battle} is true: |
46 | send "{@prefix} 試合開始1秒前" to {gun2v2.player::*} | |
47 | - | if {_gun2v2.battle} is true: |
47 | + | |
48 | - | send "{@prefix} 試合開始" to {_gun2v2.player::*} |
48 | + | if {gun2v2.battle} is true: |
49 | - | teleport {_gun2v2.red::*} to the location {_gun2v2.spawn.red} |
49 | + | send "{@prefix} 試合開始" to {gun2v2.player::*} |
50 | - | teleport {_gun2v2.blue::*} to the location {_gun2v2.spawn.blue} |
50 | + | teleport {gun2v2.red::*} to the location {gun2v2.spawn.red} |
51 | teleport {gun2v2.blue::*} to the location {gun2v2.spawn.blue} | |
52 | - | if {_gun2v2.player::*} is set: |
52 | + | |
53 | - | send "{@prefix} 試合終了 引き分けです" to {_gun2v2.player::*} |
53 | + | if {gun2v2.player::*} is set: |
54 | - | delete {_gun2v2.red::*} |
54 | + | send "{@prefix} 試合終了 引き分けです" to {gun2v2.player::*} |
55 | delete {gun2v2.red::*} | |
56 | delete {_gun2v2.blue::*} | |
57 | delete {_gun2v2.player::*} | |
58 | else: | |
59 | send "{@prefix} &c参加人数に達しています" | |
60 | ||
61 | - | if player is {_gun2v2.player::*}: |
61 | + | |
62 | - | delete {_gun2v2.player::*} |
62 | + | if player is {gun2v2.player::*}: |
63 | - | delete {_gun2v2.red::*} |
63 | + | delete {gun2v2.player::*} |
64 | - | delete {_gun2v2.blue::*} |
64 | + | delete {gun2v2.red::*} |
65 | - | set {_gun2v2.battle} to false |
65 | + | delete {gun2v2.blue::*} |
66 | - | loop {_gun2v2.player::*}: |
66 | + | set {gun2v2.battle} to false |
67 | - | send "{@prefix} &c参加しているプレイヤーが退出したため試合開始を中止します" to {_gun2v2.player::*} |
67 | + | loop {gun2v2.player::*}: |
68 | send "{@prefix} &c参加しているプレイヤーが退出したため試合開始を中止します" to {gun2v2.player::*} | |
69 | ||
70 | - | if {_gun2v2.red::*} is attacker and victim: |
70 | + | |
71 | if {gun2v2.red::*} is attacker and victim: | |
72 | - | if {_gun2v2.blue::*} is attacker and victim: |
72 | + | |
73 | if {gun2v2.blue::*} is attacker and victim: | |
74 | cancel event | |
75 | ||
76 | - | if player is {_gun2v2.red::*}: |
76 | + | |
77 | if player is {gun2v2.red::*}: | |
78 | wait a tick | |
79 | force respawn player | |
80 | - | remove {_gun2v2.red::*} from player |
80 | + | |
81 | - | loop {_gun2v2.red::*}: |
81 | + | remove {gun2v2.red::*} from player |
82 | loop {gun2v2.red::*}: | |
83 | - | loop {_gun2v2.player::*}: |
83 | + | |
84 | - | send "{@prefix} &b青チームの勝利!" to {_gun2v2.player::*} |
84 | + | loop {gun2v2.player::*}: |
85 | - | add 5 emerald to {_gun2v2.blue::*} |
85 | + | send "{@prefix} &b青チームの勝利!" to {gun2v2.player::*} |
86 | - | delete {_gun2v2.red::*} |
86 | + | add 5 emerald to {gun2v2.blue::*} |
87 | - | delete {_gun2v2.blue::*} |
87 | + | delete {gun2v2.red::*} |
88 | - | delete {_gun2v2.player::*} |
88 | + | delete {gun2v2.blue::*} |
89 | - | if player is {_gun2v2.blue::*}: |
89 | + | delete {gun2v2.player::*} |
90 | if player is {gun2v2.blue::*}: | |
91 | force respawn player | |
92 | - | remove {_gun2v2.blue::*} from player |
92 | + | |
93 | - | loop {_gun2v2.blue::*}: |
93 | + | remove {gun2v2.blue::*} from player |
94 | loop {gun2v2.blue::*}: | |
95 | - | loop {_gun2v2.player::*}: |
95 | + | |
96 | - | send "{@prefix} &c赤チームの勝利!" to {_gun2v2.player::*} |
96 | + | loop {gun2v2.player::*}: |
97 | - | add 5 emerald to {_gun2v2.red::*} |
97 | + | send "{@prefix} &c赤チームの勝利!" to {gun2v2.player::*} |
98 | - | delete {_gun2v2.red::*} |
98 | + | add 5 emerald to {gun2v2.red::*} |
99 | - | delete {_gun2v2.blue::*} |
99 | + | delete {gun2v2.red::*} |
100 | - | delete {_gun2v2.player::*} |
100 | + | delete {gun2v2.blue::*} |
101 | delete {gun2v2.player::*} | |
102 | ||
103 | command /gunduel [<text>] [<text>] [<text>]: | |
104 | permission: {@perm} | |
105 | aliases: /gd | |
106 | trigger: | |
107 | if arg-1 is "set": | |
108 | if arg-2 is "spawn": | |
109 | - | set {_gun2v2.spawn.red} to location of player |
109 | + | |
110 | set {gun2v2.spawn.red} to location of player | |
111 | - | set {_gun2v2.spawn.blue} to location of player |
111 | + | |
112 | set {gun2v2.spawn.blue} to location of player |