Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Options #設置 # 設定
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- Options:
- 路徑: "plugins/Skript/scripts/PlayerData/%UUID of player%.yml"
- Tag: &7[&b公會系統&7]
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Function #函式 #函數
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- Function RandomGuildUID() :: integer:
- set {_1} to random integer between 0 and 9
- set {_2} to random integer between 0 and 9
- set {_3} to random integer between 0 and 9
- set {_4} to random integer between 0 and 9
- set {_5} to random integer between 0 and 9
- set {_6} to random integer between 0 and 9
- set {_all} to "%{_1}%%{_2}%%{_3}%%{_4}%%{_5}%%{_6}%" parsed as integer
- return {_all}
- Function GetGuildExpNeed(Lv:integer) :: integer:
- if {_LV} is 1:#1-2
- set {_ExpNeed} to 50000
- if {_LV} is 2:#2-3
- set {_ExpNeed} to 200000
- if {_LV} is 3:#3-4
- set {_ExpNeed} to 500000
- if {_LV} is 4:#4-5
- set {_ExpNeed} to 1000000
- if {_LV} is 5:#5-6
- set {_ExpNeed} to 2000000
- if {_LV} is 6:#6-7
- set {_ExpNeed} to 3500000
- if {_LV} is 7:#7-8
- set {_ExpNeed} to 5500000
- if {_LV} is 8:#8-9
- set {_ExpNeed} to 8000000
- if {_LV} is 9:#9-10
- set {_ExpNeed} to 10000000
- return {_ExpNeed}
- Function GetGuildLevelNeed(Lv:integer) :: text:
- set {_ExpNeed} to GetGuildExpNeed({_LV})
- if {_LV} is 1:#1-2
- set {_MoneyNeed} to 10000
- set {_StarNeed} to 10
- set {_MemberNeed} to 10
- if {_LV} is 2:#2-3
- set {_MoneyNeed} to 25000
- set {_StarNeed} to 30
- set {_MemberNeed} to 10
- if {_LV} is 3:#3-4
- set {_MoneyNeed} to 80000
- set {_StarNeed} to 75
- set {_MemberNeed} to 10
- if {_LV} is 4:#4-5
- set {_MoneyNeed} to 135000
- set {_StarNeed} to 120
- set {_MemberNeed} to 20
- if {_LV} is 5:#5-6
- set {_MoneyNeed} to 200000
- set {_StarNeed} to 250
- set {_MemberNeed} to 20
- if {_LV} is 6:#6-7
- set {_MoneyNeed} to 275000
- set {_StarNeed} to 400
- set {_MemberNeed} to 20
- if {_LV} is 7:#7-8
- set {_MoneyNeed} to 350000
- set {_StarNeed} to 1000
- set {_MemberNeed} to 30
- if {_LV} is 8:#8-9
- set {_MoneyNeed} to 500000
- set {_StarNeed} to 2500
- set {_MemberNeed} to 30
- if {_LV} is 9:#9-10
- set {_MoneyNeed} to 600000
- set {_StarNeed} to 5000
- set {_MemberNeed} to 30
- set {_Need} to "%{_LV}%/%{_ExpNeed}%/%{_MoneyNeed}%/%{_StarNeed}%/%{_MemberNeed}%"
- return {_Need}
- Function GetGuildLevelUpNeedText(Lv:integer, Exp:integer, Money:integer, Star:integer, Member:integer) :: text:
- set {_ExpNeed} to GetGuildExpNeed({_LV})
- if {_LV} is 1:#1-2
- set {_MoneyNeed} to 10000
- set {_StarNeed} to 10
- set {_MemberNeed} to 10
- if {_LV} is 2:#2-3
- set {_MoneyNeed} to 25000
- set {_StarNeed} to 30
- set {_MemberNeed} to 10
- if {_LV} is 3:#3-4
- set {_MoneyNeed} to 80000
- set {_StarNeed} to 75
- set {_MemberNeed} to 10
- if {_LV} is 4:#4-5
- set {_MoneyNeed} to 135000
- set {_StarNeed} to 120
- set {_MemberNeed} to 20
- if {_LV} is 5:#5-6
- set {_MoneyNeed} to 200000
- set {_StarNeed} to 250
- set {_MemberNeed} to 20
- if {_LV} is 6:#6-7
- set {_MoneyNeed} to 275000
- set {_StarNeed} to 400
- set {_MemberNeed} to 20
- if {_LV} is 7:#7-8
- set {_MoneyNeed} to 350000
- set {_StarNeed} to 1000
- set {_MemberNeed} to 30
- if {_LV} is 8:#8-9
- set {_MoneyNeed} to 500000
- set {_StarNeed} to 2500
- set {_MemberNeed} to 30
- if {_LV} is 9:#9-10
- set {_MoneyNeed} to 600000
- set {_StarNeed} to 5000
- set {_MemberNeed} to 30
- set {_Need} to "&7 - &e公會等級 &f(%{_LV}%&7/&f%{_LV}%&f)%nl%&7 - &e公會經驗 &f(%{_Exp}%&7/&f%{_ExpNeed}%&f)%nl%&7 - &e公會資金 &f(%{_Money}%&7/&f%{_MoneyNeed}%&f)%nl%&7 - &e公會之星 &f(%{_Star}%&7/&f%{_StarNeed}%&f)%nl%&7 - &e公會人數 &f(%{_Member}%&7/&f%{_MemberNeed}%&f)"
- return {_Need}
- Function NumberToTimespan(Number:number) :: text:
- set {_Hour} to floor({_Number}/3600)
- set {_Minute} to mod({_Number},3600)
- set {_Minute} to floor({_Minute}/60)
- set {_Second} to mod({_Number},3600)
- set {_Second} to mod({_Second},60)
- return "%{_Hour}%時 %{_Minute}%分 %{_Second}%秒"
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #存取 #讀取 #儲存
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- on join:
- if {公會系統::%UUID of player%::公會} is set:
- set "公會" to "%{公會系統::%UUID of player%::公會}%" in yaml file {@路徑}
- set "公會點數" to "%{公會系統::%UUID of player%::點數}%" in yaml file {@路徑}
- set "公會任務.編號" to "%{公會系統::%UUID of player%::任務::編號}%" in yaml file {@路徑}
- set "公會任務.冷卻" to "%{公會系統::%UUID of player%::任務::冷卻}%" in yaml file {@路徑}
- set "公會任務.分類" to "%{公會系統::%UUID of player%::任務::分類}%" in yaml file {@路徑}
- set "公會任務.獎勵" to "%{公會系統::%UUID of player%::任務::獎勵}%" in yaml file {@路徑}
- set "公會任務.目標" to "%{公會系統::%UUID of player%::任務::目標}%" in yaml file {@路徑}
- set "公會懲罰" to "%{公會系統::%UUID of player%::懲罰}%" in yaml file {@路徑}
- stop
- set {公會系統::%UUID of player%::公會} to single value "公會" get of {@路徑}
- set {公會系統::%UUID of player%::點數} to single value "公會點數" get of {@路徑}
- set {公會系統::%UUID of player%::任務::編號} to single value "公會任務.編號" get of {@路徑}
- set {公會系統::%UUID of player%::任務::冷卻} to single value "公會任務.冷卻" get of {@路徑}
- set {公會系統::%UUID of player%::任務::分類} to single value "公會任務.分類" get of {@路徑}
- set {公會系統::%UUID of player%::任務::獎勵} to single value "公會任務.獎勵" get of {@路徑}
- set {公會系統::%UUID of player%::任務::目標} to single value "公會任務.目標" get of {@路徑}
- set {公會系統::%UUID of player%::懲罰} to single value "公會懲罰" get of {@路徑}
- on quit:
- if {公會系統::%UUID of player%::公會} is set:
- set "公會" to "%{公會系統::%UUID of player%::公會}%" in yaml file {@路徑}
- set "公會點數" to "%{公會系統::%UUID of player%::點數}%" in yaml file {@路徑}
- set "公會任務.編號" to "%{公會系統::%UUID of player%::任務::編號}%" in yaml file {@路徑}
- set "公會任務.冷卻" to "%{公會系統::%UUID of player%::任務::冷卻}%" in yaml file {@路徑}
- set "公會任務.分類" to "%{公會系統::%UUID of player%::任務::分類}%" in yaml file {@路徑}
- set "公會任務.獎勵" to "%{公會系統::%UUID of player%::任務::獎勵}%" in yaml file {@路徑}
- set "公會任務.目標" to "%{公會系統::%UUID of player%::任務::目標}%" in yaml file {@路徑}
- set "公會懲罰" to "%{公會系統::%UUID of player%::懲罰}%" in yaml file {@路徑}
- delete {公會系統::%UUID of player%::*}
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #NPC #介面限制
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- on right click on entity:
- if name of clicked entity contains "公會接待員":
- make player execute command "/guild"
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Command #指令
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- command /guild [<text=menu>] [<text>] [<text>]:
- aliases: /g
- trigger:
- if arg-1 is "test":
- if name of player is "LeisureAW":
- if arg-2 is not set:
- set {_Player} to player
- set {_Player} to arg-2 parsed as offlineplayer
- set {_uuid} to uuid of {_Player}
- send "&b%{_Player}% &7/ &6%{公會系統::%{_uuid}%::公會}% &7/ &4%{公會點數::%{_uuid}%}%" to player
- stop
- if arg-1 is "resetall":
- if name of player is "LeisureAW":
- delete {公會系統::*}
- delete {公會目錄::*}
- set {_plugins::*} to files in "plugins/Skript/scripts/PlayerData/"
- loop {_plugins::*}:
- delete file "plugins/Skript/scripts/PlayerData/%loop-value%"
- set {_plugins::*} to files in "plugins/Skript/scripts/Guild/"
- loop {_plugins::*}:
- delete file "plugins/Skript/scripts/Guild/%loop-value%"
- send all players title "&7[&c系統公告&7]" with subtitle "&e公會系統所有資料已重置" for 2 seconds
- stop
- loop entities in radius 4 around block at location of player:
- if name of loop-entity contains "公會接待員":
- player's targeted entity is loop-entity
- set {_OpenGuildMenu} to 1
- stop loop
- if {_OpenGuildMenu} is not 1:
- stop
- if file existance of {@路徑} is false:
- create file {@路徑}
- set "公會" to "<none>" in yaml file {@路徑}
- set "公會點數" to "0" in yaml file {@路徑}
- set "公會任務" to "0" in yaml file {@路徑}
- set {_公會} to single value "公會" get of {@路徑}
- if arg-1 is "menu":
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[公會選單]&8&l&m-------"
- add {_Page} to {_alltext::*}
- if "%{_公會}%" is "<none>":
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&3創建公會&8&l]"
- add click event with action RUN_COMMAND with execute "/guild create" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7點此創建公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&3公會列表&8&l]"
- add click event with action RUN_COMMAND with execute "/guild list" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7點此尋找公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&3加入公會&8&l]"
- add hover event with action SHOW_TEXT with text "&7使用&e/guild apply <公會編號>&7來加入公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- else if "%{_公會}%" is not "<none>":
- set {_會長} to single value "會長" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to single value "公會人數" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會等級} to single value "公會等級" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會經驗} to single value "公會經驗" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會資金} to single value "公會資金" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會之星} to single value "公會之星" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會編號} to single value "公會編號" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_領地座標} to single value "領地座標" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to {_公會人數} parsed as number
- set {_公會等級} to {_公會等級} parsed as number
- set {_公會經驗} to {_公會經驗} parsed as number
- set {_公會資金} to {_公會資金} parsed as number
- set {_公會之星} to {_公會之星} parsed as number
- set {_公會編號} to {_公會編號} parsed as number
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&4 ✧ 公會名稱&8:&r &0%{公會系統::%UUID of player%::公會}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&4 ✧ 公會編號&8:&r &0%{_公會編號}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&4 ✧ 公會人數&8:&r &0%{_公會人數}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&4 ✧ 公會等級&8:&r &0%{_公會等級}% "
- add {_text} to {_alltext::*}
- if {_公會經驗} >= GetGuildExpNeed({_公會等級}):
- set {_text} to a new text component with "&3[升級&3&l▲&3]"
- add click event with action RUN_COMMAND with execute "/guild levelup" to text component {_text}
- add hover event with action SHOW_TEXT with text "&f✧ &6公會經驗值已滿 &f✧%nl%%nl%&a公會升級需求&7:%nl%%GetGuildLevelUpNeedText({_公會等級},{_公會經驗},{_公會資金},{_公會之星},{_公會人數})%%nl%%nl%&c達成指定條件後%nl%點此即可升級公會" to text component {_text}
- else:
- set {_max} to {_公會經驗}/GetGuildExpNeed({_公會等級})*35
- set {_max} to round({_max})
- set {_need} to 35-{_max}
- if {_max} > 0:
- loop {_max} times:
- add "&3|" to {_exp_line::*}
- if {_need} > 0:
- loop {_need} times:
- add "&7|" to {_exp_line::*}
- set {_exp_line} to "%{_exp_line::*}%"
- replace all ",", "and" and " " with "" in {_exp_line}
- set {_text} to a new text component with "&3[%{_exp_line}%&3]"
- add hover event with action SHOW_TEXT with text "&3&l%{_公會經驗}/GetGuildExpNeed({_公會等級})*100%%%&r &f(&f&o%{_公會經驗}%/%GetGuildExpNeed({_公會等級})%&f)" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&4 ✧ 公會資金&8:&r ☪&0%{_公會資金}% "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&7<&2&l+&7>"
- add click event with action RUN_COMMAND with execute "/guild donate" to text component {_text}
- add hover event with action SHOW_TEXT with text "&6捐獻資金" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&4 ✧ 公會之星&8:&r &0%{_公會之星}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8||&3會員列表&8||"
- add click event with action RUN_COMMAND with execute "/guild memberlist" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此查看會員資料" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8||&5申請名單&8||"
- add click event with action RUN_COMMAND with execute "/guild applylist" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此查看申請名單%nl%&7&o只有公會管理員能使用該功能" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8||&2公會領地&8||"
- add click event with action RUN_COMMAND with execute "/guild domain" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此查看領地相關資訊" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8||&1公會任務&8||"
- add click event with action RUN_COMMAND with execute "/guild quest" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此查看公會任務" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8||&6公會列表&8||"
- add click event with action RUN_COMMAND with execute "/guild list" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此查看會員資料" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- #
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_text} to a new text component with "&8||&4解散公會&8||"
- add click event with action RUN_COMMAND with execute "/guild disband" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此解散公會%nl%&c&o注意! 解散後將無法反悔%nl%&c&o所有成員將退出且資源無法返還" to text component {_text}
- add {_text} to {_alltext::*}
- else:
- set {_text} to a new text component with "&8||&4離開公會&8||"
- add click event with action RUN_COMMAND with execute "/guild leave" to text component {_text}
- add hover event with action SHOW_TEXT with text "&e點此離開公會%nl%&c&o注意! 離開後將無法返回%nl%&c&o需再次受到批准才可加入" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Create #創建
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "create":
- if {公會系統::%uuid of player%::懲罰} is set:
- set {_冷卻} to "%difference between {公會系統::%uuid of player%::懲罰} and now%" parsed as timespan
- set {_冷卻} to {_冷卻} converted to seconds
- if {_冷卻} < 86400:
- set {_Time} to NumberToTimespan(86400-{_冷卻})
- send "{@Tag} &c由於退出/解散公會的懲罰 你暫時無法加入公會"
- send "{@Tag} &c你可以於 &f%{_Time}% &c後再次加入或創建公會"
- stop
- delete {公會系統::%uuid of player%::懲罰}
- if money of player < 1000000:
- send "{@Tag} &c尼歐不足 需要100萬尼歐" to player
- stop
- set {_Name} to arg-2
- if "%{_Name}%" contains " ":
- send "{@Tag} &c公會名稱稱不能有空格" to player
- stop
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- send "{@Tag} &c你已經在一個公會裡面" to player
- stop
- set {_Guild} to yaml value "公會" from {@路徑}
- if "%{_Guild}%" is not "<none>":
- send "{@Tag} &c你已經在一個公會裡面" to player
- stop
- if arg-2 is not set:
- send "{@Tag} &e輸入 &6/guild create <公會名稱> &e來創建公會" to player
- stop
- loop {公會目錄::*}:
- if "%{_Name}%" is "%loop-value%":
- send "{@Tag} &c這個公會名稱已被使用過"
- stop
- set {_UID} to RandomGuildUID()
- loop {公會目錄::*}:
- if loop-index = "%RandomGuildUID()%":
- send "{@Tag} &c創建過程發生錯誤 請重新創建"
- send "{@Tag} &c若你認為這訊息有誤 請至伺服器DC回報問題"
- stop
- set {_名稱長度} to length of {_Name}
- if {_名稱長度} > 10:
- send "{@Tag} &c公會名稱過長 最多輸入10個字元"
- stop
- send "{@Tag} &6公會建立成功" to player
- create file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "會長" to "%player%" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- add "<none>" to yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- remove "<none>" from yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- add "%player%" to yaml list "會員" from file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會人數" to "1" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會等級" to "1" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會經驗" to "0" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會資金" to "0" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會之星" to "0" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "公會編號" to "%{_UID}%" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "領地座標" to "<none>" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set "領地傳點" to "<none>" in yaml file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- add "<none>" to yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- remove "<none>" from yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{_Name}%.yml"
- set {公會系統::%UUID of player%::公會} to "%{_Name}%"
- set "公會" to "%{公會系統::%UUID of player%::公會}%" in yaml file {@路徑}
- set {公會目錄::%{_UID}%} to "%{_Name}%"
- remove 1000000 from player's money
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #List #列表
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "list":
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Amount} to amount of {公會目錄::*}
- if {_Amount} is 0:
- set {_Page} to a new text component with "&8&l&m-------&8[公會列表]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 10 times:
- set {_text} to a new text component with "&8 - &r"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- set {_PageAmount} to ceil({_Amount}/10)
- set {_Remainder} to mod({_Amount},10)
- if {_Remainder} is not 0:
- set {_Remainder} to 10-{_Remainder}
- loop {公會目錄::*}:
- set {_公會目錄::%loop-index%} to loop-value
- loop {_PageAmount} times:
- set {_Page} to a new text component with "&8&l&m-------&8[公會列表]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 10 times:
- loop {_公會目錄::*}:
- set {_text} to a new text component with "&8 - &4%loop-value-3%"
- set {_公會等級} to single value "公會等級" get of "plugins/Skript/scripts/Guild/%loop-value-3%.yml"
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- add hover event with action SHOW_TEXT with text "&e公會名稱&7: &r%loop-value-3%%nl%&e公會編號&7: &f%loop-index%%nl%&e公會等級&7: &f%{_公會等級}%" to text component {_text}
- else:
- add hover event with action SHOW_TEXT with text "&e公會名稱&7: &r%loop-value-3%%nl%&e公會編號&7: &f%loop-index%%nl%&e公會等級&7: &f%{_公會等級}%%nl%%nl%&7[&a申請加入&7]" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild apply %loop-index%" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- remove loop-value-3 from {_公會目錄::*}
- stop loop
- if {_PageAmount} is loop-number-1:
- loop {_Remainder} times:
- set {_text} to a new text component with "&8 - &r"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- clear {_alltext::*}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Apply #申請 #申請加入
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "apply":
- if {公會系統::%uuid of player%::懲罰} is set:
- set {_冷卻} to "%difference between {公會系統::%uuid of player%::懲罰} and now%" parsed as timespan
- set {_冷卻} to {_冷卻} converted to seconds
- if {_冷卻} < 86400:
- set {_Time} to NumberToTimespan(86400-{_冷卻})
- send "{@Tag} &c由於退出/解散公會的懲罰 你暫時無法加入公會"
- send "{@Tag} &c你可以於 &f%{_Time}% &c後再次加入或創建公會"
- stop
- delete {公會系統::%uuid of player%::懲罰}
- if arg-2 is not set:
- send "{@Tag} &c請輸入要申請的公會編號"
- stop
- set {_GuildUID} to arg-2
- set {_Guild} to {公會目錄::%{_GuildUID}%}
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- set {_會長} to {_會長} parsed as offlineplayer
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- loop {_副會長::*}:
- set {_副會長::%loop-index%} to {_副會長::%loop-index%} parsed as offlineplayer
- set {_申請列表::*} to yaml list "申請列表" from "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- loop {_申請列表::*}:
- set {_申請玩家} to loop-value parsed as player
- if "%player%" is "%{_申請玩家}%":
- send "{@Tag} &c你已經發送過申請 請不要重複發送" to player
- stop
- send "{@Tag} &a你的公會有新的申請名單" to {_會長} and {_副會長::*}
- send "{@Tag} &a成功發送申請 請耐心等待回覆" to player
- add "%player%" to yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #ApplyList #申請名單 #申請列表
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "applyList":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- if {_pass} is not 1:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_申請列表::*} to yaml list "申請列表" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_Amount} to amount of {_申請列表::*}
- if {_Amount} is 0:
- set {_Page} to a new text component with "&8&l&m-------&8[申請名單]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 10 times:
- set {_text} to a new text component with "&8 - &r"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- set {_PageAmount} to ceil({_Amount}/10)
- set {_Remainder} to mod({_Amount},10)
- if {_Remainder} is not 0:
- set {_Remainder} to 10-{_Remainder}
- loop {_PageAmount} times:
- set {_Page} to a new text component with "&8&l&m-------&8[申請名單]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 10 times:
- loop {_申請列表::*}:
- set {_text} to a new text component with " &8%loop-value-3% "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&2[批准]"
- add hover event with action SHOW_TEXT with text "&a批准 &b%loop-value-3% &a加入公會" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild accept %loop-value-3%" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with " "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&4[拒絕]"
- add hover event with action SHOW_TEXT with text "&c拒絕 &b%loop-value-3% &c加入公會" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild deny %loop-value-3%" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- remove loop-value-3 from {_申請列表::*}
- stop loop
- if {_PageAmount} is loop-number-1:
- loop {_Remainder} times:
- set {_text} to a new text component with "&8 - &r"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- clear {_alltext::*}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Accept #批准
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "accept":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- if {_pass} is not 1:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- if arg-2 is not set:
- send "{@Tag} &c請輸入要批准申請的玩家ID"
- stop
- set {_Player} to arg-2
- set {_Player} to {_Player} parsed as offlineplayer
- set {_PlayerGuild} to single value "公會" get of "plugins/Skript/scripts/PlayerData/%UUID of {_Player}%.yml"
- if "%{_PlayerGuild}%" is not "<none>":
- remove "%{_Player}%" from yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- send "{@Tag} &c該玩家已經擁有公會了" to player
- stop
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &a公會管理層 &6%player% &a批准了 &b%{_Player}% &a的加入申請" to {_Member}
- send "{@Tag} &a公會 &e%{公會系統::%UUID of player%::公會}% &a批准你加入了他們的公會" to {_Player}
- remove "%{_Player}%" from yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- add "%{_Player}%" to yaml list "會員" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to yaml value "公會人數" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to {_公會人數} parsed as integer
- add 1 to {_公會人數}
- set "公會人數" to "%{_公會人數}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if {_Player} is online:
- set {_uuid} to uuid of {_Player}
- set {公會系統::%{_uuid}%::公會} to {公會系統::%UUID of player%::公會}
- set "公會" to "%{公會系統::%UUID of player%::公會}%" in yaml file "plugins/Skript/scripts/PlayerData/%UUID of {_Player}%.yml"
- wait 1 tick
- make player execute command "/guild applyList"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Deny #拒絕
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "deny":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "申請列表" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- if {_pass} is not 1:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- if arg-2 is not set:
- send "{@Tag} &c請輸入要拒絕申請的玩家ID"
- stop
- set {_Player} to arg-2
- set {_Player} to {_Player} parsed as offlineplayer
- remove "%{_Player}%" from yaml list "申請列表" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &c公會管理層 &6%player% &c拒絕了 &b%{_Player}% &c的加入申請" to {_Member}
- wait 1 tick
- make player execute command "/guild applyList"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #MemberList #Member #會員列表 #會員
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "memberlist":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_會員::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MasterAmount} to 1
- set {_AdminAmount} to amount of {_副會長::*}
- set {_Amount} to amount of {_會員::*}
- remove {_會長} from {_會員::*}
- remove {_副會長::*} from {_會員::*}
- set {_PageAmount} to ceil({_Amount}/10)
- set {_Remainder} to mod({_Amount},10)
- if {_Remainder} is not 0:
- set {_Remainder} to 10-{_Remainder}
- loop {_PageAmount} times:
- set {_Page} to a new text component with "&8&l&m-------&8[會員資料]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- if loop-number-1 is 1:
- set {_text} to a new text component with " &4<公會長> %{_會長}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop {_AdminAmount} times:
- loop {_副會長::*}:
- set {_text} to a new text component with " &6<副會長> &8%loop-value-3% "
- add {_text} to {_alltext::*}
- if {_pass} is 1:
- set {_text} to a new text component with "&2[管理]"
- add hover event with action SHOW_TEXT with text "&7改動 &e%loop-value-3% &7的權限" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild permission %loop-value-3%" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- remove loop-value-3 from {_副會長::*}
- stop loop
- set {_Times} to 10-({_MasterAmount}+{_AdminAmount})
- loop {_Times} times:
- loop {_會員::*}:
- set {_text} to a new text component with " &3<會員> &8%loop-value-3% "
- add {_text} to {_alltext::*}
- if {_pass} is 1:
- set {_text} to a new text component with "&2[管理]"
- add hover event with action SHOW_TEXT with text "&7改動 &e%loop-value-3% &7的權限" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild permission %loop-value-3%" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- remove loop-value-3 from {_會員::*}
- stop loop
- if {_PageAmount} is loop-number-1:
- loop {_Remainder} times:
- set {_text} to a new text component with "&8 - &r"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_MasterAmount} to 0
- set {_AdminAmount} to 0
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- clear {_alltext::*}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Permission #權限
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "permission":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- if {_pass} is not 1:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- if arg-2 is not set:
- send "{@Tag} &c請輸入要修改權限的會員"
- stop
- set {_Player} to arg-2 parsed as offlineplayer
- if arg-3 is set:
- if arg-3 is "3":
- if "%player%" is "%{_會長}%":
- loop {_副會長::*}:
- if "%{_Player}%" is "%loop-value%":
- set {_pass2} to 1
- stop loop
- if {_pass2} is 1:
- set "會長" to "%{_Player}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- add "%player%" to yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- remove "%{_Player}%" from yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- send "{@Tag} &a轉讓成功 現在 &b%{_Player}% &a是公會長" to player
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &c公會長由 &6%player% &c轉讓給了 &b%{_Player}%" to {_Member}
- stop
- else:
- send "{@Tag} &c對象必須是副會長才能轉讓"
- stop
- else:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- stop
- if arg-3 is "2":
- if "%player%" is "%{_會長}%":
- loop {_副會長::*}:
- if "%{_Player}%" is "%loop-value%":
- send "{@Tag} &c對象已經是副會長"
- stop
- set {_Amount} to amount of {_副會長::*}
- if {_Amount} = 5:
- send "{@Tag} &c副會長最大上限5人已滿"
- stop
- add "%{_Player}%" to yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &a公會長 &6%player% &a任命 &b%{_Player}% &a為副會長" to {_Member}
- else:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- stop
- if arg-3 is "1":
- if "%player%" is "%{_會長}%":
- loop {_副會長::*}:
- if "%{_Player}%" is "%loop-value%":
- set {_pass2} to 1
- stop loop
- if {_pass2} is 1:
- remove "%{_Player}%" from yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &c公會長 &6%player% &c將 &b%{_Player}% &c降級為會員" to {_Member}
- else:
- send "{@Tag} &c對象已經是會員"
- stop
- else:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- stop
- else:
- make player execute command "/guild permission %{_Player}%"
- stop
- if arg-3 is not set:
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[更改權限]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r %{_Player}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&4轉讓公會長&8&l]"
- add hover event with action SHOW_TEXT with text "&7將 &e%{_Player}% &7的權限%nl%&7更改為 &4公會長%nl%%nl%&c注意! 更改後你將降級為副會長" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild permission %{_Player}% 3" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6晉升為副會長&8&l]"
- add hover event with action SHOW_TEXT with text "&7將 &e%{_Player}% &7的權限%nl%&7更改為 &6副會長" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild permission %{_Player}% 2" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&3降級為會員&8&l]"
- add hover event with action SHOW_TEXT with text "&7將 &e%{_Player}% &7的權限%nl%&7更改為 &3會員" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild permission %{_Player}% 1" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&0踢出公會&8&l]"
- add hover event with action SHOW_TEXT with text "&7將 &e%{_Player}% &7踢出公會%nl%%nl%&c注意! 踢出後將無法反悔%nl%必續重新完成申請手續才可返回" to text component {_text}
- add click event with action RUN_COMMAND with execute "/guild kick %{_Player}%" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- clear {_alltext::*}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Kick #踢出
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "kick":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_pass} to 1
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- set {_pass} to 1
- stop loop
- if {_pass} is not 1:
- send "{@Tag} &c權限不足無法使用該功能"
- stop
- if arg-2 is not set:
- send "{@Tag} &c請輸入要踢出公會的會員"
- stop
- set {_Player} to arg-2 parsed as offlineplayer
- set "公會" to "<none>" in yaml file "plugins/Skript/scripts/PlayerData/%UUID of {_Player}%.yml"
- set {_uuid} to uuid of {_Player}
- delete {公會系統::%{_uuid}%::公會}
- send "{@Tag} &c你已被公會 &6%{公會系統::%UUID of player%::公會}% &c踢出" to {_Player}
- set {_公會人數} to yaml value "公會人數" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to {_公會人數} parsed as integer
- remove 1 from {_公會人數}
- set "公會人數" to "%{_公會人數}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- remove "%{_Player}%" from yaml list "會員" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- remove "%{_Player}%" from yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &c公會管理員 &6%player% &c將 &b%{_Player}% &c踢出公會" to {_Member}
- wait 1 tick
- make player execute command "/guild memberlist"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Leave #退出 #離開
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "leave":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_stop} to 1
- if {_stop} is 1:
- send "{@Tag} &c會長無法退出公會 請解散或轉讓會長"
- stop
- if arg-2 is "riohnsepoguibvefcwcb":
- remove "%player%" from yaml list "會員" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &c公會成員 &b%player% &c退出了公會" to {_Member}
- set {_副會長::*} to yaml list "副會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_副會長::*}:
- if "%player%" is "%loop-value%":
- remove "%player%" from yaml list "副會長" from file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- stop loop
- set {_公會人數} to yaml value "公會人數" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to {_公會人數} parsed as integer
- remove 1 from {_公會人數}
- set "公會人數" to "%{_公會人數}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- send "{@Tag} &c你從公會 &a%{公會系統::%UUID of player%::公會}% &c退出了" to player
- delete {公會系統::%UUID of player%::公會}
- set "公會" to "<none>" in yaml file "plugins/Skript/scripts/PlayerData/%UUID of player%.yml"
- set {公會系統::%uuid of player%::懲罰} to now
- if arg-2 is not set:
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[解散公會]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8退出公會後將無法反悔"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8必須重新申請加入"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8並得到批准才得以返回"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8如果確認無誤"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8請點選下方紅色 &4[&4確認&4]"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8如果按錯或反悔"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8請直接關閉此介面"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_random} to random integer between 1 and 8
- loop 4 times:
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_random2} to random integer between 1 and 5
- if {_random2} is 1:
- set {_format} to "&1[&1確認&1]"
- if {_random2} is 2:
- set {_format} to "&8[&8確認&8]"
- if {_random2} is 3:
- set {_format} to "&2[&2確認&2]"
- if {_random2} is 4:
- set {_format} to "&5[&5確認&5]"
- if {_random2} is 5:
- set {_format} to "&6[&6確認&6]"
- if loop-number = {_random}:
- set {_format} to "&4[&4確認&4]"
- set {_text} to a new text component with "%{_format}%"
- add hover event with action SHOW_TEXT with text "&a取消" to text component {_text}
- if loop-number = {_random}:
- add click event with action RUN_COMMAND with execute "/guild leave riohnsepoguibvefcwcb" to text component {_text}
- add hover event with action SHOW_TEXT with text "&c確認退出%nl%&c退出後將無法反悔%nl%%nl%&4且會於12小時內%nl%無法再次加入或創建公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 4 times:
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_random2} to random integer between 1 and 5
- if {_random2} is 1:
- set {_format} to "&1[&1確認&1]"
- if {_random2} is 2:
- set {_format} to "&8[&8確認&8]"
- if {_random2} is 3:
- set {_format} to "&2[&2確認&2]"
- if {_random2} is 4:
- set {_format} to "&5[&5確認&5]"
- if {_random2} is 5:
- set {_format} to "&6[&6確認&6]"
- if loop-number+4 = {_random}:
- set {_format} to "&4[&4確認&4]"
- set {_text} to a new text component with "%{_format}%"
- add hover event with action SHOW_TEXT with text "&a取消" to text component {_text}
- if loop-number+4 = {_random}:
- add click event with action RUN_COMMAND with execute "/guild leave riohnsepoguibvefcwcb" to text component {_text}
- add hover event with action SHOW_TEXT with text "&c確認退出%nl%&c退出後將無法反悔%nl%%nl%&4且會於12小時內%nl%無法再次加入或創建公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Donate #貢獻 #捐獻
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "donate":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- if arg-2 is not set:
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[公會捐獻]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8每捐獻&6&l100&8尼歐"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8並獲得&4&l1&8公會點數"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8將增加&6&l1&8公會資金"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8你的尼歐&8&l: &6%money of player%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8你的公會點數&8&l: &4%{公會系統::%UUID of player%::點數}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_公會資金} to yaml value "公會資金" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_text} to a new text component with "&r &8當前公會資金&8&l: &6%{_公會資金}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r"
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6&l1&6資金&8&l]"
- add click event with action RUN_COMMAND with execute "/guild donate 1" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7捐獻&6100尼歐%nl%&7獲得&41點數%nl%&7增加&61公會資金" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6&l10&6資金&8&l]"
- add click event with action RUN_COMMAND with execute "/guild donate 10" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7捐獻&61000尼歐%nl%&7獲得&410點數%nl%&7增加&610公會資金" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6&l100&6資金&8&l]"
- add click event with action RUN_COMMAND with execute "/guild donate 100" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7捐獻&610000尼歐%nl%&7獲得&4100點數%nl%&7增加&6100公會資金" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6&l1000&6資金&8&l]"
- add click event with action RUN_COMMAND with execute "/guild donate 1000" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7捐獻&6100000尼歐%nl%&7獲得&41000點數%nl%&7增加&61000公會資金" to text component {_text}
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_text} to a new text component with "&8&l[&6&l10000&6資金&8&l]"
- add click event with action RUN_COMMAND with execute "/guild donate 10000" to text component {_text}
- add hover event with action SHOW_TEXT with text "&7捐獻&61000000尼歐%nl%&7獲得&410000點數%nl%&7增加&610000公會資金" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- if arg-2 is "1" or "10" or "100" or "1000" or "10000":
- set {_Donate} to arg-2 parsed as number
- if player's money >= {_Donate}*100:
- remove {_Donate}*100 from player's money
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- if {_Member} is online:
- send "{@Tag} &a公會成員 &b%player% &a捐獻了 &6%{_Donate}*100% &a尼歐" to {_Member}
- set {_公會資金} to yaml value "公會資金" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會資金} to {_公會資金} parsed as integer
- add {_Donate} to {_公會資金}
- set "公會資金" to "%{_公會資金}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if {公會系統::%UUID of player%::點數} is not set:
- set {公會系統::%UUID of player%::點數} to 0
- add {_Donate} to {公會系統::%UUID of player%::點數}
- wait 1 tick
- execute player command "/guild donate"
- else:
- send "{@Tag} &c尼歐不足 無法捐獻"
- stop
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #LevelUp #Level #Up #升級
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "levelup":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- set {_公會人數} to single value "公會人數" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會等級} to single value "公會等級" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會經驗} to single value "公會經驗" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會資金} to single value "公會資金" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會之星} to single value "公會之星" get of "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set {_公會人數} to {_公會人數} parsed as number
- set {_公會等級} to {_公會等級} parsed as number
- set {_公會經驗} to {_公會經驗} parsed as number
- set {_公會資金} to {_公會資金} parsed as number
- set {_公會之星} to {_公會之星} parsed as number
- set {_LevelUpNeed} to GetGuildLevelNeed({_公會等級})
- set {_LevelUpNeed::*} to {_LevelUpNeed} split at "/"
- set {_LvNeed} to {_LevelUpNeed::1} parsed as number
- set {_ExpNeed} to {_LevelUpNeed::2} parsed as number
- set {_MoneyNeed} to {_LevelUpNeed::3} parsed as number
- set {_StarNeed} to {_LevelUpNeed::4} parsed as number
- set {_MemberNeed} to {_LevelUpNeed::5} parsed as number
- set {_pass} to 0
- if {_公會等級} = {_LvNeed}:
- add 1 to {_pass}
- if {_公會經驗} >= {_ExpNeed}:
- add 1 to {_pass}
- if {_公會資金} >= {_MoneyNeed}:
- add 1 to {_pass}
- if {_公會之星} >= {_StarNeed}:
- add 1 to {_pass}
- if {_公會人數} >= {_MemberNeed}:
- add 1 to {_pass}
- if {_pass} is 5:
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- send "{@Tag} &6公會等級提升為 &a&l%{_公會等級}+1% &6級" to {_Member}
- remove {_ExpNeed} from {_公會經驗}
- remove {_MoneyNeed} from {_公會資金}
- remove {_StarNeed} from {_公會之星}
- add 1 to {_公會等級}
- set "公會等級" to "%{_公會等級}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set "公會經驗" to "%{_公會經驗}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set "公會資金" to "%{_公會資金}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- set "公會之星" to "%{_公會之星}%" in yaml file "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- else:
- send "{@Tag} &c未達成指定條件 無法升級公會"
- stop
- else:
- send "{@Tag} &c只有會長可以升級公會"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Disband #解散
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "disband":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{公會系統::%UUID of player%::公會}%.yml"
- if "%player%" is "%{_會長}%":
- if arg-2 is "ierpoguraeihgpsoteub":
- set {_GuildName} to {公會系統::%UUID of player%::公會}
- set {_MemberList::*} to yaml list "會員" from "plugins/Skript/scripts/Guild/%{_GuildName}%.yml"
- loop {_MemberList::*}:
- set {_Member} to loop-value parsed as offlineplayer
- set {_uuid} to uuid of {_Member}
- set "公會" to "<none>" in yaml file "plugins/Skript/scripts/PlayerData/%{_uuid}%.yml"
- delete {公會系統::%{_uuid}%::公會}
- send "{@Tag} &c公會會長 &b%player% &c解散了公會" to {_Member}
- delete file "plugins/Skript/scripts/Guild/%{_GuildName}%.yml"
- remove {_GuildName} from {公會目錄::*}
- send "{@Tag} &c公會 &6%{_GuildName}% &c解散了 大家快去挖人才(?" to all players
- set {公會系統::%uuid of player%::懲罰} to now
- stop
- if arg-2 is not set:
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[解散公會]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8公會解散後將無法反悔"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8公會的領地與資源"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8將會被系統移除"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8如果確認無誤"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8請點選下方紅色 &4[&4確認&4]"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8如果按錯或反悔"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8請直接關閉此介面"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_random} to random integer between 1 and 8
- loop 4 times:
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_random2} to random integer between 1 and 5
- if {_random2} is 1:
- set {_format} to "&1[&1確認&1]"
- if {_random2} is 2:
- set {_format} to "&8[&8確認&8]"
- if {_random2} is 3:
- set {_format} to "&2[&2確認&2]"
- if {_random2} is 4:
- set {_format} to "&5[&5確認&5]"
- if {_random2} is 5:
- set {_format} to "&6[&6確認&6]"
- if loop-number = {_random}:
- set {_format} to "&4[&4確認&4]"
- set {_text} to a new text component with "%{_format}%"
- add hover event with action SHOW_TEXT with text "&a取消" to text component {_text}
- if loop-number = {_random}:
- add click event with action RUN_COMMAND with execute "/guild disband ierpoguraeihgpsoteub" to text component {_text}
- add hover event with action SHOW_TEXT with text "&c確認解散%nl%&c解散後將無法反悔%nl%%nl%&4且會於12小時內%nl%無法再次加入或創建公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- loop 4 times:
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_random2} to random integer between 1 and 5
- if {_random2} is 1:
- set {_format} to "&1[&1確認&1]"
- if {_random2} is 2:
- set {_format} to "&8[&8確認&8]"
- if {_random2} is 3:
- set {_format} to "&2[&2確認&2]"
- if {_random2} is 4:
- set {_format} to "&5[&5確認&5]"
- if {_random2} is 5:
- set {_format} to "&6[&6確認&6]"
- if loop-number+4 = {_random}:
- set {_format} to "&4[&4確認&4]"
- set {_text} to a new text component with "%{_format}%"
- add hover event with action SHOW_TEXT with text "&a取消" to text component {_text}
- if loop-number+4 = {_random}:
- add click event with action RUN_COMMAND with execute "/guild disband ierpoguraeihgpsoteub" to text component {_text}
- add hover event with action SHOW_TEXT with text "&c確認解散%nl%&c解散後將無法反悔%nl%%nl%&4且會於12小時內%nl%無法再次加入或創建公會" to text component {_text}
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- else:
- send "{@Tag} &c你不是公會會長 你不能這麼做"
- stop
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- # #Quest #任務
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "quest":
- if "%{公會系統::%UUID of player%::公會}%" is not "<none>":
- if arg-2 is not set:
- if "%{公會系統::%UUID of player%::任務::編號}%" is "<none>":
- set {_任務::*} to skutil yaml nodes with keys "quest" from file "plugins/Skript/scripts/GuildQuest/quest.yml"
- loop {_任務::*}:
- set {_expand::%loop-value%} to skutil yaml value "quest.%loop-value%" from file "plugins/Skript/scripts/GuildQuest/quest.yml"
- loop {_expand::*}:
- if loop-index do not contain ".":
- add loop-index to {_Random::*}
- set {_Random} to amount of {_Random::*}
- set {_Random} to random integer between 1 and {_Random}
- loop {_expand::*}:
- if loop-index is "%{_Random::%{_Random}%}%":
- set {_Number} to loop-index
- set {_Type} to {_expand::%{_Random::%{_Random}%}%.Type}
- set {_Target} to {_expand::%{_Random::%{_Random}%}%.Target}
- set {_Content} to {_expand::%{_Random::%{_Random}%}%.Content}
- set {_Reward} to {_expand::%{_Random::%{_Random}%}%.Reward}
- set {公會系統::%UUID of player%::任務::編號} to {_Number}
- set {公會系統::%UUID of player%::任務::分類} to {_Type}
- set {公會系統::%UUID of player%::任務::目標} to {_Target}
- set {公會系統::%UUID of player%::任務::獎勵} to {_Reward}
- #set {公會系統::%UUID of player%::任務冷卻} to now
- set {_任務::*} to skutil yaml nodes with keys "quest" from file "plugins/Skript/scripts/GuildQuest/quest.yml"
- loop {_任務::*}:
- set {_expand::%loop-value%} to skutil yaml value "quest.%loop-value%" from file "plugins/Skript/scripts/GuildQuest/quest.yml"
- loop {_expand::*}:
- if loop-index do not contain ".":
- add loop-index to {_Random::*}
- set {_Type} to {公會系統::%UUID of player%::任務::分類}
- set {_Target} to {公會系統::%UUID of player%::任務::目標}
- set {_Content} to {_expand::%{公會系統::%UUID of player%::任務::編號}%.Content}
- set {_Reward} to {公會系統::%UUID of player%::任務::獎勵}
- set {_I} to slot player's current hotbar slot of player
- set {_book} to a new book
- set {_newline} to a new text component with " %nl%"
- set {_Page} to a new text component with "&8&l&m-------&8[公會任務]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8%{_Content}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8%{_Type}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8%{_Target}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r &8%{_Reward}%"
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_random} to random integer between 1 and 8
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_Page} to a new text component with "&8&l&m----------------------&r"
- add {_Page} to {_alltext::*}
- add text component {_alltext::*} to book {_book}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
- stop
- on skript load:
- send "123" to all players
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- command /guild12 [<text=menu>]:
- trigger:
- open anvil gui named "&0輸入公會名稱稱" to player with text "在此輸入名稱" and item book with lore "||&7輸入完名稱後||&7點擊右方物品確認||||&c&l確認後將不可反悔"
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- set {_Page} to a new text component with "&8&l&m-------&8[公會選單]&8&l&m-------"
- add {_Page} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- set {_Page} to a new text component with "&8 剩餘點數: &5%{Data::%uuid of player%::技能點}%"
- add {_Page} to {_alltext::*}
- #
- set {_Back} to a new text component with "&0&l◀◀◀"
- add click event with action RUN_COMMAND with execute "/Menu_Sp1" to text component {_Back}
- add hover event with action SHOW_TEXT with text "&6&o上一頁" to text component {_Back}
- add {_Back} to {_alltext::*}
- #
- set {_Page} to a new text component with "&r &r"
- add {_Page} to {_alltext::*}
- #
- set {_Back} to a new text component with "&0&l▶▶▶"
- add click event with action RUN_COMMAND with execute "/Menu_Sp2" to text component {_Back}
- add hover event with action SHOW_TEXT with text "&6&o下一頁" to text component {_Back}
- add {_Back} to {_alltext::*}
- #
- add text component {_alltext::*} to book {_book}
- clear {_alltext::*}
- open book {_book} to player
- set slot player's current hotbar slot of player to {_I}
Advertisement
Add Comment
Please, Sign In to add comment