Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variables:
- {G.1} = 0
- {G.2} = 0
- {G.3} = 0
- {P.1} = 0
- {P.2} = 0
- {P.3} = 0
- {SW.pcount} = 0
- {SW.begin} = 0
- {%player%.CWCT} = 0
- {%player%.CWKT} = 0
- {%player%.CWKT2} = 0
- {%player%.CWISA} = 0
- {%player%.CWAD} = 0
- {SW.GD} = 0
- {SW.PD} = 0
- {SW.GSP} = 0
- {SW.PSP} = 0
- command /sw <text> [<int>]:
- trigger:
- if arg 1 is "begin":
- if {SW.begin} is not 0:
- message "&a[The Ship War Game]&r 既に始まっています!"
- if {SW.begin} is 0:
- broadcast "&a[The Ship War Game]&r 戦艦ゲームが始まります!"
- broadcast "&a[The Ship War Game]&r 参加するには: /sw join と打って下さい"
- set {SW.begin} to 1
- if arg 1 is "kit":
- if {SW.begin} is 2:
- if player is {G.1} or {G.2} or {G.3} or {P.1} or {P.2} or {P.3}:
- execute console command "/clear %player% stick"
- execute console command "/clear %player% iron_block"
- if arg 2 is not set:
- message "&a[The Ship War Game]&r &c番号を指定してください!"
- if arg 2 is 1:
- execute console command "/effect %player% health_boost 10000 44"
- execute console command "/effect %player% instant_health 10 100"
- set {%player%.CWKT} to 1
- if player is {G.1} or {P.1}:
- execute console command "/give %player% stick"
- if player is {G.2} or {G.3} or {P.2} or {P.3}:
- execute console command "/shot give %player% ts-502"
- execute console command "/shot give %player% ts-503"
- broadcast "&a[The Ship War Game]&r %player% さんが バランスキットを選択しました!"
- if arg 2 is 2:
- execute console command "/effect %player% health_boost 10000 34"
- execute console command "/effect %player% instant_health 10 100"
- set {%player%.CWKT} to 2
- if player is {G.1} or {P.1}:
- execute console command "/give %player% stick"
- if player is {G.2} or {G.3} or {P.2} or {P.3}:
- execute console command "/shot give %player% ts-500"
- execute console command "/shot give %player% ts-503"
- broadcast "&a[The Ship War Game]&r %player% さんが アタックキットを選択しました!"
- if arg 2 is 3:
- execute console command "/effect %player% health_boost 10000 49"
- execute console command "/effect %player% instant_health 10 100"
- set {%player%.CWKT} to 3
- if player is {G.1} or {P.1}:
- execute console command "/give %player% stick"
- if player is {G.2} or {G.3} or {P.2} or {P.3}:
- execute console command "/shot give %player% ts-501"
- execute console command "/shot give %player% ts-503"
- broadcast "&a[The Ship War Game]&r %player% さんが ヘルスキットを選択しました!"
- if arg 2 is not 1 or 2 or 3:
- message "&a[The Ship War Game]&r &c番号が違います!"
- if arg 1 is "join":
- if {SW.begin} is 1:
- if {%player%.CWAD} is 0:
- set {SW.pcount} to {SW.pcount} + 1
- if {SW.pcount} is 1:
- set {G.1} to player
- broadcast "&a[The Ship War Game]&r &a緑の戦艦の操縦/機関手は %player% さんになりました! [1/6]"
- set {%player%.CWAD} to 1
- if {SW.pcount} is 2:
- set {G.2} to player
- broadcast "&a[The Ship War Game]&r &a緑の戦艦の砲手は %player% さんになりました! [2/6]"
- set {%player%.CWAD} to 1
- if {SW.pcount} is 3:
- set {G.3} to player
- broadcast "&a[The Ship War Game]&r &a緑の戦艦の砲手は %player% さんになりました! [3/6]"
- set {%player%.CWAD} to 1
- if {SW.pcount} is 4:
- set {P.1} to player
- broadcast "&a[The Ship War Game]&r &d紫の戦艦の操縦/機関手は %player% さんになりました! [4/6]"
- set {%player%.CWAD} to 1
- if {SW.pcount} is 5:
- set {P.2} to player
- broadcast "&a[The Ship War Game]&r &d紫の戦艦の砲手は %player% さんになりました! [5/6]"
- set {%player%.CWAD} to 1
- if {SW.pcount} is 6:
- set {P.3} to player
- set {SW.begin} to 2
- set {%player%.CWAD} to 1
- broadcast "&a[The Ship War Game]&r &d紫の戦艦の砲手は %player% さんになりました! [6/6]"
- broadcast "&a[The Ship War Game]&r &e各自キットを選択してください!/sw kit 数字 で選択できます;"
- broadcast "&a[The Ship War Game]&r [1]: バランスキット 体力:100♡(共通) 武装:操縦手[速度/回復] 砲手[主砲/副砲]"
- broadcast "&a[The Ship War Game]&r [2]: アタックキット 体力:70♡(共通) 武装:操縦手[速度/回復Ⅱ] 砲手[速射砲/副砲]"
- broadcast "&a[The Ship War Game]&r [3]: ヘルスキット 体力:120♡(共通) 武装:操縦手[速度Ⅱ/回復] 砲手[魚雷/副砲]"
- broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
- while {SW.pcount} is not 12:
- wait 1 seconds
- loop all players:
- send title "戦闘が始まります!" to loop-player
- set {G.1}'s walk speed to 0.1
- set {P.1}'s walk speed to 0.1
- teleport {G.1} to {SW.GSP}
- teleport {P.1} to {SW.PSP}
- on any movement:
- if player is {G.2} or {G.3} or {P.2} or {P.3}:
- cancel event
- set player's walk speed to 0
- every ticks:
- if {SW.pcount} is 3:
- if {%{G.2}%.CWISA} is 0:
- execute console command "/execute %{G.1}% ~ ~ ~ tp %{G.2}% ~ ~ ~1"
- if {%{G.3}%.CWISA} is 0:
- execute console command "/execute %{G.1}% ~ ~ ~ tp %{G.3}% ~ ~ ~-1"
- if {%{P.2}%.CWISA} is 0:
- execute console command "/execute %{P.1}% ~ ~ ~ tp %{P.2}% ~ ~ ~1"
- if {%{P.3}%.CWISA} is 0:
- execute console command "/execute %{P.1}% ~ ~ ~ tp %{P.3}% ~ ~ ~-1"
- On right click with stick:
- if {SW.pcount} is 3:
- if {%player%.CWCT} is less than 0:
- if {%player%.CWKT} is 1 or 3:
- execute console command "/execute %player% ~ ~ ~ effect @a[r=2] instant_health 1 2"
- set {%player%.CWKT} to 30
- if {%player%.CWKT} is 2:
- execute console command "/execute %player% ~ ~ ~ effect @a[r=2] instant_health 1 3"
- set {%player%.CWKT} to 30
- On left click with stick:
- if {SW.pcount} is 3:
- if {%player%.CWCT} is less than 0:
- if {%player%.CWKT} is 1:
- execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 4"
- set {%player%.CWKT2} to 30
- if {%player%.CWKT} is 2:
- execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 7"
- set {%player%.CWKT2} to 30
- if {%player%.CWKT} is 3:
- execute console command "/execute %player% ~ ~ ~ effect @a[r=2] speed 4 4"
- set {%player%.CWKT2} to 30
- every seconds:
- if {SW.pcount} is 3:
- loop all players:
- set {%loop-player%.CWCT} to {%loop-player%.CWCT} - 1
- set {%loop-player%.CWKT2} to {%loop-player%.CWKT2} - 1
- if {SW.PD} is 3:
- broadcast "&a[The Ship War Game]&r 緑艦の勝利です!おめでとうございます!"
- broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
- set {%{G.1}%.CWCT} to 0
- set {%{G.2}%.CWCT} to 0
- set {%{G.3}%.CWCT} to 0
- set {%{P.1}%.CWCT} to 0
- set {%{P.2}%.CWCT} to 0
- set {%{P.3}%.CWCT} to 0
- set {%{G.1}%.CWKT} to 0
- set {%{G.2}%.CWKT} to 0
- set {%{G.3}%.CWKT} to 0
- set {%{P.1}%.CWKT} to 0
- set {%{P.2}%.CWKT} to 0
- set {%{P.3}%.CWKT} to 0
- set {%{G.1}%.CWKT2} to 0
- set {%{G.2}%.CWKT2} to 0
- set {%{G.3}%.CWKT2} to 0
- set {%{P.1}%.CWKT2} to 0
- set {%{P.2}%.CWKT2} to 0
- set {%{P.3}%.CWKT2} to 0
- set {%{G.1}%.CWISA} to 0
- set {%{G.2}%.CWISA} to 0
- set {%{G.3}%.CWISA} to 0
- set {%{P.1}%.CWISA} to 0
- set {%{P.2}%.CWISA} to 0
- set {%{P.3}%.CWISA} to 0
- set {%{G.1}%.CWAD} to 0
- set {%{G.2}%.CWAD} to 0
- set {%{G.3}%.CWAD} to 0
- set {%{P.1}%.CWAD} to 0
- set {%{P.2}%.CWAD} to 0
- set {%{P.3}%.CWAD} to 0
- set {G.1} to 0
- set {G.2} to 0
- set {G.3} to 0
- set {P.1} to 0
- set {P.2} to 0
- set {P.3} to 0
- set {SW.pcount} to 0
- set {SW.begin} to 0
- set {SW.GD} to 0
- set {SW.PD} to 0
- if {SW.GD} is 3:
- broadcast "&a[The Ship War Game]&r 紫艦の勝利です!おめでとうございます!"
- broadcast "&a[The Ship War Game]&r &dP: %{G.1}% %{G.2}% %{G.3}% &eY: %{Y.1}% %{Y.2}% %{Y.3}%"
- set {%{G.1}%.CWCT} to 0
- set {%{G.2}%.CWCT} to 0
- set {%{G.3}%.CWCT} to 0
- set {%{P.1}%.CWCT} to 0
- set {%{P.2}%.CWCT} to 0
- set {%{P.3}%.CWCT} to 0
- set {%{G.1}%.CWKT} to 0
- set {%{G.2}%.CWKT} to 0
- set {%{G.3}%.CWKT} to 0
- set {%{P.1}%.CWKT} to 0
- set {%{P.2}%.CWKT} to 0
- set {%{P.3}%.CWKT} to 0
- set {%{G.1}%.CWKT2} to 0
- set {%{G.2}%.CWKT2} to 0
- set {%{G.3}%.CWKT2} to 0
- set {%{P.1}%.CWKT2} to 0
- set {%{P.2}%.CWKT2} to 0
- set {%{P.3}%.CWKT2} to 0
- set {%{G.1}%.CWISA} to 0
- set {%{G.2}%.CWISA} to 0
- set {%{G.3}%.CWISA} to 0
- set {%{P.1}%.CWISA} to 0
- set {%{P.2}%.CWISA} to 0
- set {%{P.3}%.CWISA} to 0
- set {%{G.1}%.CWAD} to 0
- set {%{G.2}%.CWAD} to 0
- set {%{G.3}%.CWAD} to 0
- set {%{P.1}%.CWAD} to 0
- set {%{P.2}%.CWAD} to 0
- set {%{P.3}%.CWAD} to 0
- set {G.1} to 0
- set {G.2} to 0
- set {G.3} to 0
- set {P.1} to 0
- set {P.2} to 0
- set {P.3} to 0
- set {SW.pcount} to 0
- set {SW.begin} to 0
- set {SW.GD} to 0
- set {SW.PD} to 0
- On damage:
- if attacker is {G.1} or {G.2} or {G.3}:
- if victim is {G.1} or {G.2} or {G.3}:
- cancel event
- if attacker is {P.1} or {P.2} or {P.3}:
- if victim is {P.1} or {P.2} or {P.3}:
- cancel event
- On death:
- if {SW.pcount} is 3:
- if victim is {G.1} or {G.2} or {G.3} or {P.1} or {P.2} or {P.3}:
- set {%player%.CWISA} to 1
- if victim is {G.1} or {G.2} or {G.3}:
- set {SW.GD} to {SW.GD} + 1
- if victim is {P.1} or {P.2} or {P.3}:
- set {SW.PD} to {SW.PD} + 1
- command /setswsp <int>:
- trigger:
- if arg 1 is 1:
- set {SW.GSP} to player's location
- if arg 1 is 2:
- set {SW.PSP} to player's location
- permission: skript.admin
- command /resetws [<player>]:
- trigger:
- set {%{G.1}%.CWCT} to 0
- set {%{G.2}%.CWCT} to 0
- set {%{G.3}%.CWCT} to 0
- set {%{P.1}%.CWCT} to 0
- set {%{P.2}%.CWCT} to 0
- set {%{P.3}%.CWCT} to 0
- set {%{G.1}%.CWKT} to 0
- set {%{G.2}%.CWKT} to 0
- set {%{G.3}%.CWKT} to 0
- set {%{P.1}%.CWKT} to 0
- set {%{P.2}%.CWKT} to 0
- set {%{P.3}%.CWKT} to 0
- set {%{G.1}%.CWKT2} to 0
- set {%{G.2}%.CWKT2} to 0
- set {%{G.3}%.CWKT2} to 0
- set {%{P.1}%.CWKT2} to 0
- set {%{P.2}%.CWKT2} to 0
- set {%{P.3}%.CWKT2} to 0
- set {%{G.1}%.CWISA} to 0
- set {%{G.2}%.CWISA} to 0
- set {%{G.3}%.CWISA} to 0
- set {%{P.1}%.CWISA} to 0
- set {%{P.2}%.CWISA} to 0
- set {%{P.3}%.CWISA} to 0
- set {%{G.1}%.CWAD} to 0
- set {%{G.2}%.CWAD} to 0
- set {%{G.3}%.CWAD} to 0
- set {%{P.1}%.CWAD} to 0
- set {%{P.2}%.CWAD} to 0
- set {%{P.3}%.CWAD} to 0
- set {%arg 1%.CWCT} to 0
- set {%arg 1%.CWKT} to 0
- set {%arg 1%.CWKT2} to 0
- set {%arg 1%.CWISA} to 0
- set {%arg 1%.CWAD} to 0
- set {G.1} to 0
- set {G.2} to 0
- set {G.3} to 0
- set {P.1} to 0
- set {P.2} to 0
- set {P.3} to 0
- set {SW.pcount} to 0
- set {SW.begin} to 0
- set {SW.GD} to 0
- set {SW.PD} to 0
Add Comment
Please, Sign In to add comment