henry900326

Untitled

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