taktie0304

Untitled

Jul 28th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.66 KB | None | 0 0
  1. command /teamgunpvp:
  2. aliases: /tgp
  3. permission: skript.admin
  4. trigger:
  5. command "/scoreboard teams remove red"
  6. command "/scoreboard teams remove blue"
  7. command "/scoreboard teams add red"
  8. command "/scoreboard teams add blue"
  9. command "/scoreboard teams option red color red"
  10. command "/scoreboard teams option blue color blue"
  11. command "/scoreboard teams option red nametagVisibility hideForOtherTeams"
  12. command "/scoreboard teams option blue nametagVisibility hideForOtherTeams"
  13. set {game} to false
  14. set {start} to false
  15. set {button} to true
  16. send "completed" to player
  17.  
  18. #==================================================[ 関数 ]==================================================#
  19.  
  20. function endgame():
  21. set {button} to false
  22. set {game} to false
  23. disable PvP in "world"
  24. if {tresult} is "&6&l勝利":
  25. loop all players:
  26. if {team.%loop-player%} is "t":
  27. send title "%{tresult}%" with subtitle "%{tresultsub}%" to loop-player for 5 seconds
  28. send "%{tresult}%" to loop-player
  29. send "&a+10xp &6+100coins" to loop-player
  30. add 100 to {coin.%uuid of loop-player%}
  31. add 10 to {xp.%uuid of loop-player%}
  32. add 1 to {win.%uuid of loop-player%}
  33. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.5 1"
  34. if {team.%loop-player%} is "ct":
  35. send title "%{ctresult}%" with subtitle "%{ctresultsub}%" to loop-player for 5 seconds
  36. send "%{ctresult}%" to loop-player
  37. send "&a+2xp &6+10coins" to loop-player
  38. add 10 to {coin.%uuid of loop-player%}
  39. add 2 to {xp.%uuid of loop-player%}
  40. add 1 to {lose.%uuid of loop-player%}
  41. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.5 1"
  42. if {ctresult} is "&6&l勝利":
  43. loop all players:
  44. if {team.%loop-player%} is "t":
  45. send title "%{tresult}%" with subtitle "%{tresultsub}%" to loop-player for 5 seconds
  46. send "%{tresult}%" to loop-player
  47. send "&a+2xp &6+10coins" to loop-player
  48. add 10 to {coin.%uuid of loop-player%}
  49. add 2 to {xp.%uuid of loop-player%}
  50. add 1 to {win.%uuid of loop-player%}
  51. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.5 1"
  52. if {team.%loop-player%} is "ct":
  53. send title "%{ctresult}%" with subtitle "%{ctresultsub}%" to loop-player for 5 seconds
  54. send "%{ctresult}%" to loop-player
  55. send "&a+10xp &6+100coins" to loop-player
  56. add 10 to {coin.%uuid of loop-player%}
  57. add 2 to {xp.%uuid of loop-player%}
  58. add 1 to {lose.%uuid of loop-player%}
  59. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.5 1"
  60. wait 6 seconds
  61. loop all players:
  62. if {team.%loop-player%} is set:
  63. close loop-player's inventory
  64. command "clear %loop-player%"
  65. command "kill @e[type=Item]"
  66. command "/scoreboard teams empty red"
  67. command "/scoreboard teams empty blue"
  68. give grey dye named "&eゲームに参加する" to loop-player
  69. teleport the loop-player to {lobby}
  70. set health of loop-player to max health of loop-player
  71. set the loop-player's gamemode to adventure
  72. set the loop-player's tablist name to "&7[Lv%{level.%uuid of loop-player%}%]&r%{prefix.%uuid of loop-player%}%&r%loop-player%&r%{suffix.%uuid of loop-player%}%"
  73. delete {team.%loop-player%}
  74. if {mapselector} == 1:
  75. command "/fill -43 21 -9 -47 21 -5 air"
  76. command "/fill -11 21 37 -7 21 41 air"
  77. if {mapselector} == 2:
  78. command "/fill 183 19 13 179 19 9 air"
  79. command "/fill 171 22 76 175 22 72 air"
  80. set {button} to true
  81. else:
  82. send "&a試合が終了しました" to loop-player
  83.  
  84. function showvs():
  85. loop all players:
  86. if {team.%loop-player%} is "t":
  87. send title " " with subtitle "%{t}% VS %{ct}%" to loop-player for 3 seconds
  88. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.2 2"
  89. if {team.%loop-player%} is "ct":
  90. send title " " with subtitle "%{ct}% VS %{t}%" to loop-player for 3 seconds
  91. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.2 2"
  92.  
  93. #==================================================[ ゲームスタート ]==================================================#
  94.  
  95. on rightclick on wood button:
  96. if {button} is true:
  97. {start} is false
  98. if {game} is false:
  99. set {start} to true
  100. loop all players:
  101. send title "&a5" with subtitle "スタートまで" to loop-player for 2 seconds
  102. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:ui.button.click master %loop-player% ~ ~ ~ 1 2"
  103. wait 1 second
  104. loop all players:
  105. send title "&a4" with subtitle "スタートまで" to loop-player for 2 seconds
  106. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:ui.button.click master %loop-player% ~ ~ ~ 1 2"
  107. wait 1 second
  108. loop all players:
  109. send title "&a3" with subtitle "スタートまで" to loop-player for 2 seconds
  110. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:ui.button.click master %loop-player% ~ ~ ~ 1 2"
  111. wait 1 second
  112. loop all players:
  113. send title "&a2" with subtitle "スタートまで" to loop-player for 2 seconds
  114. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:ui.button.click master %loop-player% ~ ~ ~ 1 2"
  115. wait 1 second
  116. loop all players:
  117. send title "&a1" with subtitle "スタートまで" to loop-player for 1 seconds
  118. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:ui.button.click master %loop-player% ~ ~ ~ 1 2"
  119. wait 1 second
  120. set {gameplayer} to 0
  121. loop all players:
  122. if {join.%loop-player%} is true:
  123. add 1 to {gameplayer}
  124. if {gameplayer} <= 1:
  125. broadcast "&c参加人数が足りませんでした"
  126. wait 1 second
  127. set {start} to false
  128. else:
  129. set {t} to 0
  130. set {ct} to 0
  131. set {count} to 120
  132. set {lobby} to location (49, 5, 10)
  133. set {cmdlobby} to "49 5 10"
  134. set {mapselector} to random integer between 1 and 2
  135. if {mapselector} == 1:
  136. set {tspawn} to location (-80, 22, 33)
  137. set {ctspawn} to location (-18, 19, 0)
  138. if {mapselector} == 2:
  139. set {tspawn} to location (96, 24, 26)
  140. set {ctspawn} to location (166, 14, 51)
  141. set {givebomb} to true
  142. set {putbomb} to false
  143. loop all players:
  144. if {join.%loop-player%} is true:
  145. if {teamselector} == 0:
  146. command "/clear %loop-player%"
  147. if {givebomb} is true:
  148. command "give %loop-player% minecraft:obsidian 1 0 {display:{Name:""金ブロックの上に置いてください!""},CanPlaceOn:[""minecraft:gold_block""]}"
  149. set {givebomb} to false
  150. set {team.%loop-player%} to "t"
  151. set {teamchat.%loop-player%} to "&c"
  152. delete {died.%loop-player%}
  153. delete {mainweapon.%loop-player%}
  154. add 1 to {t}
  155. command "/scoreboard teams join red %loop-player%"
  156. teleport the loop-player to {tspawn}
  157. if {ak47use.%uuid of loop-player%} is true:
  158. if {ak47.%uuid of loop-player%} > 0:
  159. set {mainweapon.%loop-player%} to "ak47"
  160. command "shot give %loop-player% ak47"
  161. if {mainweapon.%loop-player%} is not set:
  162. if {awpuse.%uuid of loop-player%} is true:
  163. if {awp.%uuid of loop-player%} > 0:
  164. set {mainweapon.%loop-player%} to "awp"
  165. command "shot give %loop-player% awp"
  166. command "shot give %loop-player% glock18"
  167. give red wool named "&cあなたはテロリストチームです" to loop-player
  168. set the loop-player's gamemode to adventure
  169. set the loop-player's tablist name to "&7[Lv%{level.%uuid of loop-player%}%]&c%loop-player%"
  170. send title " " with subtitle "敵を全滅、もしくは爆弾を防衛せよ" to loop-player for 5 seconds
  171. delete {join.%loop-player%}
  172. set {teamselector} to 1
  173. else:
  174. command "/clear %loop-player%"
  175. command "give %loop-player% minecraft:diamond_pickaxe 1 0 {display:{Name:""爆弾を破壊してください!""},ench:[{id:32s,lvl:1s}],CanDestroy:[""minecraft:obsidian""]}"
  176. set {team.%loop-player%} to "ct"
  177. set {teamchat.%loop-player%} to "&9"
  178. delete {died.%loop-player%}
  179. delete {mainweapon.%loop-player%}
  180. add 1 to {ct}
  181. command "/scoreboard teams join blue %loop-player%"
  182. teleport the loop-player to {ctspawn}
  183. if {m4a4use.%uuid of loop-player%} is true:
  184. if {m4a4.%uuid of loop-player%} > 0:
  185. set {mainweapon.%loop-player%} to "m4a4"
  186. command "shot give %loop-player% m4a4"
  187. if {mainweapon.%loop-player%} is not set:
  188. if {awpuse.%uuid of loop-player%} is true:
  189. if {awp.%uuid of loop-player%} > 0:
  190. set {mainweapon.%loop-player%} to "awp"
  191. command "shot give %loop-player% awp"
  192. command "shot give %loop-player% usp"
  193. give blue wool named "&9あなたはカウンターテロリストチームです" to loop-player
  194. set the loop-player's gamemode to adventure
  195. set the loop-player's tablist name to "&7[Lv%{level.%uuid of loop-player%}%]&9%loop-player%"
  196. send title " " with subtitle "敵を全滅、もしくは爆弾を破壊せよ" to loop-player for 5 seconds
  197. delete {join.%loop-player%}
  198. set {teamselector} to 0
  199. set {game} to true
  200. broadcast "&cテロリスト%{t}%人 &9カウンターテロリスト%{ct}%人 &a参加中"
  201. enable PvP
  202. set {start} to false
  203. set {button} to true
  204. else:
  205. send "&c現在試合中です" to player
  206.  
  207. #==================================================[ 死んだ時 ]==================================================#
  208.  
  209. on death of player:
  210. if name of attacker's held item contains "USP":
  211. set the death message to "%{teamchat.%attacker%}%%attacker% &7--[&aUSP&7]--> %{teamchat.%victim%}%%victim%"
  212. else if name of attacker's held item contains "Glock-18":
  213. set the death message to "%{teamchat.%attacker%}%%attacker% &7--[&aGlock-18&7]--> %{teamchat.%victim%}%%victim%"
  214. else if name of attacker's held item contains "AK-47":
  215. set the death message to "%{teamchat.%attacker%}%%attacker% &7--[&aAK-47&7]--> %{teamchat.%victim%}%%victim%"
  216. else if name of attacker's held item contains "M4A4":
  217. set the death message to "%{teamchat.%attacker%}%%attacker% &7--[&aM4A4&7]--> %{teamchat.%victim%}%%victim%"
  218. else if name of attacker's held item contains "AWP":
  219. set the death message to "%{teamchat.%attacker%}%%attacker% &7--[&5AWP&7]--> %{teamchat.%victim%}%%victim%"
  220. if {game} is true:
  221. if name of victim's held item contains "AK-47":
  222. if {mainweapon.%victim%} is "ak47":
  223. remove 1 from {ak47.%uuid of victim%}
  224. if name of victim's held item contains "M4A4":
  225. if {mainweapon.%victim%} is "m4a4":
  226. remove 1 from {m4a4.%uuid of victim%}
  227. if name of victim's held item contains "AWP":
  228. if {mainweapon.%victim%} is "awp":
  229. remove 1 from {awp.%uuid of victim%}
  230. set {died.%victim%} to true
  231. set {deathpoint.%victim%} to location of victim
  232. force the victim to respawn
  233. teleport player to {deathpoint.%player%}
  234. set the player's gamemode to spectator
  235. remove 1 from {%{team.%victim%}%}
  236. add 1 to {kill.%uuid of attacker%}
  237. add 1 to {death.%uuid of victim%}
  238. add 3 to {xp.%uuid of attacker%}
  239. add 30 to {coin.%uuid of attacker%}
  240. send "&a+3xp &6+30coins" to attacker
  241. if {putbomb} is true:
  242. if {t} is 0:
  243. set {button} to false
  244. loop all players:
  245. if {team.%loop-player%} is "t":
  246. send title " " with subtitle "味方が全員倒された" to loop-player for 3 seconds
  247. send "&l味方が全員倒された" to loop-player
  248. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.2 2"
  249. if {team.%loop-player%} is "ct":
  250. send title " " with subtitle "敵は全滅した。爆弾を破壊せよ" to loop-player for 3 seconds
  251. send "&l敵は全滅した。爆弾を破壊せよ" to loop-player
  252. execute console command "execute %loop-player% ~ ~ ~ playsound minecraft:entity.wither.spawn master %loop-player% ~ ~ ~ 0.2 2"
  253. else if {ct} is 0:
  254. set {tresult} to "&6&l勝利"
  255. set {ctresult} to "&9&l敗北"
  256. set {tresultsub} to "敵を全員倒した"
  257. set {ctresultsub} to "味方が全員倒された"
  258. endgame()
  259. else:
  260. showvs()
  261. else if {t} is 0:
  262. set {tresult} to "&9&l敗北"
  263. set {ctresult} to "&6&l勝利"
  264. set {tresultsub} to "味方が全員倒された"
  265. set {ctresultsub} to "敵を全員倒した"
  266. endgame()
  267. else if {ct} is 0:
  268. set {tresult} to "&6&l勝利"
  269. set {ctresult} to "&9&l敗北"
  270. set {tresultsub} to "敵を全員倒した"
  271. set {ctresultsub} to "味方が全員倒された"
  272. endgame()
  273. else:
  274. showvs()
  275.  
  276. #==================================================[ 爆弾が置かれた時 ]==================================================#
  277.  
  278. on place of obsidian:
  279. if {game} is true:
  280. set {count} to 40
  281. set {putbomb} to true
  282. loop all players:
  283. if {team.%loop-player%} is "t":
  284. send "&a&l爆弾が設置された! 40秒間守り切れ!" to loop-player
  285. send title " " with subtitle "&a爆弾が設置された! 40秒間守り切れ!" to loop-player for 3 seconds
  286. if {team.%loop-player%} is "ct":
  287. send "&c&l爆弾が設置された! 40秒以内に破壊せよ!" to loop-player
  288. send title " " with subtitle "&c爆弾が設置された! 40秒以内に破壊せよ!" to loop-player for 3 seconds
  289.  
  290. #==================================================[ 爆弾が壊された時 ]==================================================#
  291.  
  292. on break of obsidian:
  293. if {game} is true:
  294. set {tresult} to "&9&l敗北"
  295. set {ctresult} to "&6&l勝利"
  296. set {tresultsub} to "爆弾が破壊された"
  297. set {ctresultsub} to "爆弾を破壊した"
  298. endgame()
  299.  
  300. #==================================================[ 残り時間計測 ]==================================================#
  301.  
  302. every a second in "world":
  303. if {game} is true:
  304. remove 1 from {count}
  305. if {count} < 0:
  306. if {putbomb} is true:
  307. set {tresult} to "&6&l勝利"
  308. set {ctresult} to "&9&l敗北"
  309. set {tresultsub} to "時間切れ"
  310. set {ctresultsub} to "時間切れ"
  311. endgame()
  312. else:
  313. set {tresult} to "&9&l敗北"
  314. set {ctresult} to "&6&l勝利"
  315. set {tresultsub} to "時間切れ"
  316. set {ctresultsub} to "時間切れ"
  317. endgame()
  318. loop all players:
  319. if {team.%loop-player%} is set:
  320. send action bar "&f(残り時間: %{count}%秒)" to loop-player
  321.  
  322. #==================================================[ 抜けたとき ]==================================================#
  323.  
  324. on quit:
  325. if {team.%player%} is set:
  326. delete {team.%player%}
  327. delete {teamchat.%player%}
  328. if {died.%player%} is false:
  329. remove 1 from {%{team.%player%}%}
  330. command "/scoreboard teams leave %{team.%player%}% %player%"
  331. if {t} is 0:
  332. set {tresult} to "&9&l敗北"
  333. set {ctresult} to "&6&l勝利"
  334. set {tresultsub} to "味方が全員倒された"
  335. set {ctresultsub} to "敵を全員倒した"
  336. endgame()
  337. else if {blue} is 0:
  338. set {tresult} to "&6&l勝利"
  339. set {ctresult} to "&9&l敗北"
  340. set {tresultsub} to "敵を全員倒した"
  341. set {ctresultsub} to "味方が全員倒された"
  342. endgame()
  343. else:
  344. showvs()
  345.  
  346. #==================================================[ 仕様 ]==================================================#
  347.  
  348. on damage of player:
  349. if {game} is true:
  350. if {team.%attacker%} == {team.%victim%}:
  351. cancel event
  352.  
  353. on pick up of red wool:
  354. if {team.%player%} is set:
  355. cancel event
  356.  
  357. on pick up of blue wool:
  358. if {team.%player%} is set:
  359. cancel event
  360.  
  361. on pick up of iron horse armor:
  362. if {team.%player%} is set:
  363. if player have iron horse armor:
  364. cancel event
  365.  
  366. on pick up of gold horse armor:
  367. if {team.%player%} is set:
  368. if player have gold horse armor:
  369. cancel event
  370.  
  371. on pick up of obsidian:
  372. if {team.%player%} is "ct":
  373. cancel event
  374.  
  375. on pick up of diamond pickaxe:
  376. if {team.%player%} is "red":
  377. cancel event
  378. else if player have diamond pickaxe:
  379. cancel event
  380.  
  381. on hunger bar change:
  382. set the player's food level to 10
  383.  
  384. #==================================================[ コマンド ]==================================================#
  385.  
  386. command /stats [<offline player>]:
  387. trigger:
  388. if arg 1 is not set:
  389. send "&6-----< &b%player% &6>-----"
  390. set {killdeath.%uuid of player%} to {kill.%uuid of player%} / {death.%uuid of player%}
  391. set {winlose.%uuid of player%} to {win.%uuid of player%} / {lose.%uuid of player%}
  392. send " &alevel: &e%{level.%uuid of player%}%" to player
  393. send " &axp: &e%{xp.%uuid of player%}%&7/%{needxp.%uuid of player%}%" to player
  394. send " "
  395. send " &akill: &e%{kill.%uuid of player%}%" to player
  396. send " &adeath: &e%{death.%uuid of player%}%" to player
  397. send " &aK/D: &e%{killdeath.%uuid of player%}%" to player
  398. send " &awin: &e%{win.%uuid of player%}%" to player
  399. send " &alose: &e%{lose.%uuid of player%}%" to player
  400. send " &aW/L: &e%{winlose.%uuid of player%}%" to player
  401. else:
  402. send "&6-----< &b%arg 1% &6>-----"
  403. set {killdeath.%uuid of arg 1%} to {kill.%uuid of arg 1%} / {death.%uuid of arg 1%}
  404. set {winlose.%uuid of arg 1%} to {win.%uuid of arg 1%} / {lose.%uuid of arg 1%}
  405. send " &alevel: &e%{level.%uuid of arg 1%}%" to player
  406. send " &axp: &e%{xp.%uuid of arg 1%}%&7/%{needxp.%uuid of arg 1%}%" to player
  407. send " "
  408. send " &akill: &e%{kill.%uuid of arg 1%}%" to player
  409. send " &adeath: &e%{death.%uuid of arg 1%}%" to player
  410. send " &aK/D: &e%{killdeath.%uuid of arg 1%}%" to player
  411. send " &awin: &e%{win.%uuid of arg 1%}%" to player
  412. send " &alose: &e%{lose.%uuid of arg 1%}%" to player
  413. send " &aW/L: &e%{winlose.%uuid of arg 1%}%" to player
  414.  
  415. #==================================================[ 武器選択 ]==================================================#
  416.  
  417. command /buycoin [<number>] [<offline player>]:
  418. permission: skript.admin
  419. trigger:
  420. if arg 1 is 1000:
  421. add 1000 to {coin.%uuid of arg 2%}
  422. if arg 1 is 5000:
  423. add 5000 to {coin.%uuid of arg 2%}
  424.  
  425. command /shop [<text>]:
  426. trigger:
  427. if arg 1 is "hnfewfbbfwygbb":
  428. open chest with 4 row named "武器選択、購入" to player
  429. set slot 31 of player's current inventory to nether star named "&e所持金&6%{coin.%uuid of player%}%&eコイン"
  430. set slot 10 of player's current inventory to gold horse armor named "&a&lAK-47" with lore "&62700コイン必要" and "&c赤チーム専用" and "&7現在&f%{ak47.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  431. if {ak47use.%uuid of player%} is not set:
  432. set slot 19 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAK-47の使用をON"
  433. else:
  434. set slot 19 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAK-47の使用をOFF"
  435. set slot 11 of player's current inventory to gold horse armor named "&a&lM4A4" with lore "&63100コイン必要" and "&9青チーム専用" and "&7現在&f%{m4a4.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  436. if {m4a4use.%uuid of player%} is not set:
  437. set slot 20 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでM4A4の使用をON"
  438. else:
  439. set slot 20 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでM4A4の使用をOFF"
  440. set slot 12 of player's current inventory to gold horse armor named "&5&lAWP" with lore "&64750コイン必要" and "&7全チーム兼用" and "&7現在&f%{awp.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  441. if {awpuse.%uuid of player%} is not set:
  442. set slot 21 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、OFFにしても意味がありません" and " " and "&eクリックでAWPの使用をON"
  443. else:
  444. set slot 21 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAWPの使用をOFF"
  445.  
  446. command /coin:
  447. trigger:
  448. send "&6%{coin.%uuid of player%}%&eコイン"
  449.  
  450. every 5 seconds:
  451. loop all players:
  452. if {ak47.%uuid of loop-player%} is not set:
  453. set {ak47.%uuid of loop-player%} to 0
  454. if {m4a4.%uuid of loop-player%} is not set:
  455. set {m4a4.%uuid of loop-player%} to 0
  456. if {awp.%uuid of loop-player%} is not set:
  457. set {awp.%uuid of loop-player%} to 0
  458. if {coin.%uuid of loop-player%} is not set:
  459. set {coin.%uuid of loop-player%} to 0
  460.  
  461. on rightclick on villager:
  462. cancel event
  463. open chest with 4 row named "武器選択、購入" to player
  464. set slot 31 of player's current inventory to nether star named "&e所持金&6%{coin.%uuid of player%}%&eコイン"
  465. set slot 10 of player's current inventory to gold horse armor named "&a&lAK-47" with lore "&62700コイン必要" and "&c赤チーム専用" and "&7現在&f%{ak47.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  466. if {ak47use.%uuid of player%} is not set:
  467. set slot 19 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAK-47の使用をON"
  468. else:
  469. set slot 19 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAK-47の使用をOFF"
  470. set slot 11 of player's current inventory to gold horse armor named "&a&lM4A4" with lore "&63100コイン必要" and "&9青チーム専用" and "&7現在&f%{m4a4.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  471. if {m4a4use.%uuid of player%} is not set:
  472. set slot 20 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでM4A4の使用をON"
  473. else:
  474. set slot 20 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでM4A4の使用をOFF"
  475. set slot 12 of player's current inventory to gold horse armor named "&5&lAWP" with lore "&64750コイン必要" and "&7全チーム兼用" and "&7現在&f%{awp.%uuid of player%}%&7個所持" and " " and "&eクリックで10個購入"
  476. if {awpuse.%uuid of player%} is not set:
  477. set slot 21 of player's current inventory to grey dye named "&cOFF" with lore "&7武器の数が0個だと、OFFにしても意味がありません" and " " and "&eクリックでAWPの使用をON"
  478. else:
  479. set slot 21 of player's current inventory to lime dye named "&aON" with lore "&7武器の数が0個だと、ONにしても意味がありません" and " " and "&eクリックでAWPの使用をOFF"
  480.  
  481. on inventory click:
  482. if name of player's current inventory contains "武器選択、購入":
  483. cancel event
  484. if clicked slot is 10:
  485. if {coin.%uuid of player%} >= 2700:
  486. remove 2700 from {coin.%uuid of player%}
  487. add 10 to {ak47.%uuid of player%}
  488. send "&aAK-47を10個分購入しました" to player
  489. make player execute command "/shop hnfewfbbfwygbb"
  490. else:
  491. send "&cコインが足りません" to player
  492. if clicked slot is 11:
  493. if {coin.%uuid of player%} >= 3100:
  494. remove 3100 from {coin.%uuid of player%}
  495. add 10 to {m4a4.%uuid of player%}
  496. send "&aM4A4を10個分購入しました" to player
  497. make player execute command "/shop hnfewfbbfwygbb"
  498. else:
  499. send "&cコインが足りません" to player
  500. if clicked slot is 12:
  501. if {coin.%uuid of player%} >= 4750:
  502. remove 4750 from {coin.%uuid of player%}
  503. add 10 to {awp.%uuid of player%}
  504. send "&aAWPを10個分購入しました" to player
  505. make player execute command "/shop hnfewfbbfwygbb"
  506. else:
  507. send "&cコインが足りません" to player
  508. if clicked slot is 19:
  509. if {ak47use.%uuid of player%} is not set:
  510. set {ak47use.%uuid of player%} to true
  511. else:
  512. delete {ak47use.%uuid of player%}
  513. make player execute command "/shop hnfewfbbfwygbb"
  514. if clicked slot is 20:
  515. if {m4a4use.%uuid of player%} is not set:
  516. set {m4a4use.%uuid of player%} to true
  517. else:
  518. delete {m4a4use.%uuid of player%}
  519. make player execute command "/shop hnfewfbbfwygbb"
  520. if clicked slot is 21:
  521. if {awpuse.%uuid of player%} is not set:
  522. set {awpuse.%uuid of player%} to true
  523. else:
  524. delete {awpuse.%uuid of player%}
  525. make player execute command "/shop hnfewfbbfwygbb"
  526.  
  527. #==================================================[ その他 ]==================================================#
  528.  
  529. on first join:
  530. set {kill.%uuid of player%} to 0
  531. set {death.%uuid of player%} to 0
  532. set {killdeath.%uuid of player%} to 0
  533. set {win.%uuid of player%} to 0
  534. set {lose.%uuid of player%} to 0
  535. set {winlose.%uuid of player%} to 0
  536. set {level.%uuid of player%} to 1
  537. set {xp.%uuid of player%} to 0
  538. set {needxp.%uuid of player%} to 10
  539. set {prefix.%uuid of player%} to ""
  540. set {suffix.%uuid of player%} to ""
  541.  
  542. every 3 seconds:
  543. loop all players:
  544. if {xp.%uuid of loop-player%} >= {needxp.%uuid of loop-player%}:
  545. set {xp.%uuid of loop-player%} to {xp.%uuid of loop-player%} - {needxp.%uuid of loop-player%}
  546. add 1 to {level.%uuid of loop-player%}
  547. set {needxp.%uuid of loop-player%} to {needxp.%uuid of loop-player%} * 1.5
  548. send "&b&lレベルアップ!! &a現在のレベル&7: &e%{level.%uuid of loop-player%}%" to loop-player
  549. set the loop-player's tablist name to "&7[Lv%{level.%uuid of loop-player%}%]&r%{prefix.%uuid of loop-player%}%&r%loop-player%&r%{suffix.%uuid of loop-player%}%"
  550.  
  551. on join:
  552. wait 3 ticks
  553. set the player's tablist name to "&7[Lv%{level.%uuid of player%}%]&r%{prefix.%uuid of player%}%&r%player%&r%{suffix.%uuid of player%}%"
  554. command "/gamemode 2 %player%"
  555. command "/clear %player%"
  556. give grey dye named "&eゲームに参加する" to player
  557. teleport the player to {lobby}
  558. set health of player to max health of player
  559. send "&a▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to player
  560. send " &f&lTeamGunPvP" to player
  561. send " " to player
  562. send " &e&l攻撃側と防衛側に分かれ、チームで戦います。" to player
  563. send " &e&l攻撃側は特定の場所に黒曜石を置き、" to player
  564. send " &e&lそれを壊されないよう守る必要があります。" to player
  565. send " &e&l防衛側は黒曜石を置かれないように防衛しましょう。" to player
  566. send " &e&lもし置かれても、破壊が可能です。" to player
  567. send " " to player
  568. send "&a▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to player
  569.  
  570. on chat:
  571. cancel event
  572. if {mutelist::*} contains player:
  573. send "&cあなたはミュートされているため、発言することができません。" to player
  574. stop
  575. else if {spam.%player's UUID%} is coloured message:
  576. send "&6---------------------------" to player
  577. send "&c&l同じメッセージを送信できません" to player
  578. send "&6---------------------------" to player
  579. stop
  580. else if {team.%player%} is set:
  581. set {spam.%player's UUID%} to coloured message
  582. broadcast "&7[Lv%{level.%uuid of player%}%]&r%{prefix.%uuid of player%}%&r%{teamchat.%player%}%%player%&r%{suffix.%uuid of player%}%&e》&r%coloured message%"
  583. else:
  584. set {spam.%player's UUID%} to coloured message
  585. broadcast "&7[Lv%{level.%uuid of player%}%]&r%{prefix.%uuid of player%}%&r%player%&r%{suffix.%uuid of player%}%&e》&r%coloured message%"
  586.  
  587. command /chat [<text>] [<offline player>] [<text>]:
  588. permission: skript.admin
  589. usage: /chat <prefix|suffix|mute|unmute> <player> <text>
  590. trigger:
  591. if arg 1 is "prefix":
  592. set {prefix.%uuid of arg 2%} to colored arg 3
  593. send "&b%arg 2%さんのprefixを「&r%{prefix.%arg 2%}%&b」に変更しました。" to player
  594. stop
  595. if arg 1 is "suffix":
  596. set {suffix.%uuid of arg 2%} to colored arg 3
  597. send "&b%arg 2%さんのsuffixを&r「%{suffix.%arg 2%}%&b」に変更しました。" to player
  598. stop
  599. if arg 1 is "deleteprefix":
  600. if arg 3 is not set:
  601. set {prefix.%uuid of arg 2%} to ""
  602. send "&b%arg 2%さんのprefixを削除しました" to player
  603. stop
  604. if arg 1 is "deletesuffix":
  605. if arg 3 is not set:
  606. set {suffix.%uuid of arg 2%} to ""
  607. send "&b%arg 2%さんのsuffixを削除しました" to player
  608. stop
  609. if arg 1 is "mute":
  610. if {mutelist::*} contains arg 2:
  611. send "&c%arg 2%さんはすでにミュートされています。"
  612. stop
  613. send "&e%arg 2%さんが%sender%さんにミュートされました。" to ops
  614. send "&e理由:%coloured arg 3%" to ops
  615. add arg 2 to {mutelist::*}
  616. stop
  617. if arg 1 is "unmute":
  618. if {mutelist::*} contains arg 2:
  619. send "&a%arg 2%さんが%sender%さんにミュート解除されました。" to ops
  620. send "&a理由:%coloured arg 3%" to ops
  621. remove arg 2 from {mutelist::*}
  622. stop
  623. send "&c%arg 2%さんはミュートされていません。" to player
  624. stop
  625.  
  626. command /mutelist [<offline player>]:
  627. permission: skript.admin
  628. trigger:
  629. if arg 1 is not set:
  630. send "&d次のプレイヤーがミュートされています:"
  631. send "%{mutelist::*}%"
  632. stop
  633. if {mutelist::*} contains arg 1:
  634. send "&d対象のプレイヤーはミュートされています。"
  635. stop
  636. send "&b対象のプレイヤーはミュートされていません。"
  637.  
  638. on click:
  639. if player is holding lime dye named "&cゲームを抜ける":
  640. remove lime dye named "&cゲームを抜ける" from player
  641. set {join.%player%} to false
  642. send "&cゲームを抜けました"
  643. wait 5 ticks
  644. give grey dye named "&eゲームに参加する" to player
  645.  
  646. on click:
  647. if player is holding grey dye named "&eゲームに参加する":
  648. remove grey dye named "&eゲームに参加する" from player
  649. set {join.%player%} to true
  650. send "&eゲームに参加しました" to player
  651. wait 5 ticks
  652. give lime dye named "&cゲームを抜ける" to player
  653.  
  654. command /dye:
  655. permission: skript.admin
  656. trigger:
  657. give grey dye named "&eゲームに参加する" to player
Advertisement
Add Comment
Please, Sign In to add comment