henry900326

Untitled

Jan 28th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 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. open chest with 5 rows named "&a&l 初心者[0轉] &6&l技能介面" to player
  35. wait 1 ticks
  36. loop 2 times:
  37. set slot (loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  38. set slot (loop-number + 5) of player's current inventory to 1 of gray stained glass pane named "&7"
  39. set slot (1 + (loop-number * 2)) of player's current inventory to 1 of light green stained glass pane named "&7"
  40. loop 6 times:
  41. set slot ((loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  42. set slot (8 + (loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  43. loop 7 times:
  44. set slot (9 + loop-number) of player's current inventory to 1 of light green stained glass pane named "&7"
  45. set slot (36 + loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  46. 初心者skill(player)
  47.  
  48.  
  49. on inventory click:
  50. name of player's current inventory contains "&6&l技能介面":
  51. cancel event
  52. if lore of item contains "&a點此升級魔力打擊":
  53. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  54. {技能.%player%::魔力打擊} < 3
  55. {技能.%player%::魔力打擊} >= 0
  56. remove 1 from {玩家資料.%player%::剩餘技能點}
  57. add 1 to {技能.%player%::魔力打擊}
  58. else:
  59. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  60. if lore of item contains "&a點此升級自我恢復":
  61. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  62. {技能.%player%::自我恢復} < 3
  63. {技能.%player%::自我恢復} >= 0
  64. remove 1 from {玩家資料.%player%::剩餘技能點}
  65. add 1 to {技能.%player%::自我恢復}
  66. else:
  67. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  68. if lore of item contains "&a點此升級迅捷之步":
  69. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  70. {技能.%player%::迅捷之步} < 3
  71. {技能.%player%::迅捷之步} >= 0
  72. remove 1 from {玩家資料.%player%::剩餘技能點}
  73. add 1 to {技能.%player%::迅捷之步}
  74. else:
  75. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
  76. else:
  77. stop
  78. wait 1 tick
  79. 初心者skill(player)
Advertisement
Add Comment
Please, Sign In to add comment