henry900326

Untitled

Jan 29th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. function 初心者skill(P:player):
  2. set slot 4 of {_P}'s current inventory to 1 of wooden sword with no nbt named "&6&l 初心者" with lore "&f《&e剩餘技能點&7: &b%{玩家資料.%{_P}%::剩餘技能點}% &f》"
  3. set slot 19 of {_P}'s current inventory to diamond sword with no nbt named "&5魔力打擊"
  4. if {技能.%{_P}%::魔力打擊} >= 3:
  5. set slot 28 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::魔力打擊}%/3" with lore "&c等級已滿 無法升級"
  6. else if {技能.%{_P}%::魔力打擊} >= 0:
  7. set slot 28 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::魔力打擊}%/3" with lore "&a點此升級魔力打擊"
  8.  
  9. set slot 22 of {_P}'s current inventory to health potion with no nbt named "&3自我恢復"
  10. if {技能.%{_P}%::自我恢復} >= 3:
  11. set slot 31 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::自我恢復}%/3" with lore "&c等級已滿 無法升級"
  12. else if {技能.%{_P}%::自我恢復} >= 0:
  13. set slot 31 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::自我恢復}%/3" with lore "&a點此升級自我恢復"
  14.  
  15. set slot 25 of {_P}'s current inventory to feather named "&7迅捷之步"
  16. if {技能.%{_P}%::迅捷之步} >= 3:
  17. set slot 34 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::迅捷之步}%/3" with lore "&c等級已滿 無法升級"
  18. else if {技能.%{_P}%::迅捷之步} >= 0:
  19. set slot 34 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::迅捷之步}%/3" with lore "&a點此升級迅捷之步"
  20.  
  21. command /testskill:
  22. trigger:
  23. player is an op
  24. send "%{技能.%player%::魔力打擊}%"
  25. send "%{技能.%player%::自我恢復}%"
  26. send "%{技能.%player%::迅捷之步}%"
  27. command /addsp [<number>]:
  28. trigger:
  29. player is an op
  30. add arg to {玩家資料.%player%::剩餘技能點}
  31.  
  32. command /skill1:
  33. trigger:
  34. set {技能.%player%::魔力打擊} to {技能.%player%::魔力打擊} parsed as number
  35. set {技能.%player%::自我恢復} to {技能.%player%::自我恢復} parsed as number
  36. set {技能.%player%::迅捷之步} to {技能.%player%::迅捷之步} parsed as number
  37. open chest with 5 rows named "&a&l 初心者[0轉] &6&l技能介面" to player
  38. wait 1 ticks
  39. loop 2 times:
  40. set slot (loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  41. set slot (loop-number + 5) of player's current inventory to 1 of gray stained glass pane named "&7"
  42. set slot (1 + (loop-number * 2)) of player's current inventory to 1 of light green stained glass pane named "&7"
  43. loop 6 times:
  44. set slot ((loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  45. set slot (8 + (loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  46. loop 7 times:
  47. set slot (9 + loop-number) of player's current inventory to 1 of light green stained glass pane named "&7"
  48. set slot (36 + loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  49. 初心者skill(player)
  50.  
  51.  
  52. on inventory click:
  53. name of player's current inventory contains "&6&l技能介面":
  54. cancel event
  55. if lore of item contains "&a點此升級魔力打擊":
  56. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  57. {技能.%player%::魔力打擊} < 3
  58. {技能.%player%::魔力打擊} >= 0
  59. remove 1 from {玩家資料.%player%::剩餘技能點}
  60. add 1 to {技能.%player%::魔力打擊}
  61. else:
  62. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  63. if lore of item contains "&a點此升級自我恢復":
  64. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  65. {技能.%player%::自我恢復} < 3
  66. {技能.%player%::自我恢復} >= 0
  67. remove 1 from {玩家資料.%player%::剩餘技能點}
  68. add 1 to {技能.%player%::自我恢復}
  69. else:
  70. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  71. if lore of item contains "&a點此升級迅捷之步":
  72. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  73. {技能.%player%::迅捷之步} < 3
  74. {技能.%player%::迅捷之步} >= 0
  75. remove 1 from {玩家資料.%player%::剩餘技能點}
  76. add 1 to {技能.%player%::迅捷之步}
  77. else:
  78. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  79. else:
  80. stop
  81. wait 1 tick
  82. set slot 4 of player's current inventory to 1 of wooden sword with no nbt named "&6&l 初心者" with lore "&f《&e剩餘技能點&7: &b%{玩家資料.%player%::剩餘技能點}% &f》"
  83. set slot 19 of player's current inventory to diamond sword with no nbt named "&5魔力打擊"
  84. if {技能.%player%::魔力打擊} >= 3:
  85. set slot 28 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::魔力打擊}%/3" with lore "&c等級已滿 無法升級"
  86. else if {技能.%player%::魔力打擊} >= 0:
  87. set slot 28 of player's current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%player%::魔力打擊}%/3" with lore "&a點此升級魔力打擊"
  88.  
  89. set slot 22 of player's current inventory to health potion with no nbt named "&3自我恢復"
  90. if {技能.%player%::自我恢復} >= 3:
  91. set slot 31 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::自我恢復}%/3" with lore "&c等級已滿 無法升級"
  92. else if {技能.%player%::自我恢復} >= 0:
  93. set slot 31 of player's current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%player%::自我恢復}%/3" with lore "&a點此升級自我恢復"
  94.  
  95. set slot 25 of player's current inventory to feather named "&7迅捷之步"
  96. if {技能.%player%::迅捷之步} >= 3:
  97. set slot 34 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::迅捷之步}%/3" with lore "&c等級已滿 無法升級"
  98. else if {技能.%player%::迅捷之步} >= 0:
  99. set slot 34 of player's current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%player%::迅捷之步}%/3" with lore "&a點此升級迅捷之步"
Advertisement
Add Comment
Please, Sign In to add comment