SUPERFIRE777

PvPシステム/SUPERFIRESERVER

May 31st, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. on first join:
  2. set {%player%.kill} to 0
  3. set {%player%.death} to 0
  4. set {%player%.kd} to 0
  5.  
  6. on death:
  7. if victim is player:
  8. give attacker stone pickaxe
  9. broadcast "<red>%attacker%<reset>が<aqua>%victim%<reset>を倒しました!"
  10. set {number} to 0
  11. add 1 to {%attacker%.kill}
  12. add 1 to {%victim%.death}
  13. set {%attacker%.kd} to {%attacker%.kill} / {%attacker%.death}
  14. set {%victim%.kd} to {%victim%.kill} / {%victim%.death}
  15. set attacker's health to attacker's max health
  16. set victim's health to victim's max health
  17. wait for a tick
  18. execute console command "/tp %attacker% 704 4 -548"
  19. execute console command "/tp %victim% 704 4 -548"
  20. execute console command "/clear %attacker%"
  21. execute console command "/clear %victim% 704 4 -548"
  22. give a stone pickaxe to the attacker
  23. on damage:
  24. if victim is player:
  25. if attacker's tool is a bow:
  26. message "&c%victim% - %victim's health% hearts" to the attacker
  27. command /status [<offline player>]:
  28. trigger:
  29. if arg is not set:
  30. message "あなたは%{%player%.kill}%回キルして、%{%player%.death}%回デスして、キルレは%{%player%.kd}%です。" to the player
  31. else:
  32. message "%arg%は%{%arg%.kill}%回キルして、%{%arg%.death}%回デスして、キルレは%{%arg%.kd}%です。" to the player
  33.  
  34. command /reset:
  35. trigger:
  36. set {%player%.kill} to 0
  37. set {%player%.death} to 0
  38. set {%player%.kd} to 0
  39. message "あなたの戦績をリセットしました。" to the player
  40. function kit(player: player):
  41. execute console command "/clear %{_player}%"
  42. execute console command "/gamemode a %{_player}%"
  43. equip {_player} with all diamond armour of protection 3
  44. give diamond sword of sharpness 3 to {_player}
  45. give bow of power 3 to {_player}
  46. give 64 arrows to {_player}
  47. give 5 golden apple to {_player}
  48. command /battle:
  49. trigger:
  50. if {number} is 2:
  51. message "現在PvP中です。" to the player
  52. if {number} is 1:
  53. kit(player)
  54. set {number} to 2
  55. execute console command "/tp %player% 656 4 -635 270 0"
  56. set player's health to player's max health
  57. set player's hunger to 10
  58. broadcast "PvP始め!"
  59. if {number} is 0:
  60. kit(player)
  61. set {number} to 1
  62. execute console command "/tp %player% 697 4 -635 90 0"
  63. set player's health to player's max health
  64. set player's hunger to 10
  65. broadcast "PvPを始めるためにはもう1人必要です。"
  66.  
  67. command /battlereset:
  68. trigger:
  69. set {number} to 0
  70. broadcast "参加状況をリセットしました。"
Advertisement
Add Comment
Please, Sign In to add comment