7mm

lbsv

7mm
May 29th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. on load:
  2. command "difficulty 0"
  3.  
  4. on join:
  5. command "gamemode 2 %player%"
  6. command "/pex user %player% add -playerrealms.security"
  7. if {serverjoin::%player%} is not set:
  8. command "execute @a ~ ~ ~ playsound entity.player.levelup master @s ~ ~ ~ 1 0.5"
  9. set join message to "&2&lEntrance&f: &dFirstJoin: %player%"
  10. add 1 to {serverjoin::%player%}
  11. stop
  12. add 1 to {serverjoin::%player%}
  13. command "execute @a ~ ~ ~ playsound entity.player.levelup master @s"
  14. set join message to "&2&lEntrance&f: &eJoin: %player%"
  15. if mod({serverjoin::%player%},50) is 0:
  16. broadcast "&6&l%{serverjoin::%player%}%th Join!"
  17.  
  18. on quit:
  19. set quit message to "&2&lEntrance&f: &cQuit: %player%"
  20. command "execute @a ~ ~ ~ playsound entity.creeper.primed master @s"
  21.  
  22. function lower(x: number, y: number) :: number:
  23. if {_x}<{_y}:
  24. return {_x}
  25. else:
  26. return {_y}
  27.  
  28. function higher(x: number, y: number) :: number:
  29. if {_x}>{_y}:
  30. return {_x}
  31. else:
  32. return {_y}
  33.  
  34. function registblocks(id: text, rg1: location, rg2: location, ref: location):
  35. set {_x} to higher( (x-coord of {_rg1}) , (z-coord of {_rg2}) )
  36. set {_y} to higher( (y-coord of {_rg1}) , (y-coord of {_rg2}) )
  37. set {_z} to higher( (z-coord of {_rg1}) , (z-coord of {_rg2}) )
  38. set {_.rg1} to location( {_x} , {_y} , {_z} )
  39. set {_x} to lower( (x-coord of {_rg1}) , (x-coord of {_rg2}) )
  40. set {_y} to lower( (y-coord of {_rg1}) , (y-coord of {_rg2}) )
  41. set {_z} to lower( (z-coord of {_rg1}) , (z-coord of {_rg2}) )
  42. set {_.rg2} to location( {_x} , {_y} , {_z} )
  43. set {registblocks::%{_id}%::rg1} to {_.rg1}
  44. set {registblocks::%{_id}%::rg2} to {_.rg2}
  45. set {registblocks::%{_id}%::ref} to location( ({_.rg1}'s x-coord - {_ref}'s x-coord) , ({_.rg1}'s y-coord - {_ref}'s y-coord) , ({_.rg1}'s z-coord - {_ref}'s z-coord) )
  46.  
  47. command /rgblocks <text> <integer> <integer> <integer> <integer> <integer> <integer>:
  48. permission: mp.registblocks
  49. trigger:
  50. set {_rg1} to location at ( arg 2, arg 3, arg 4 )
  51. set {_rg2} to location at ( arg 5, arg 6, arg 7 )
  52. set {_ref} to player's location
  53. set {_refx} to x-coord of player's location
  54. set {_refy} to y-coord of player's location
  55. set {_refz} to z-coord of player's location
  56. registblocks(arg 1, {_rg1}, {_rg2}, {_ref})
  57. message "&c&lMyPrison&f&l&o; &fID &e""%arg 1%""&f に座標 &e(%arg 2%,%arg 3%,%arg 4%)~(%arg 5%,%arg 6%,%arg 7%) : (%{_refx}%,%{_refy}%,%{_refz}%) &fを登録しました"
  58.  
  59. function setexp(player: player, mode: text, quant: integer):
  60. if {_mode} is "add":
  61. add {_quant} to {mp::status::%uuid of {_player}%::exp}
  62. level({_player})
  63. if {_mode} is "set":
  64. set {mp::status::%uuid of {_player}%::exp} to {_quant}
  65. level({_player})
  66. set {_nxlv} to floor(30+0.01(({mp::status::%uuid of {_player}%::lv}*({mp::status::%uuid of {_player}%::lv}-1))/2))
  67. if {_nxlv} > {mp::status::%uuid of {_player}%::exp}:
  68. add 1 to {mp::status::%uuid of {_player}%::lv}
  69. remove {_nxlv} from {mp::status::%uuid of {_player}%::exp}
  70.  
  71. function setblocks(id: text, ref: location):
  72. set {_distx} to ({registblocks::%{_id}%::ref}'s x-coord) - ({_ref}'s x-coord)
  73. set {_disty} to ({registblocks::%{_id}%::ref}'s y-coord) - ({_ref}'s y-coord)
  74. set {_distz} to ({registblocks::%{_id}%::ref}'s z-coord) - ({_ref}'s z-coord)
  75. loop blocks within {registblocks::%{_id}%::rg1} to {registblocks::%{_id}%::rg2}:
  76. set {_block} to type of loop-block
  77. set {_loc} to location( (x-coord of location of loop-block + {_distx}) , (y-coord of location of loop-block + {_disty}) , (z-coord of location of loop-block + {_distz}) )
  78. set the block at {_loc} to {_block}
  79.  
  80. command /mp:
  81. trigger:
  82. message "&c&lMyPrison&f&l: &eあなたのステータス"
  83. message "Minecraft UUID: %uuid of player%"
  84. if {mp::status::%uuid of player%::id} is not set:
  85. message "&7*Not Initialized"
  86. stop
  87. message "MyPrison UUID: %{mp::status::%uuid of player%::id}%"
  88.  
  89. command /mp-init [<boolean>]:
  90. trigger:
  91. if {mp::status::%uuid of player%::id} is not set:
  92. message "&c&lMyPrison&f&l: &aMyPrisonの初期化に成功しました"
  93. else:
  94. if arg 1 is true:
  95. message "&c&lMyPrison&f&l: &aMyPrisonの全データの再初期化に成功しました"
  96. else:
  97. message "&c&lMyPrison&f&l: &c本当に初期化してよろしいですか?"
  98. message "&7 -> <ttp:&c&lここをクリック&cすると&c&l全てのデータが&nリセット&cされます><cmd:/mp-init true>&4&l[YES]<reset> &7<-"
  99. stop
  100. clear {mp::status::%uuid of player%::*}
  101. add 1 to {mp::server::idquant}
  102. set {mp::status::%uuid of player%::id} to {mp::server::idquant}
Advertisement
Add Comment
Please, Sign In to add comment