Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options:
- tag: &6隊伍 >> #TAG名
- second: 30 #重複邀請玩家等待時間
- radius: 60 #分配經驗值給附近隊友的範圍
- partyexp: 1.6 #隊伍經驗倍數
- expdistribution: true #是否啟用經驗分配
- itemdistribution: true #是否啟用物品分配
- scoreboard: true #是否啟用記分板
- chat: true #是否啟用隊伍聊天
- number: 10 #隊伍最大人數
- difference: 20 #等級差距
- #------------------------------------------------------------------------------------------------------------
- command /mpt [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if arg-1 is "tp":
- if arg-2 is set:
- if arg-3 is set:
- if player doesn't have permission "mpt":
- send "{@tag} &c你沒有權限"
- stop trigger
- if file existance of "plugins/MithicParty/%arg-2%.yml" is true:
- if arg-3 is "0":
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%arg-2%.yml"
- if {_mypartycreate.%name of player%} is "%arg-2%":
- set {_myparty.%name of player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%arg-2%.yml"
- loop {_myparty.%name of player%.list::*}:
- set {_player} to loop-value parsed as player
- teleport {_player} to player
- send "{@tag} &c你傳送了 &a%loop-value% &c到你這裡"
- else:
- send "{@tag} &c此人不是隊長 他的隊長為 &a%{_mypartycreate.%name of player%}%"
- else:
- set {_lv::*} to split "%arg-3%" at "~"
- set {_lv::1} to {_lv::1} parsed as number
- set {_lv::2} to {_lv::2} parsed as number
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%arg-2%.yml"
- if {_mypartycreate.%name of player%} is "%arg-2%":
- set {_myparty.%name of player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%arg-2%.yml"
- loop {_myparty.%name of player%.list::*}:
- set {_player} to loop-value parsed as player
- set {_玩家資料.%loop-value%::玩家等級} to single value "玩家等級" get of "plugins/players/%loop-value%.yml"
- set {_玩家資料.%loop-value%::玩家等級} to {_玩家資料.%loop-value%::玩家等級} parsed as number
- if {_玩家資料.%loop-value%::玩家等級} is between {_lv::1} and {_lv::2}:
- teleport {_player} to player
- send "{@tag} &c你傳送了 &a%loop-value% &c到你這裡 &b等級為 &c%{_玩家資料.%loop-value%::玩家等級}% "
- else:
- send "{@tag} &c此人不是隊長 他的隊長為 &a%{_mypartycreate.%name of player%}%"
- else:
- send "{@tag} &c此人沒有隊伍"
- if arg-1 isn't set:
- send "&b----------&6隊伍指令&b----------"
- send "&a/mpt create &d創造隊伍"
- send "&a/mpt join <玩家ID> &d加入隊伍,須等人邀請"
- send "&a/mpt invite <玩家ID> &d邀請人加入隊伍"
- send "&a/mpt leave &d離開隊伍(隊長退出將解散)"
- send "&a/mpt kick <玩家ID> &d剔除隊員"
- send "&a/mpt manage &d隊伍管理/查詢"
- send "&a/mpt tp <隊長ID> <等級>~<等級> &d傳送該隊伍符合等級範圍的隊員到自己位置(OP專用) "
- send "&a/mpt tp <隊長ID> 0 &d傳送該隊伍到自己位置(OP專用)"
- send "&b----------&6隊伍指令&b----------"
- if arg-1 is "create":
- if file existance of "plugins/MithicParty/%player%.yml" is false:
- create file "plugins/MithicParty/%player%.yml"
- set {_mypartycreateexpbutton.%name of player%} to "&a經驗分享開啟中"
- set {_mypartycreateitem.%name of player%} to "&c物品分享關閉中"
- set skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml" to "%name of player%"
- add name of player to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- set skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateexpbutton.%name of player%}%"
- set skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateitem.%name of player%}%"
- add name of player to skutil yaml list "詢問中" from file "plugins/MithicParty/%player%.yml"
- set skutil yaml value "聊天介面" from file "plugins/MithicParty/%player%.yml" to "&e一般"
- set skutil yaml value "進行中副本" from file "plugins/MithicParty/%player%.yml" to "無"
- send "{@tag} &e你創建了隊伍"
- else:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%name of player%.yml"
- if {_mypartycreate.%name of player%} is name of player:
- send "{@tag} &c你已創建了隊伍"
- else:
- send "{@tag} &c你已加入了隊伍"
- if arg-1 is "join":
- if arg-2 is set:
- set {_mypartyquest.%name of player%::*} to skutil yaml list "詢問中" from file "plugins/MithicParty/%arg-2%.yml"
- loop {_mypartyquest.%name of player%::*}:
- if loop-value is name of player:
- create file "plugins/MithicParty/%loop-value%.yml"
- add loop-value to {_myparty.%arg-2%.list::*}
- set skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml" to "%arg-2%"
- set skutil yaml value "聊天介面" from file "plugins/MithicParty/%player%.yml" to "&e一般"
- set skutil yaml value "進行中副本" from file "plugins/MithicParty/%player%.yml" to "無"
- set {_myparty.yes1.%name of player%} to 0
- stop loop
- if {_myparty.yes1.%name of player%} is set:
- set {_myparty.%name of player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%arg-2%.yml"
- loop {_myparty.%name of player%.list::*}:
- add name of player to skutil yaml list "隊員" from file "plugins/MithicParty/%loop-value%.yml"
- add loop-value to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- set {_myparty.%name of player%.name} to loop-value parsed as player
- send "{@tag} &e&f%player%&e成功加入隊伍" to {_myparty.%name of player%.name}
- send "{@tag} &c你成功加入隊伍"
- remove name of player from yml list "詢問中" of file "plugins/MithicParty/%arg-2%.yml"
- add name of player to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- else:
- send "{@tag} &c你尚未被邀請"
- else:
- send "{@tag} &c請使用/mpt join <ID>"
- if arg-1 is "invite":
- if arg-2 is set:
- loop all players:
- if loop-player is arg-2:
- set {_myparty.playeryes} to 1
- stop loop
- if {_myparty.playeryes} is set:
- set {_invite} to arg-2 parsed as player
- set {_dgfilejoin::*} to files in "plugins/mythicdg"
- loop {_dgfilejoin::*}:
- set {_mydgquit} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
- if {_invite} is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
- set {_no1} to 1
- stop loop
- if {_no1} is set:
- send "{@tag} &c邀請人在攻略副本中"
- stop trigger
- set {_player} to player
- loop {_dgfilejoin::*}:
- set {_mydgquit} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
- if {_player} is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
- set {_no1} to 1
- stop loop
- if {_no1} is set:
- send "{@tag} &c你在攻略副本中"
- stop trigger
- if file existance of "plugins/MithicParty/%arg-2%.yml" is true:
- send "{@tag} &f%arg-2%&c已加入隊伍,無法邀請"
- else:
- if file existance of "plugins/MithicParty/%player%.yml" is false:
- send "{@tag} &c你不是隊長或是尚未創建隊伍"
- stop trigger
- set {_mypartyquest.%name of player%::*} to skutil yaml list "詢問中" from file "plugins/MithicParty/%player%.yml"
- loop {_mypartyquest.%name of player%::*}:
- if loop-value is arg-2:
- send "{@tag} &c你已邀請過&f%arg-2%"
- send "{@tag} &e請等待{@second}秒後可再次邀請"
- clear {_myparty.questyes}
- stop loop
- else:
- set {_myparty.%player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- set {_myparty.%player%.number} to 0
- loop {_myparty.%player%.list::*}:
- increase {_myparty.%player%.number} by 1
- set {_myparty.%player%.number1} to 0
- loop {_mypartyquest.%name of player%::*}:
- increase {_myparty.%player%.number1} by 1
- set {_myparty.%player%.number} to {_myparty.%player%.number} + {_myparty.%player%.number1} - 1
- if {_myparty.%player%.number} > {@number}:
- send "{@tag} &c隊伍人數過多,無法邀請"
- else:
- set {_myparty.questyes} to 0
- if {_myparty.questyes} is set:
- add arg-2 to skutil yaml list "詢問中" from file "plugins/MithicParty/%player%.yml"
- set {_myparty_invite.%name of player%} to arg-2 parsed as player
- set {_json} to "{""text"":""&a[點此加入]"",""clickEvent"":{""action"":""run_command"",""value"":""/mpt join %name of player%""}}"
- send "{@tag} &e邀請&f%arg-2%&e加入隊伍" to player
- send "&b----------&6隊伍指令&b----------" to {_myparty_invite.%name of player%}
- send "&f%name of player%&e伸出手想邀請你進入他的隊伍" to {_myparty_invite.%name of player%}
- send "&e他的手很痠,只能撐&f{@second}&e秒" to {_myparty_invite.%name of player%}
- send "&e如要加入請在期間內使用&a/mpt join %name of player%" to {_myparty_invite.%name of player%}
- execute console command "/tellraw %{_myparty_invite.%name of player%}% {""text"":""&e或 "", ""extra"":[%{_json}%]}"
- send "&b----------&6隊伍指令&b----------" to {_myparty_invite.%name of player%}
- wait 30 second
- clear {_myparty_invite.%name of player%}
- set {_mpt.invite.list::*} to skutil yml list "詢問中" from file "plugins/MithicParty/%player%.yml"
- loop {_mpt.invite.list::*}:
- if loop-value is "arg-2":
- remove arg-2 from skutil yml list "詢問中" from file "plugins/MithicParty/%player%.yml"
- else:
- send "{@tag} &f%arg-2%&c尚未在線上"
- else:
- send "{@tag} &c請使用/mpt invite <ID>"
- if arg-1 is "leave":
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml"
- if {_mypartycreate.%name of player%} isn't set:
- send "{@tag} &c系統偵測到BUG!!!"
- send "{@tag} &c修復中..."
- execute console command "/mptbug true %player%"
- send "{@tag} &b修復完畢,可再次創建隊伍"
- stop trigger
- if {_mypartycreate.%name of player%} is name of player:
- send "{@tag} &e已離開隊伍"
- set {_myparty.%player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- set {_dgfilejoin2::*} to files in "plugins/mythicdg"
- loop {_dgfilejoin2::*}:
- set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
- set {_mydgline1.%loop-value%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
- loop {_mydgline1.%loop-value%.list::*}:
- if "%loop-value-2%" is "%name of player%":
- remove "%loop-value-2%" from skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value-1%"
- stop loop
- if {_myparty.%player%.list::2} is set:
- loop {_myparty.%player%.list::*}:
- set {_myparty.%name of player%.name} to loop-value parsed as player
- send "{@tag} &e隊長已離開隊伍" to {_myparty.%name of player%.name}
- send "{@tag} &e新隊長為 &f%{_myparty.%player%.list::2}% " to {_myparty.%name of player%.name}
- set skutil yaml value "隊長" from file "plugins/MithicParty/%loop-value%.yml" to "%{_myparty.%player%.list::2}%"
- remove name of player from yml list "隊員" of file "plugins/MithicParty/%loop-value%.yml"
- add "%{_myparty.%player%.list::2}%" to skutil yaml list "詢問中" from file "plugins/MithicParty/%{_myparty.%player%.list::2}%.yml"
- set skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%{_myparty.%player%.list::2}%.yml" to "§a經驗分享開啟中"
- set skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%{_myparty.%player%.list::2}%.yml" to "§c物品分享關閉中"
- delete file "plugins/MithicParty/%name of player%.yml"
- else:
- set {_myparty.%{_mypartycreate.%name of player%}%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- loop {_myparty.%{_mypartycreate.%name of player%}%.list::*}:
- if loop-value is name of player:
- set {_myparty.yes.%name of player%} to 1
- stop loop
- if {_myparty.yes.%name of player%} is set:
- loop {_myparty.%{_mypartycreate.%name of player%}%.list::*}:
- remove name of player from yml list "隊員" of file "plugins/MithicParty/%loop-value%.yml"
- set {_myparty.%name of player%.name} to loop-value parsed as player
- send "{@tag} &e&f%name of player%&e離開了隊伍" to {_myparty.%name of player%.name}
- set {_mypartydg.%player%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%player%.yml"
- if {_mypartydg.%player%} isn't "無":
- execute player command "/mydg leave"
- delete file "plugins/MithicParty/%name of player%.yml"
- send "{@tag} &e你離開了隊伍"
- else:
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- delete file "plugins/MithicParty/%name of player%.yml"
- send "{@tag} &e你離開了隊伍"
- else:
- send "{@tag} &e你尚未加入隊伍"
- else:
- send "{@tag} &c你尚未創建或加入隊伍"
- if arg-1 is "kick":
- if arg-2 is set:
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml"
- if {_mypartycreate.%name of player%} is name of player:
- if arg-2 is name of player:
- send "{@tag} &c請勿剔除自己"
- stop trigger
- set {_myparty.%player%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- loop {_myparty.%player%.list::*}:
- if loop-value is arg-2:
- send "{@tag} &e你成功剔除&f%arg-2%"
- set {_myparty.%name of player%.name} to loop-value parsed as player
- send "{@tag} &e隊長已剔除&f%arg-2%" to {_myparty.%name of player%.name}
- set {_myparty.yes.%name of player%} to 1
- stop loop
- if {_myparty.yes.%name of player%} isn't set:
- send "{@tag} &c隊伍中找不到&f%arg-2%"
- else:
- loop {_myparty.%player%.list::*}:
- set {_myparty.%name of player%.name} to loop-value parsed as player
- send "{@tag} &e隊長已剔除&f%arg-2%" to {_myparty.%name of player%.name}
- remove arg-2 from yml list "隊員" of file "plugins/MithicParty/%loop-value%.yml"
- set {_mypartydg.%arg-2%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%arg-2%.yml"
- if {_mypartydg.%arg-2%} isn't "無":
- set {_mypartyname.%arg-2%} to arg-2 parsed as player
- execute {_mypartyname.%arg-2%} command "/mydg leave"
- delete file "plugins/MithicParty/%arg-2%.yml"
- else:
- send "{@tag} &c你不是隊長無法剔除"
- else:
- send "{@tag} &c你尚未創建或加入隊伍"
- else:
- send "{@tag} &c請使用/mpt kick <ID>"
- if arg-1 is "search1":
- open chest with 6 row named "&6範圍內玩家" to player
- loop all players:
- set {_search.%loop-player%} to 1
- set {_slot} to -1
- loop all entity in radius {隊伍::%player%尋找範圍} around player's location:
- if {_search.%loop-value%} is set:
- if loop-value isn't name of player:
- increase {_slot} by 1
- set {_skull} to "%loop-value%" parsed as offlineplayer
- set {_玩家等級} to single value "玩家等級" get of "plugins/players/%loop-value%.yml"
- if file existance of "plugins/MithicParty/%loop-value%.yml" is true:
- set {_組隊狀況} to "&c已加入隊伍了"
- else:
- set {_組隊狀況} to "&a尚無加入隊伍"
- set {_search} to skull of {_skull} named "&6玩家&f%loop-value%" with lore "&e等級: %{_玩家等級}%||&e組隊狀況: %{_組隊狀況}%"
- make gui slot {_slot} of player with {_search} to run player command "/mpt invite %{_skull}%" with permission ""
- clear {隊伍::%player%尋找範圍}
- if arg-1 is "dg":
- if {隊伍::%player%尋找範圍} isn't set:
- stop trigger
- if {隊伍::%player%尋找範圍} < 100:
- increase {隊伍::%player%尋找範圍} by 10
- set {_searchgui.%player%} to white wool named "&6尋找玩家" with lore "&b目前尋找範圍 [&6%{隊伍::%player%尋找範圍}%&b]"
- make gui slot 13 of player with {_searchgui.%player%} to run player command "/mpt search1" with permission ""
- else:
- send "{@tag} &c最高尋找範圍為100"
- if arg-1 is "search+":
- if {隊伍::%player%尋找範圍} isn't set:
- stop trigger
- if {隊伍::%player%尋找範圍} < 100:
- increase {隊伍::%player%尋找範圍} by 10
- set {_searchgui.%player%} to white wool named "&6尋找玩家" with lore "&b目前尋找範圍 [&6%{隊伍::%player%尋找範圍}%&b]"
- make gui slot 13 of player with {_searchgui.%player%} to run player command "/mpt search1" with permission ""
- else:
- send "{@tag} &c最高尋找範圍為100"
- if arg-1 is "search-":
- if {隊伍::%player%尋找範圍} isn't set:
- stop trigger
- if {隊伍::%player%尋找範圍} > 10:
- reduce {隊伍::%player%尋找範圍} by 10
- set {_searchgui.%player%} to white wool named "&6尋找玩家" with lore "&b目前尋找範圍 [&6%{隊伍::%player%尋找範圍}%&b]"
- make gui slot 13 of player with {_searchgui.%player%} to run player command "/mpt search1" with permission ""
- else:
- send "{@tag} &c最少尋找範圍為10"
- if arg-1 is "search":
- open chest with 3 row named "&6查詢範圍" to player
- set {隊伍::%player%尋找範圍} to "10" parsed as number
- set {_searchgui.%player%} to white wool named "&6尋找玩家" with lore "&b目前尋找範圍 [&6%{隊伍::%player%尋找範圍}%&b]"
- make gui slot 13 of player with {_searchgui.%player%} to run player command "/mpt search1" with permission ""
- set {_searchgui+.%player%} to green wool named "&a增加範圍10格"
- make gui slot 15 of player with {_searchgui+.%player%} to run player command "/mpt search+" with permission ""
- set {_searchgui-.%player%} to red wool named "&c減少範圍10格"
- make gui slot 11 of player with {_searchgui-.%player%} to run player command "/mpt search-" with permission ""
- if arg-1 is "manage1":
- open chest with 1 row named "&6隊伍介面" to player
- set {_Villager} to "Villager" parsed as offlineplayer
- set {_creategui.%player%} to skull of {_Villager} named "&6創建隊伍" with lore "&b創建一個隊伍||&b與隊友們&a分享經驗、物品、挑戰副本||&b最大隊伍人數 &6{@number} &b人"
- make gui slot 0 of player with {_creategui.%player%} to run player command "/mpt create" with permission ""
- set {_leaveguinbt} to "{SkullOwner:{Id:""e9251f37-6148-4847-8fd1-1ab6e90bb8ac"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTljYjdjOTNhNTYyOGI4OGYyM2M0OTFjMTc2NDMzMTY0ZDQ2NmE0MjQ4YzQ1YmIyMWQzYTY5YTMwZTFkZjk1In19fQ==""}]}}}"
- set {_leavegui.%player%} to player head with custom nbt "%{_leaveguinbt}%" named "&6離開隊伍" with lore "&b如果是隊長離開的話,隊友也將離開隊伍"
- make gui slot 8 of player with {_leavegui.%player%} to run player command "/mpt leave" with permission ""
- set {_0qt} to "0qt" parsed as offlineplayer
- set {_invitegui.%player%} to skull of {_0qt} named "&6尋找玩家" with lore "&b在一定範圍中尋找玩家||&b並顯示玩家訊息"
- make gui slot 2 of player with {_invitegui.%player%} to run player command "/mpt search" with permission ""
- set {_11} to "LegendaryJulien" parsed as offlineplayer
- set {_managegui.%player%} to skull of {_11} named "&6查詢/管理隊伍" with lore "&b隊長可從這&a更改經驗/物品分享/聊天模式與剔除隊友||&b隊員可從這&a查詢隊伍訊息與更改聊天模式"
- make gui slot 6 of player with {_managegui.%player%} to run player command "/mpt manage" with permission ""
- set {_managedg} to "{SkullOwner:{Id:""f5bfec39-9ee8-4156-8075-a6842d556d90"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2I0ODczOGM4ODJjMmY2ODVkNGJmNGNhNGQ1YmE5ODYyZTYyMTIyNmMwNzc5YzUwNTU2M2ZmN2I5MWJkNSJ9fX0=""}]}}}"
- set {_managedg.%player%} to player head with custom nbt "%{_managedg}%" named "&6查詢副本資訊" with lore "&b可在此查詢副本||&a排隊狀況/需求物品/限制人數/限制等級"
- make gui slot 4 of player with {_managedg.%player%} to run player command "/mydg list" with permission ""
- if arg-1 is "manage":
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml"
- if {_mypartycreate.%name of player%} isn't set:
- send "{@tag} &c你尚未加入隊伍"
- else:
- if {_mypartycreate.%name of player%} is name of player:
- open chest with 3 row named "&d隊友管理" to player
- set {_mypartycreatenumber.%name of player%} to 0
- set {_mypartycreatenumber1.%name of player%} to -1
- set {_myparty.%{_mypartycreate.%name of player%}%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- loop {_myparty.%{_mypartycreate.%name of player%}%.list::*}:
- if loop-value is set:
- increase {_mypartycreatenumber.%name of player%} by 1
- increase {_mypartycreatenumber1.%name of player%} by 1
- set {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} to loop-value parsed as player
- set {_check} to {玩家資料.%loop-value%::最大血量}
- add ({玩家資料.%loop-value%::力量} * 5) to {_check}
- add ({玩家資料.%loop-value%::智慧} * 3) to {_check}
- add ({玩家資料.%loop-value%::敏捷} * 4) to {_check}
- add ({玩家資料.%loop-value%::幸運} * 3) to {_check}
- set {_mypartycreatehealth.%name of player%.%{_mypartycreatenumber.%name of player%}%} to health of {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} / max health of {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} * {_check}
- set {_mypartycreateskull.%name of player%.%{_mypartycreatenumber.%name of player%}%} to "%loop-value%" parsed as offlineplayer
- set {_玩家資料.%loop-value%::玩家等級} to single value "玩家等級" get of "plugins/players/%loop-value%.yml"
- set {_mypartycreategui.%name of player%.%{_mypartycreatenumber.%name of player%}%} to skull of {_mypartycreateskull.%name of player%.%{_mypartycreatenumber.%name of player%}%} named "&e%loop-value%" with lore "&e等級: %{_玩家資料.%loop-value%::玩家等級}%||&e血量: %{_mypartycreatehealth.%name of player%.%{_mypartycreatenumber.%name of player%}%}% / %{_check}%||&c點擊剔除隊伍"
- make gui slot {_mypartycreatenumber1.%name of player%} of player with {_mypartycreategui.%name of player%.%{_mypartycreatenumber.%name of player%}%} to run player command "/mpt kick %loop-value%" with permission ""
- {@expdistribution} is true:
- set {_mypartycreateexpbutton.%name of player%} to skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%player%.yml"
- set {_expshare} to exp bottle named "&e開/關經驗分享" with lore "%{_mypartycreateexpbutton.%name of player%}%||&b點選開/關"
- make gui slot 18 of player with {_expshare} to run player command "/mpt expopen" with permission ""
- {@itemdistribution} is true:
- set {_mypartycreateitem.%name of player%} to skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%player%.yml"
- set {_itemshare} to item frame named "&e開/關物品分享" with lore "%{_mypartycreateitem.%name of player%}%||&b點選開/關"
- make gui slot 19 of player with {_itemshare} to run player command "/mpt itemopen" with permission ""
- {@chat} is true:
- set {_mypartychat.%name of player%} to skutil yaml value "聊天介面" from file "plugins/MithicParty/%name of player%.yml"
- set {_chat} to painting named "&e轉換聊天介面" with lore "&a模式: %{_mypartychat.%name of player%}%||&b點選轉換"
- make gui slot 20 of player with {_chat} to run player command "/mpt teamchat" with permission ""
- else:
- open chest with 2 row named "&d隊友查詢" to player
- set {_mypartycreatenumber.%name of player%} to 0
- set {_mypartycreatenumber1.%name of player%} to -1
- set {_myparty.%{_mypartycreate.%name of player%}%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
- loop {_myparty.%{_mypartycreate.%name of player%}%.list::*}:
- if loop-value is set:
- increase {_mypartycreatenumber.%name of player%} by 1
- increase {_mypartycreatenumber1.%name of player%} by 1
- set {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} to loop-value parsed as player
- set {_check} to {玩家資料.%loop-value%::最大血量}
- add ({玩家資料.%loop-value%::力量} * 5) to {_check}
- add ({玩家資料.%loop-value%::智慧} * 3) to {_check}
- add ({玩家資料.%loop-value%::敏捷} * 4) to {_check}
- add ({玩家資料.%loop-value%::幸運} * 3) to {_check}
- set {_mypartycreatehealth.%name of player%.%{_mypartycreatenumber.%name of player%}%} to health of {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} / max health of {_myparty.%name of player%.name.%{_mypartycreatenumber.%name of player%}%} * {_check}
- set {_mypartycreateskull.%name of player%.%{_mypartycreatenumber.%name of player%}%} to "%loop-value%" parsed as offlineplayer
- set {_玩家資料.%loop-value%::玩家等級} to single value "玩家等級" get of "plugins/players/%loop-value%.yml"
- set {_mypartycreategui.%name of player%.%{_mypartycreatenumber.%name of player%}%} to skull of {_mypartycreateskull.%name of player%.%{_mypartycreatenumber.%name of player%}%} named "&e%loop-value%" with lore "&e等級: %{_玩家資料.%loop-value%::玩家等級}%||&e血量: %{_mypartycreatehealth.%name of player%.%{_mypartycreatenumber.%name of player%}%}% / %{_check}%"
- make gui slot {_mypartycreatenumber1.%name of player%} of player with {_mypartycreategui.%name of player%.%{_mypartycreatenumber.%name of player%}%}
- {@expdistribution} is true:
- set {_mypartycreateexpbutton.%name of player%} to skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%name of player%}%.yml"
- format slot 9 of player with exp bottle named "&e開/關經驗分享" with lore "%{_mypartycreateexpbutton.%name of player%}%||&b點選開/關" to close
- {@itemdistribution} is true:
- set {_mypartycreateitem.%name of player%} to skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%name of player%}%.yml"
- format slot 10 of player with item frame named "&e開/關物品分享" with lore "%{_mypartycreateitem.%name of player%}%||&b點選開/關" to close
- {@chat} is true:
- set {_mypartychat.%name of player%} to skutil yaml value "聊天介面" from file "plugins/MithicParty/%name of player%.yml"
- format slot 11 of player with painting named "&e轉換聊天介面" with lore "&a模式: %{_mypartychat.%name of player%}%||&b點選轉換" to close then run [run player command "/mpt teamchat" as op]
- else:
- send "{@tag} &c你尚未創建或加入隊伍"
- if arg-1 is "expopen":
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml"
- if {_mypartycreate.%name of player%} is name of player:
- set {_mypartycreateexpbutton.%name of player%} to skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%name of player%}%.yml"
- if {_mypartycreateexpbutton.%name of player%} is "&a經驗分享開啟中":
- set {_mypartycreateexpbutton.%name of player%} to "&c經驗分享關閉中"
- send "{@tag} &c經驗分享關閉中" to player
- set skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateexpbutton.%name of player%}%"
- else:
- set {_mypartycreateexpbutton.%name of player%} to "&a經驗分享開啟中"
- send "{@tag} &a經驗分享開啟中" to player
- set skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateexpbutton.%name of player%}%"
- else:
- send "{@tag} &c你不是隊長" to player
- else:
- send "{@tag} &c你尚未創建隊伍"
- if arg-1 is "itemopen":
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartycreate.%name of player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%player%.yml"
- if {_mypartycreate.%name of player%} is name of player:
- set {_mypartycreateitem.%name of player%} to skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%name of player%}%.yml"
- if {_mypartycreateitem.%name of player%} is "&c物品分享關閉中":
- set {_mypartycreateitem.%name of player%} to "&a物品分享開啟中"
- send "{@tag} &a物品分享開啟中" to player
- set skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateitem.%name of player%}%"
- else:
- set {_mypartycreateitem.%name of player%} to "&c物品分享關閉中"
- send "{@tag} &c物品分享關閉中" to player
- set skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%player%.yml" to "%{_mypartycreateitem.%name of player%}%"
- else:
- send "{@tag} &c你不是隊長" to player
- else:
- send "{@tag} &c你尚未創建隊伍"
- if arg-1 is "teamchat":
- {@chat} is true:
- if file existance of "plugins/MithicParty/%name of player%.yml" is true:
- set {_mypartychat.%name of player%} to skutil yaml value "聊天介面" from file "plugins/MithicParty/%player%.yml"
- if {_mypartychat.%name of player%} is "&e一般":
- set {_mypartychat.%name of player%} to "&e隊伍"
- send "{@tag} &c轉換到隊伍聊天" to player
- set skutil yaml value "聊天介面" from file "plugins/MithicParty/%player%.yml" to "%{_mypartychat.%name of player%}%"
- else:
- set {_mypartychat.%name of player%} to "&e一般"
- send "{@tag} &c轉換到一般聊天" to player
- set skutil yaml value "聊天介面" from file "plugins/MithicParty/%player%.yml" to "%{_mypartychat.%name of player%}%"
- else:
- send "{@tag} &c你尚未創建/加入隊伍" to player
- #------------------------------------------------------------------------------------------------------------
- command /mptbug [<text>] [<text>] [<text>] [<text>]:
- usage: /mybug [<text>] [<text>]
- permission: mydg.op
- permission message: &c你沒有權限
- executable by: players and console
- trigger:
- if arg-1 is "true":
- if arg-2 is set:
- set {_clearmpt} to arg-2 parsed as player
- delete file "plugins/MithicParty/%arg-2%.yml"
- send "已刪除%arg-2%資料"
- else:
- send "錯誤"
- #------------------------------------------------------------------------------------------------------------
- on death:
- {@expdistribution} is true:
- if attacker is a player:
- if file existance of "plugins/MithicParty/%attacker%.yml" is true:
- set {_mypartycreate.%attacker%} to skutil yaml value "隊長" from file "plugins/MithicParty/%attacker%.yml"
- set {_mypartycreateexpbutton.%name of player%} to skutil yaml value "經驗分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%attacker%}%.yml"
- if {_mypartycreateexpbutton.%name of player%} is "&a經驗分享開啟中":
- loop players in radius {@radius} around the attacker:
- if file existance of "plugins/MithicParty/%loop-player%.yml" is true:
- set {_mypartycreate.%loop-value%} to skutil yaml value "隊長" from file "plugins/MithicParty/%loop-value%.yml"
- if {_mypartycreate.%loop-value%} = {_mypartycreate.%attacker%}:
- add loop-player to {_mypartyexpgive1.%attacker%::*}
- set {_mypartyexpcheck.%attacker%} to 1
- if {_mypartyexpcheck.%attacker%} is set:
- set {_uncolorname} to uncolored name of victim
- if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
- set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- loop {_數據處理::*}:
- if "%loop-value%" contains "%{_uncolorname}%":
- set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
- set {_mypartyexp.%attacker%} to {_getit.%loop-value%::2} parsed as integer
- stop loop
- set {_mypartyexpnumber.%attacker%} to 0
- set {_玩家資料.%attacker%::玩家等級} to {_玩家資料.%attacker%::玩家等級} parsed as number
- loop {_mypartyexpgive1.%attacker%::*}:
- increase {_mypartyexpnumber.%attacker%} by 1
- set {玩家資料.%loop-value%::玩家等級} to {玩家資料.%loop-value%::玩家等級} parsed as number
- set {玩家資料.%attacker%::玩家等級} to {玩家資料.%attacker%::玩家等級} parsed as number
- if {玩家資料.%loop-value%::玩家等級} < {玩家資料.%attacker%::玩家等級}:
- if {玩家資料.%loop-value%::玩家等級} + {@difference} < {玩家資料.%attacker%::玩家等級}:
- reduce {_mypartyexpnumber.%attacker%} by 1
- remove loop-value from {_mypartyexpgive1.%attacker%::*}
- set {_sharefail} to "%loop-value%" parsed as player
- send "{@tag} &c等級與 &f%attacker% &c差距{@difference}級以上,無法獲得經驗" to {_sharefail}
- else:
- if {玩家資料.%loop-value%::玩家等級} - {@difference} > {玩家資料.%attacker%::玩家等級}:
- reduce {_mypartyexpnumber.%attacker%} by 1
- remove loop-value from {_mypartyexpgive1.%attacker%::*}
- set {_sharefail} to "%loop-value%" parsed as player
- send "{@tag}&c等級與 &f%attacker% &c差距{@difference}級以上,無法獲得經驗" to {_sharefail}
- if {_mypartyexpnumber.%attacker%} > 1:
- remove round({_mypartyexp.%attacker%}) from {玩家資料.%attacker%::目前經驗值}
- set {_mypartyexp.%attacker%} to {_mypartyexp.%attacker%} * {@partyexp}
- set {_mypartyexp.%attacker%} to {_mypartyexp.%attacker%} / {_mypartyexpnumber.%attacker%}
- loop {_mypartyexpgive1.%attacker%::*}:
- set {_mypartyexpgive.%name of player%} to loop-value
- set {_mypartyexp.%attacker%} to {_mypartyexp.%attacker%} parsed as number
- add round({_mypartyexp.%attacker%}) to {玩家資料.%loop-value%::目前經驗值}
- if {_mypartyexpgive.%name of player%} isn't attacker:
- send "{@tag}&e從&f%attacker%&e接收&f%round({_mypartyexp.%attacker%})%點&e經驗值" to {_mypartyexpgive.%name of player%}
- else:
- send "{@tag}&e接收&f%round({_mypartyexp.%attacker%})%點&e經驗值" to {_mypartyexpgive.%name of player%}
- #------------------------------------------------------------------------------------------------------------
- on pick up:
- {@itemdistribution} is true:
- if file existance of "plugins/MithicParty/%event-player%.yml" is true:
- set {_mypartycreate.%event-player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%event-player%.yml"
- set {_mypartycreateitem.%event-player%} to skutil yaml value "物品分享狀態" from file "plugins/MithicParty/%{_mypartycreate.%event-player%}%.yml"
- if {_mypartycreateitem.%event-player%} is "&a物品分享開啟中":
- cancel event
- loop players in radius {@radius} around the player:
- if file existance of "plugins/MithicParty/%loop-player%.yml" is true:
- set {_mypartycreate.%loop-value%} to skutil yaml value "隊長" from file "plugins/MithicParty/%loop-value%.yml"
- if {_mypartycreate.%loop-value%} = {_mypartycreate.%event-player%}:
- add loop-player to {_mypartyitemgive1.%event-player%::*}
- set {_mypartyitemcheck.%event-player%} to 1
- if {_mypartyitemcheck.%event-player%} is set:
- set {_mypartyitemnumber.%event-player%} to 0
- loop {_mypartyitemgive1.%event-player%::*}:
- increase {_mypartyitemnumber.%event-player%} by 1
- clear event-entity
- set {_mypartyitem.%event-player%} to event-item
- set {_mypartyitem1.%event-player%} to name of event-item
- set {_mypartyrandomwin.%event-player%} to a random element of {_mypartyitemgive1.%event-player%::*}
- if {_mypartyrandomwin.%event-player%} has enough space for {_mypartyitem.%event-player%}:
- give {_mypartyitem.%event-player%} to {_mypartyrandomwin.%event-player%}
- else:
- wait 1 tick
- drop {_mypartyitem.%event-player%} in front of {_mypartyrandomwin.%event-player%}
- set {_mypartyrandomwinslot.%event-player%} to 1
- if {_mypartyrandomwinslot.%event-player%} is set:
- loop {_mypartyitemgive1.%event-player%::*}:
- set {_mypartyitemgive1.%event-player%.name} to loop-value
- send "{@tag} &f%{_mypartyrandomwin.%event-player%}%&e身上沒有足夠空間,物品重新丟出" to {_mypartyitemgive1.%event-player%.name}
- if {_mypartyitemnumber.%event-player%} > 1:
- if {_mypartyitem1.%event-player%} is set:
- loop {_mypartyitemgive1.%event-player%::*}:
- set {_mypartyitemgive1.%event-player%.name} to loop-value
- send "{@tag} &f%{_mypartyrandomwin.%event-player%}%&e從&f%event-player%&e接收%{_mypartyitem1.%event-player%}%" to {_mypartyitemgive1.%event-player%.name}
- else:
- loop {_mypartyitemgive1.%event-player%::*}:
- set {_mypartyitemgive1.%event-player%.name} to loop-value
- send "{@tag} &f%{_mypartyrandomwin.%event-player%}%&e從&f%event-player%&e接收&f%{_mypartyitem.%event-player%}%" to {_mypartyitemgive1.%event-player%.name}
- #------------------------------------------------------------------------------------------------------------
- on chat:
- {@chat} is true:
- if file existance of "plugins/MithicParty/%event-player%.yml" is true:
- set {_mypartychat.%event-player%} to skutil yaml value "聊天介面" from file "plugins/MithicParty/%event-player%.yml"
- if {_mypartychat.%event-player%} is "&e隊伍":
- loop all players:
- remove loop-player from chat recipients
- set {_myparty.%event-player%.chat} to message
- set message to "[隊伍聊天]%message%"
- set {_myparty.%event-player%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%event-player%.yml"
- loop {_myparty.%event-player%.list1::*}:
- set {_myparty.%event-player%.chatyes.%name of player%} to loop-value parsed as player
- send "&6隊伍聊天 >> &a%event-player%: &f%{_myparty.%event-player%.chat}%" to {_myparty.%event-player%.chatyes.%name of player%}
- send "&d[隊伍聊天] > &c%event-player% &7:&7『&d%{_myparty.%event-player%.chat}%&7』" to {omaegawazatorashikushinai::*}
- log "%player%: %{_myparty.%event-player%.chat}%" to "m/jd.log"
- if {_mypartychat.%event-player%} is "&e一般":
- set {_mess.1} to message
- set {_first.1} to "@"
- set {_rest.1} to subtext of {_mess.1} from characters 2 to length of {_mess.1}
- set {_done.1} to "%{_first.1}%%{_rest.1}%"
- replace every "<none>" with "" in {_done.1}
- if message is "%{_done.1}%":
- set {_done.1} to subtext of {_done.1} from characters 2 to length of {_done.1}
- set {_done.1} to uncolored {_done.1}
- set {_done.1} to "<gray><bold>%{_done.1}%"
- loop all players:
- remove loop-player from chat recipients
- set {_myparty.%event-player%.chat} to {_done.1}
- set message to "[隊伍聊天]%message%"
- set {_myparty.%event-player%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%event-player%.yml"
- loop {_myparty.%event-player%.list1::*}:
- set {_myparty.%event-player%.chatyes.%name of player%} to loop-value parsed as player
- send "&6隊伍聊天 >> &a%event-player%: &f%{_myparty.%event-player%.chat}%" to {_myparty.%event-player%.chatyes.%name of player%}
- send "&d[隊伍聊天] > &c%event-player% &7:&7『&d%{_myparty.%event-player%.chat}%&7』" to {omaegawazatorashikushinai::*}
- log "%player%: %{_myparty.%event-player%.chat}%" to "m/jd.log"
- #-----------------------------------------------------------------------------------------------------------
- on quit:
- if file existance of "plugins/MithicParty/%event-player%.yml" is true:
- make player execute command "/mpt leave"
- #------------------------------------------------------------------------------------------------------------
- on join:
- if file existance of "plugins/MithicParty/%event-player%.yml" is true:
- make player execute command "/mpt leave"
- #------------------------------------------------------------------------------------------------------------
- every 1 seconds:
- {@scoreboard} is true:
- loop all players:
- if file existance of "plugins/MithicParty/%loop-player%.yml" is true:
- delete stylish scoreboard "party-%loop-player%"
- set {_mypartycreate.%loop-player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%loop-player%.yml"
- if {_mypartycreate.%loop-player%} is set:
- if stylish scoreboard "party%loop-player%" does not exist:
- create new stylish scoreboard named "party-%loop-player%"
- set title of stylish scoreboard "party-%loop-player%" to "&a&l隊伍面板"
- set {_myparty.%loop-player%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%loop-player%.yml"
- loop {_myparty.%loop-player%.list1::*}:
- set {_myparty.%loop-value-2%.name} to loop-value-2 parsed as player
- set {_class} to {玩家資料.%loop-value-2%::玩家職業}
- set {_check} to {玩家資料.%loop-value-2%::最大血量}
- add ({玩家資料.%loop-value-2%::力量} * 5) to {_check}
- add ({玩家資料.%loop-value-2%::智慧} * 3) to {_check}
- add ({玩家資料.%loop-value-2%::敏捷} * 4) to {_check}
- add ({玩家資料.%loop-value-2%::幸運} * 3) to {_check}
- set {_realhealth.%{_myparty.%loop-value-2%.name}%} to {_myparty.%loop-value-2%.name}'s health / {_myparty.%loop-value-2%.name}'s max health * {_check}
- if {玩家資料.%loop-value-2%::死亡座標} is set:
- set {_realhealth.%{_myparty.%loop-value-2%.name}%} to 0
- create a new id based score "%loop-value-2%health" with text "&b" slot {_realhealth.%{_myparty.%loop-value-2%.name}%} for stylish scoreboard "party-%loop-player%"
- if {_myparty.%loop-value-2%.name}'s health / {_myparty.%loop-value-2%.name}'s max health > 0.5:
- set the text of id "%loop-value-2%health" to "&b[%{_class}%]&f%loop-value-2%"
- else:
- set the text of id "%loop-value-2%health" to "&b[%{_class}%]&e%loop-value-2%"
- if {_myparty.%loop-value-2%.name}'s health / {_myparty.%loop-value-2%.name}'s max health < 0.3:
- set the text of id "%loop-value-2%health" to "&b[%{_class}%]&c%loop-value-2%"
- if {玩家資料.%loop-value-2%::死亡座標} is set:
- set the text of id "%loop-value-2%health" to "&e[幫復]&f%loop-value-2%"
- set stylish scoreboard of loop-player to "party-%loop-player%"
- else:
- delete stylish scoreboard "party-%loop-player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement