Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function 初心者skill(P:player):
- 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》"
- set slot 19 of {_P}'s current inventory to diamond sword with no nbt named "&5魔力打擊"
- if {技能.%{_P}%::魔力打擊} >= 3:
- set slot 28 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::魔力打擊}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%{_P}%::魔力打擊} >= 0:
- set slot 28 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::魔力打擊}%/3" with lore "&a點此升級魔力打擊"
- set slot 22 of {_P}'s current inventory to health potion with no nbt named "&3自我恢復"
- if {技能.%{_P}%::自我恢復} >= 3:
- set slot 31 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::自我恢復}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%{_P}%::自我恢復} >= 0:
- set slot 31 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::自我恢復}%/3" with lore "&a點此升級自我恢復"
- set slot 25 of {_P}'s current inventory to feather named "&7迅捷之步"
- if {技能.%{_P}%::迅捷之步} >= 3:
- set slot 34 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::迅捷之步}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%{_P}%::迅捷之步} >= 0:
- set slot 34 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::迅捷之步}%/3" with lore "&a點此升級迅捷之步"
- command /testskill:
- trigger:
- player is an op
- send "%{技能.%player%::魔力打擊}%"
- send "%{技能.%player%::自我恢復}%"
- send "%{技能.%player%::迅捷之步}%"
- command /addsp [<number>]:
- trigger:
- player is an op
- add arg to {玩家資料.%player%::剩餘技能點}
- command /skill1:
- trigger:
- set {技能.%player%::魔力打擊} to {技能.%player%::魔力打擊} parsed as number
- set {技能.%player%::自我恢復} to {技能.%player%::自我恢復} parsed as number
- set {技能.%player%::迅捷之步} to {技能.%player%::迅捷之步} parsed as number
- open chest with 5 rows named "&a&l 初心者[0轉] &6&l技能介面" to player
- wait 1 ticks
- loop 2 times:
- set slot (loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
- set slot (loop-number + 5) of player's current inventory to 1 of gray stained glass pane named "&7"
- set slot (1 + (loop-number * 2)) of player's current inventory to 1 of light green stained glass pane named "&7"
- loop 6 times:
- set slot ((loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
- set slot (8 + (loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
- loop 7 times:
- set slot (9 + loop-number) of player's current inventory to 1 of light green stained glass pane named "&7"
- set slot (36 + loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
- 初心者skill(player)
- on inventory click:
- name of player's current inventory contains "&6&l技能介面":
- cancel event
- if lore of item contains "&a點此升級魔力打擊":
- if {玩家資料.%player%::剩餘技能點} is larger than 0:
- {技能.%player%::魔力打擊} < 3
- {技能.%player%::魔力打擊} >= 0
- remove 1 from {玩家資料.%player%::剩餘技能點}
- add 1 to {技能.%player%::魔力打擊}
- else:
- send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
- if lore of item contains "&a點此升級自我恢復":
- if {玩家資料.%player%::剩餘技能點} is larger than 0:
- {技能.%player%::自我恢復} < 3
- {技能.%player%::自我恢復} >= 0
- remove 1 from {玩家資料.%player%::剩餘技能點}
- add 1 to {技能.%player%::自我恢復}
- else:
- send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
- if lore of item contains "&a點此升級迅捷之步":
- if {玩家資料.%player%::剩餘技能點} is larger than 0:
- {技能.%player%::迅捷之步} < 3
- {技能.%player%::迅捷之步} >= 0
- remove 1 from {玩家資料.%player%::剩餘技能點}
- add 1 to {技能.%player%::迅捷之步}
- else:
- send "&6技能 >> &c您的技能點數不足 無法升級該技能" to player
- else:
- stop
- wait 1 tick
- 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》"
- set slot 19 of player's current inventory to diamond sword with no nbt named "&5魔力打擊"
- if {技能.%player%::魔力打擊} >= 3:
- set slot 28 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::魔力打擊}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%player%::魔力打擊} >= 0:
- set slot 28 of player's current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%player%::魔力打擊}%/3" with lore "&a點此升級魔力打擊"
- set slot 22 of player's current inventory to health potion with no nbt named "&3自我恢復"
- if {技能.%player%::自我恢復} >= 3:
- set slot 31 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::自我恢復}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%player%::自我恢復} >= 0:
- set slot 31 of player's current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%player%::自我恢復}%/3" with lore "&a點此升級自我恢復"
- set slot 25 of player's current inventory to feather named "&7迅捷之步"
- if {技能.%player%::迅捷之步} >= 3:
- set slot 34 of player's current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%player%::迅捷之步}%/3" with lore "&c等級已滿 無法升級"
- else if {技能.%player%::迅捷之步} >= 0:
- 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