Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #created by hiro_m
- #teamA is green
- #teamB is yellow
- options:
- prefix: &7[&bTDM&7]&r
- cmd: &b/tdm
- minplayer: 2
- time: 240
- #-
- on skript load:
- execute console command "/tdm game start"
- wait a second
- execute console command "/tdm game stop"
- message "{@prefix} バグ回避のためゲームを開始→停止します" to players in "GunFight"
- #-
- on drop:
- event-item is Leather helmet
- cancel event
- wait a tick
- remove a Leather helmet from player
- set player's helm to Leather helmet
- #-
- on mor.inventory click:
- player's gamemode is not creative
- name of event-item is "green" or "yellow"
- cancel event
- #-
- #teamA = green
- #teamB = yellow
- on damage of player:
- victim is
- repair victim's helmet
- name of victim's helmet is "%name of attacker's helmet%"
- cancel event
- #
- on death of player:
- victim is
- wait 2 ticks
- force respawn victim
- heal victim
- wait 3 ticks
- if name of victim's helm is "green":
- subtract 1 from {tdm.teamA.rb}
- teleport victim to {tdm.spawng::%{tdm.map}%}
- set victim's helmet to leather helmet named "green"
- dye victim's helmet green
- if {tdm.teamA.rb} is less than 1:
- set {tdm.win} to "yellow"
- execute console command "/tdm game stop"
- stop
- else if name of victim's helm is "yellow":
- subtract 1 from {tdm.teamB.rb}
- teleport victim to {tdm.spawny::%{tdm.map}%}
- set victim's helmet to leather helmet named "yellow"
- dye victim's helmet yellow
- if {tdm.teamB.rb} is less than 1:
- set {tdm.win} to "green"
- execute console command "/tdm game stop"
- stop
- #
- on quit:
- subtract 1 from {tdm.p.cnt}
- clear {tdm.%player%}
- set player's helmet to air
- execute console command "/nick %player% off"
- execute console command "/ct leave %player%"
- # remove player's helmet
- #-
- command /TeamDeathMatch [<text>] [<text>] [<text>] [<text>] [<number>]:
- usage: <Light Yellow>/tdm <Orange>...
- aliases: /tdm
- permission: tdm.sk.*
- permission message: <light red>Nope, you can't use this!
- trigger:
- arg 1 is not set:
- send "{@cmd} game start <name of map> <Orange>- start tdm in selected map"
- send "{@cmd} game start random <Orange>- start tdm in ramdom map"
- send "{@cmd} game stop <Orange>- stop(end) tdm"
- send "{@cmd} setspawng <name of spawnpoint> <Orange>- set Green spawnpoint"
- send "{@cmd} setspawny <name of spawnpoint> <Orange>- set Yellow spawnpoint"
- send "{@cmd} spawnlist <Orange>- show list of maps(spawnpoints)"
- send "{@cmd} spawnlist detail <Orange>- show list of maps(spawnpoints) with details"
- send "{@cmd} tp (green/yellow) <name of spawnpoint> <Orange>- teleport green's/yellow's spawnpoint"
- send "{@cmd} spawndel (green/yellow) <name of spawnpoint> <Orange>- delete green's/yellow's spawnpoint"
- if arg 4 is "test":
- player is "hiro_m"
- message "{@prefix} test mode" to the player
- #-----------------------------------#
- if arg 1 is "game":
- if arg 2 is "start":
- if {tdm} is true:
- message "{@prefix} <Red>TDM has been <Lime>started!"
- stop
- set {tdm.map} to "none"
- if arg 3 is not set:
- message "MAPを選択してください。"
- message "MAPリストを表示するには/tdm spawnlistと入力してください"
- stop
- else if arg 3 is "random":
- while {tdm.map} is "none":
- loop {tdm.spawng::*}:
- chance of 10%:
- set {tdm.map} to "%loop-index%"
- if {tdm.spawny::%{tdm.map}%} is not set:
- {tdm.map} is not "none"
- message "%{tdm.map}%は緑のみ設定されているので、黄色にも設定してください!" to ops
- set {tdm.map} to "none"
- else:
- if {tdm.spawng::%arg 3%} is not set:
- if {tdm.spawny::%arg 3%} is not set:
- message "%arg 3%というMAPはありません"
- else:
- message "%arg 3%でgreenのスポーン位置が設定されていません"
- stop
- else:
- if {tdm.spawny::%arg 3%} is not set:
- message "%arg 3%でyellowのスポーン位置が設定されていません"
- stop
- set {tdm.map} to "%arg 3%"
- loop {tdm.team::*}:
- clear {tdm.team::%loop-index%}
- clear {tdm.%loop-index%}
- loop players:
- loop-player's gamemode is not creative
- add 1 to {tdm.p.cnt}
- # "%region at loop-player%" contains "Timepvp"
- if arg 4 is "test":
- message "{@prefix} testmode 人数制限解除"
- else:
- if {tdm.p.cnt} is less than {@minplayer}:
- message "{@prefix} <Red>ゲームを始めるには{@minplayer}人以上参加者が必要です"
- set {tdm.p.cnt} to 0
- execute console command "/tdm game stop"
- stop
- set {tdm} to true
- message "{@prefix} 20秒後にTDMが開始されます!" to all players
- message "{@prefix} 参加する場合一番右のスロットには何も入れないでください" to players
- wait a second
- loop 20 times:
- if {tdm} is false:
- stop
- if loop-number is 5 or 10:
- message "{@prefix} %20 - loop-number%秒後にTDMが開始されます!" to players
- # message "{@prefix}参加する場合一番右のスロットには何も入れないでください" to players
- message "{@prefix} %20 - loop-number%秒後にTDMが開始されます!" to players
- # if loop-number is 15:
- # message "{@prefix}参加する場合一番右のスロットには何も入れないでください" to players
- wait a second
- set {tdm.p.cnt} to 0
- clear {tdm::*}
- clear {tdm.team::*}
- loop players:
- loop-player's gamemode is not creative
- add 1 to {tdm.p.cnt}
- clear {tdm.%loop-player%}
- if arg 4 is "test":
- message "{@prefix} testmode 人数制限解除"
- else:
- if {tdm.p.cnt} is less than {@minplayer}:
- message "{@prefix} <Red>ゲームを始めるには{@minplayer}人以上参加者が必要です"
- set {tdm.p.cnt} to 0
- execute console command "/tdm game stop"
- stop
- #--初回感染専用
- if {tdm.p.cnt} is more than 5:
- {a} is not true
- execute console command "/tdm game stop"
- wait a second
- loop players:
- player's tool is air
- execute console command ""
- execute console command "/inf game start"
- set {a} to true
- #--初回感染専用
- # set {tdm.teamA.rb} to {tdm.p.cnt} * 2
- # set {tdm.teamB.rb} to {tdm.teamA.rb}
- set {tdm.teamA.rb} to 0
- set {tdm.teamB.rb} to 0
- set {tdm.win} to "null"
- message "all %{tdm.p.cnt}%"
- message "{@prefix} TDM is §astarted<White>!"
- message "{@prefix} §aTDMが始まりました!" to all players
- wait a tick
- loop players:
- loop-player's gamemode is not creative
- set {_c} to "white"
- if {tdm.teamA.rb} is {tdm.teamB.rb}:
- execute console command "/ct add green %loop-player%"
- set {_c} to "green"
- else if {tdm.teamB.rb} is less than {tdm.teamA.rb}:
- execute console command "/ct add yellow %loop-player%"
- set {_c} to "yellow"
- else if {tdm.teamA.rb} is less than {tdm.teamB.rb}:
- execute console command "/ct add green %loop-player%"
- set {_c} to "green"
- if {_c} is "white":
- chance of 50%:
- execute console command "/ct add green %loop-player%"
- set {_c} to "green"
- if {_c} is "white":
- execute console command "/ct add yellow %loop-player%"
- set {_c} to "yellow"
- set loop-player's helmet to leather helmet named "%{_c}%"
- if {_c} is "green":
- dye loop-player's helmet green
- teleport loop-player to {tdm.spawng::%{tdm.map}%}
- execute console command "/nick %loop-player% &a%name of loop-player%"
- add 1 to {tdm.teamA.rb}
- else if {_c} is "yellow":
- dye loop-player's helmet yellow
- teleport loop-player to {tdm.spawny::%{tdm.map}%}
- execute console command "/nick %loop-player% &e%name of loop-player%"
- add 1 to {tdm.teamB.rb}
- send "%{tdm.teamA.rb}% %{tdm.teamB.rb}% %loop-player% > %{_c}%"
- wait a tick
- loop players in "GunFight":
- loop-player's gamemode is not creative
- set loop-player's gamemode to survival
- message "{@prefix} 残機、残り時間の確認→/tdmi" to loop-player
- message "{@prefix} ゲーム中の放置は厳禁です!落ちてもらったほうがありがたいです!" to loop-player
- set maximum health of loop-player to 20
- heal loop-player
- set {tdm.teamA.rb} to {tdm.teamA.rb} * 2
- set {tdm.teamB.rb} to {tdm.teamA.rb}
- execute console command "/cspawn switch %{tdm.map}%"
- execute console command "/tdm time start a a {@time}"
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- if arg 2 is "stop":
- if {tdm} is false:
- message "{@prefix} <Red>TDM has been §cstopped!"
- stop
- set {tdm} to false
- message "{@prefix} TDM is §cstopped<White>!"
- message "{@prefix} <Pink>TDMが終わりました!" to players
- if {tdm.win} is "null":
- message "{@prefix} 結果: <Bold>引き分け" to players
- else:
- message "{@prefix} <Bold>%{tdm.win}%の勝利!" to players
- message "{@prefix} <White>残り時間: <Orange>%{tdm.time}%<White>秒" to players
- message "{@prefix} <Green>緑<White>残機:<Orange>%{tdm.teamA.rb}%" to players
- message "{@prefix} <Yellow>黄<White>残機:<Orange>%{tdm.teamB.rb}%" to players
- heal players in "GunFight"
- wait a tick
- execute console command "/ct remove green"
- execute console command "/ct remove yellow"
- if {tdm.win} is "green":
- loop players:
- execute console command "/ct add silver %loop-player%"
- if name of loop-player's helmet is "green":
- add 200 to loop-player's account
- message "{@prefix} 報酬:200円授与" to loop-player
- set loop-player's helmet to air
- remove leather helmet from loop-player
- else if name of loop-player's helmet is "yellow":
- message "<???> 今回は負けたが、次はがんばれよ" to loop-player
- message "50円獲得!" to loop-player
- add 50 to loop-player's account
- else if {tdm.win} is "yellow":
- loop players in "GunFight":
- execute console command "/ct add silver %loop-player%"
- if name of loop-player's helmet is "yellow":
- add 200 to loop-player's account
- message "{@prefix} 報酬:200円授与" to loop-player
- set loop-player's helmet to air
- remove leather helmet from loop-player
- else if name of loop-player's helmet is "green":
- message "<???> 今回は負けたが、次はがんばれよ" to loop-player
- message "50円獲得!" to loop-player
- add 50 to loop-player's account
- clear {tdm.team::*}
- set {tdm.p.cnt} to 0
- set {tdm.timer} to false
- set {tdm.time} to 0
- set {tdm.win} to "null"
- message "3秒後に帰還" to players
- loop 3 times:
- wait a second
- execute console command "/ct remove silver"
- loop players:
- loop-player's gamemode is not creative
- remove all leather helmets from loop-player
- set loop-player's helmet to air
- execute console command "/nick %loop-player% off"
- run loop-player command "/tdmspawn" as op
- set maximum health of loop-player to 20
- heal loop-player
- message "{@prefix} ステージに取り残された方は<Light Aqua>/tdmspawn<White>とコマンドを打ってください" to players in "GunFight"
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- if arg 1 is "time":
- command sender is the console
- if arg 2 is "start":
- if {tdm} is false:
- message "{@prefix} <Red>TDM has been §cstopped!"
- stop
- else if {tdm.timer} is true:
- message "{@prefix} <Red>TDM timer has been §astarted!"
- stop
- set {tdm.timer} to true
- set {tdm.time} to arg 5
- while {tdm.time} is more than 0:#loop arg 5 times:
- subtract 1 from {tdm.time}
- {tdm.timer} is true
- if {tdm.timer} is false:
- clear {tdm.timer}
- execute console command "/tdm game stop"
- stop
- if {tdm.time} is 120:
- message "{@prefix} あと%{tdm.time}%秒です!" to all players in "GunFight"
- if {tdm.time} is less than 11:
- message "{@prefix} あと%{tdm.time}%秒です!" to all players in "GunFight"
- wait a second
- clear {tdm.timer}
- # set {tdm.time} to 0
- if {tdm.teamA.rb} is more than {tdm.teamB.rb}:
- set {tdm.win} to "green"
- else if {tdm.teamB.rb} is more than {tdm.teamA.rb}:
- set {tdm.win} to "yellow"
- else if {tdm.teamA.rb} is {tdm.teamB.rb}:
- set {tdm.win} to "null"
- execute console command "/tdm game stop"
- #-----------------------------------#
- if arg 1 is "setspawng":
- arg 2 is set
- set {tdm.spawng::%arg 2%} to player's location
- message "{@prefix} set spawng::%arg 2% to your location"
- else if arg 1 is "setspawny":
- set {tdm.spawny::%arg 2%} to player's location
- message "{@prefix} set spawny::%arg 2% to your location"
- #-----------------------------------#
- if arg 1 is "spawnlist":
- if arg 2 is "detail":
- message "---green---"
- loop {tdm.spawng::*}:
- add 1 to {_cnt}
- message "%loop-index% ||%loop-value%"
- message "合計:%{_cnt}%"
- message ""
- message "---yellow---"
- loop {tdm.spawny::*}:
- message "%loop-index% ||%loop-value%"
- message "合計:%{_cnt}%"
- message ""
- stop
- message "---maps---"
- clear {pvpgame.spawng::*}
- clear {pvpgame.spawny::*}
- loop {tdm.spawng::*}:
- {tdm.spawny::%loop-index%} is set
- message "%loop-index%"
- message ""
- loop {tdm.spawng::*}:
- {tdm.spawny::%loop-index%} is not set
- message "%loop-index%はgreenのみ設定されています"
- loop {tdm.spawny::*}:
- {tdm.spawng::%loop-index%} is not set
- message "%loop-index%はyellowのみ設定されています"
- #-----------------------------------#
- if arg 1 is "tp":
- if arg 2 is "green":
- if {tdm.spawng::%arg 3%} is not set:
- message "%arg 3%はありません"
- teleport player to {tdm.spawng::%arg 3%}
- if arg 2 is "yellow":
- if {tdm.spawny::%arg 3%} is not set:
- message "%arg 3%はありません"
- teleport player to {tdm.spawny::%arg 3%}
- #-----------------------------------#
- if arg 1 is "spawndel":
- if arg 2 is "green":
- clear {tdm.spawng::%arg 3%}
- message "deleted %arg 3%"
- if arg 2 is "yellow":
- clear {tdm.spawny::%arg 3%}
- message "deleted %arg 3%"
- #-----------------------------------#
- if arg 1 is "clearP":
- if {tdm.%arg 2%} is not set:
- message "{tdm.%arg 2%} is not set"
- else:
- clear {tdm.%arg 2%}
- message " cleared {tdm.%arg 2%}"
- if {tdm.team::%arg 2%} is not set:
- message "{tdm.team::%arg 2%} is not set"
- else:
- clear {tdm.team::%arg 2%}
- message " cleared {tdm.team::%arg 2%}"
- #-----------------------------------#
- command /tdmtotyu [<text>]:
- permission: tdm.sk*
- trigger:
- {tdm} is true
- player is in "GunFight"
- if arg 1 is set:
- player is op
- set maximum health of player to 20
- heal player
- if arg 1 is "yellow":
- set player's helmet to leather helmet named "yellow"
- execute console command "/nick %player% &e%name of player%"
- execute console command "/ct add yellow %player%"
- dye player's helmet yellow
- teleport player to {tdm.spawny::%{tdm.map}%}
- message "green:%{_cntg}%"
- message "yellow:%{_cnty}%"
- message "{@prefix} %player%が§e黄チーム§fへ参加しました!" to players in "GunFight"
- add 1 to {tdm.teamA.rb}
- add 1 to {tdm.teamB.rb}
- stop
- if arg 1 is "green":
- set player's helmet to leather helmet named "green"
- execute console command "/nick %player% &a%name of player%"
- execute console command "/ct add green %player%"
- dye player's helmet green
- teleport player to {tdm.spawng::%{tdm.map}%}
- message "{@prefix} %player%が§a緑チーム§fへ参加しました!" to players in "GunFight"
- add 1 to {tdm.teamA.rb}
- add 1 to {tdm.teamB.rb}
- stop
- {tdm.timer} is true
- if {tdm.time} is less than 60:
- message "残り時間が1分未満のため、参加できません。"
- stop
- set {_cntg} to 0
- set {_cnty} to 0
- loop players in "GunFight":
- if name of loop-player's helmet is "green":
- add 1 to {_cntg}
- if name of loop-player's helmet is "yellow":
- add 1 to {_cnty}
- message "green:%{_cntg}%"
- message "yellow:%{_cnty}%"
- if {_cntg} is {_cnty}:#同じ人数
- if {tdm.timer} is not true:
- stop
- chance of 50%:
- run player command "/tdmtotyu green" as op
- stop
- run player command "/tdmtotyu yellow" as op
- else if {_cntg} is more than {_cnty}:#緑のほうが多いなら
- run player command "/tdmtotyu yellow" as op
- else if {_cnty} is more than {_cntg}:#黄色のほうが多いなら
- run player command "/tdmtotyu green" as op
- command /tdmspawn:
- trigger:
- {tdm} is false
- player is
- execute console command ""
- #
- command /tdmi [<player>]:
- trigger:
- # {tdm} is true
- if arg 1 is not set:
- loop players:
- if name of loop-player's helmet is "green":
- message "%loop-player%"
- message "§a緑の残機 §f%{tdm.teamA.rb}%"
- loop players:
- if name of loop-player's helmet is "yellow":
- message "%loop-player%"
- message "§e黄の残機 §f%{tdm.teamB.rb}%"
- message "残り時間 %{tdm.time}%"
- stop
- else:
- if player-arg's helmet is not leather helmet:
- message "%arg 1%は参加していません!"
- message "%name of player-arg's helmet%"
- #
- command /asda:
- trigger:
- player is op
- clear {a}
- message "%{a}%"
- clear {a}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement