Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options:
- 路徑: "plugins/Skript/scripts/PlayerData/%UUID of player%/Guild.yml"
- Tag: &7[&b公會系統&7]
- on join:
- if {公會::%UUID of player%} is set:
- set "公會" to "<none>" in yaml file {@路徑}
- stop
- 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 {@路徑}
- command /guild [<text=menu>] [<text>]:
- aliases: /g
- trigger:
- if arg-1 is "resetall":
- if name of player is "LeisureAW":
- 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%"
- set {_公會} to single value "公會" get of {@路徑}
- if "%{_公會}%" is "<none>":
- create file {@路徑}
- set "公會" to "<none>" in yaml file {@路徑}
- if file existance of {@路徑} is false:
- create file {@路徑}
- set "公會" to "<none>" in yaml file {@路徑}
- if arg-1 is "menu":
- set {_公會} to single value "公會" get of {@路徑}
- if "%{_公會}%" is "<none>":
- 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::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_CreateGuild} 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 {_CreateGuild}
- add hover event with action SHOW_TEXT with text "&7點此創建公會" to text component {_CreateGuild}
- add {_CreateGuild} 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 {_JoinGuild} 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 {_JoinGuild}
- add hover event with action SHOW_TEXT with text "&7點此尋找公會" to text component {_JoinGuild}
- add {_JoinGuild} 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&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:
- 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::*}
- add {_newline} to {_alltext::*}
- add {_newline} to {_alltext::*}
- set {_text} to a new text component with "&r "
- add {_text} to {_alltext::*}
- set {_CreateGuild} to a new text component with "&8&l[&3會員列表&8&l]"
- add click event with action RUN_COMMAND with execute "/guild memberlist" to text component {_CreateGuild}
- add hover event with action SHOW_TEXT with text "&7點此創建公會" to text component {_CreateGuild}
- add {_CreateGuild} 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 {_JoinGuild} 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 {_JoinGuild}
- add hover event with action SHOW_TEXT with text "&7點此尋找公會" to text component {_JoinGuild}
- add {_JoinGuild} 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&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-1 is "create":
- if money of player < 1000000:
- send "{@Tag} &c尼歐不足 需要100萬尼歐" to player
- stop
- if arg-2 is not set:
- send "{@Tag} &e輸入 &6/guild create <公會名稱> &e來創建公會" 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
- loop {公會目錄::*}:
- if "%{_Name}%" is "%loop-value%":
- send "{@Tag} &c這個公會名稱已被使用過"
- 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"
- set "副會長" to "<none>" in yaml 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 "<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 {@路徑}
- add "%{_Name}%" to {公會目錄::*}
- stop
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "list":
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- if arg-1 is "join":
- if arg-2 is not set:
- send "{@Tag} &c請輸入要申請的公會名稱"
- stop
- set {_Guild} to arg-2
- set {_會長} to yaml value "會長" from "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- set {_副會長} to yaml value "副會長" from "plugins/Skript/scripts/Guild/%{_Guild}%.yml"
- set {_會長} to {_會長} parsed as player
- set {_副會長} to {_副會長} parsed as player
- 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
- if arg-1 is "apply":
- 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}%/Guild.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} &e公會管理層 &c%player% &e批准了 &b%{_Player}% &e的加入申請" 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}%/Guild.yml"
- if arg-1 is "deny":
- 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公會管理層 &c%player% &c拒絕了 &b%{_Player}% &c的加入申請" to {_Member}
- #──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
- 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