Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #on damage:
- # if victim's name contains "Lv":
- # if victim isn't a player:
- # set {_uncolorname} to uncolored name of victim
- # if {怪物防禦::%{_uncolorname}%} is set:
- # if {怪物防禦::%{_uncolorname}%} is smaller than or equal to damage*2:
- # set damage to damage - {怪物防禦::%{_uncolorname}%} * 0.5
- # stop
- # else:
- # set damage to 0.5
- # stop
- #on damage:
- # if attacker is a player:
- # if victim isn't a player:
- # if victim's name contains "Lv":
- # set {_UUID} to UUID of victim
- # set "怪物生命" to "%victim's max health%" in yaml file "Monsters/%{_UUID}%.yml"#儲存怪物最大生命
- # set {_NewDamage} to damage
- # set {_NewDamage} to {_NewDamage} parsed as integer
- # set {_DamageList} to single value "%attacker%" get of "Monsters/%{_UUID}%.yml"#獲取傷害表
- # set {_DamageList} to {_DamageList} parsed as integer
- # set {_DamageList} to "%{_DamageList} + {_NewDamage}%" parsed as integer
- # set "%attacker%" to "%{_DamageList}%" in yaml file "Monsters/%{_UUID}%.yml"#儲存傷害表
- command /serverexpset [<number>]:
- trigger:
- player is an op
- if arg-1 is not set:
- send "&e[系統] &7現在伺服器經驗倍率為: &a&l%{伺服器經驗倍率}%"
- stop
- set {伺服器經驗倍率} to arg-1
- command /servermoneyset [<number>]:
- trigger:
- player is an op
- if arg-1 is not set:
- send "&e[系統] &7現在伺服器金幣倍率為: &a&l%{伺服器金幣倍率}%"
- stop
- set {伺服器金幣倍率} to arg-1
- on death:
- if attacker is a player:
- set {_name} to name of victim
- set {_uncolorname} to uncolored name of victim
- set {_l} to uncolored name of victim
- set {_l} to regex replace "[^0-9]" with "" in "%{_l}%"
- set {_l} to "%{_l}%" parsed as integer
- set {_差距} to difference between {玩家資料.%attacker%::玩家等級} and {_l}
- if {_差距} < 0:
- set {_差距} to {_差距}*-1
- if {_差距} > 40:
- send "&6擊殺 >> &e您打敗了%{_name}%&e,但由於等差大於40故此無法獲得任何經驗與金錢" to attacker
- stop
- if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
- set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- set {_msg} to 0
- loop {_數據處理::*}:
- if "%loop-value%" contains "%{_uncolorname}%":
- set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
- set {_integer} to {_getit.%loop-value%::2} parsed as integer
- set {_VIP加成} to 0
- set {_加倍卷} to 0
- if {玩家資料.%attacker%::高級會員} is set:
- set {_VIP加成} to 0.15
- if {經驗加倍倍率::%attacker%} is set:
- set {_加倍卷} to {經驗加倍倍率::%attacker%}-1
- set {_integerEXP} to ({_integer} * {伺服器經驗倍率}) + ({_integer} * {_VIP加成}) + ({_integer} * {_加倍卷}) + ({_integer} * {BUFF.祈禱倍率::%attacker%}/100) + ({_integer} * {公會經驗加成.%attacker%}*3/100)
- set {_integerEXP} to round({_integerEXP})
- if {玩家資料.%attacker%::目前經驗值} is set:
- add {_integerEXP} to {玩家資料.%attacker%::目前經驗值}
- set {_msg} to "&a%{_integerEXP}% &eEXP"
- exit loop
- if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
- set {_數據處理2::*} to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
- set {_msg1} to 0
- loop {_數據處理2::*}:
- if "%loop-value%" contains "%{_uncolorname}%":
- set {_getit.%loop-value%.2::*} to split "%loop-value%" at ":"
- set {_integer2} to {_getit.%loop-value%.2::2} parsed as integer
- set {_VIP加成} to 0
- set {_加倍卷} to 0
- if {玩家資料.%attacker%::高級會員} is set:
- set {_VIP加成} to 0.2
- set {_integerMONEY} to ({_integer2} * {伺服器金幣倍率}) + ({_integer2} * {_VIP加成}) + ({_integer2} * {公會金幣加成.%attacker%}*2/100)
- set {_integerMONEY} to round({_integerMONEY})
- if {玩家資料.%attacker%::金錢} is set:
- add {_integerMONEY} to {玩家資料.%attacker%::金錢}
- set {_msg1} to "&6%{_integerMONEY}% &e塊錢"
- exit loop
- set {_x} to a random integer between -30 and 30
- set {_z} to a random integer between -30 and 30
- set {_x} to {_x} / 10
- set {_z} to {_z} / 10
- if {擊殺訊息::%attacker%} isn't set:
- if "%{_msg1}%" isn't "0":
- if "%{_msg}%" isn't "0":
- send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了 %{_msg}% &e和 %{_msg1}%" to attacker
- else:
- send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了%{_msg1}%" to attacker
- else if "%{_msg}%" isn't "0":
- send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了%{_msg}%" to attacker
- command /killmsg:
- trigger:
- if {擊殺訊息::%player%} is set:
- send "&6擊殺 >> &e您已將擊殺訊息開啟"
- delete {擊殺訊息::%player%}
- stop
- else:
- send "&6擊殺 >> &e您已將擊殺訊息關閉,重登或再打一次指令將恢復擊殺訊息"
- set {擊殺訊息::%player%} to 1
- stop
- on join:
- delete {擊殺訊息::%player%}
- on quit:
- delete {擊殺訊息::%player%}
- #on death:
- # if attacker is a player:
- # if victim isn't a player:
- # if victim's name contains "Lv":
- # set {_name} to name of victim#下面全部範圍內 name of victim取代成 {_name}
- # set {_UUID} to UUID of victim#下面全部範圍內 name of victim取代成 {_name}
- # set {_uncolorname} to uncolored name of victim
- # loop 1000 times:
- # if {_uncolorname} contains "%1001 - loop-number%":
- # set {_lvl} to 1001 - loop-number
- # exit loop
- # loop all players:
- # set {_gettotal.%loop-player%} to single value "%loop-player%" get of "Monsters/%{_UUID}%.yml"
- # set {_gettotal.%loop-player%} to {_gettotal.%loop-player%} parsed as integer
- # set {_gettotal2.%loop-player%} to single value "怪物生命" get of "Monsters/%{_UUID}%.yml"
- # set {_gettotal2.%loop-player%} to {_gettotal2.%loop-player%} parsed as integer
- # set {_how} to {_gettotal.%loop-player%} / {_gettotal2.%loop-player%}
- # if {_name} don't contain "boss":
- # if {_gettotal.%loop-player%} is more than or equal to 0.1:
- # set {_how} to 1
- # if {組隊系統::%loop-player%} isn't set:
- # if {_how} is more than or equal to 1:
- # set {_how} to 1
- # if {_how} isn't smaller than or equal to 0:
- # set {_a} to loop-player
- # set {_double} to 1 + {玩家資料.%{_a}%::經驗卷倍率}
- # if {玩家資料.%{_a}%::VIP} is set:
- # set {_double} to {_double} + 0.3
- # add round({經驗怪物::%{_uncolorname}%} * {_double} * {_how}) to {玩家資料.%{_a}%::目前經驗值}
- # set {_did} to {玩家資料.%{_a}%::等級} + 12
- # send "&a【系統】 &a&l獲得經驗值 %round({經驗怪物::%{_uncolorname}%} * {_double} * {_how})%。" to {_a}
- # else if {組隊系統::%loop-player%} is set:
- # set {_a} to loop-player
- # set {_double} to 1 + {玩家資料.%{_a}%::經驗卷}
- # if {玩家資料.%{_a}%::VIP} is set:
- # set {_double} to {_double} + 0.3
- # add round({經驗怪物::%{_uncolorname}%} * {_double} * {_how}) to {玩家資料.%{_a}%::目前經驗值}
- # set {_did} to {玩家資料.%{_a}%::等級} + 12
- # send "&a【系統】 &a&l獲得經驗值 %round({經驗怪物::%{_uncolorname}%} * {_double} * {_how})%。" to {_a}
- # set {_ok} to 0
- # loop {組隊系統::%loop-player%::*}:
- # set {_online} to loop-index parsed as offlineplayer
- # if {_online} is online:
- # add 1 to {_ok}
- # set {_ok} to {_ok} / 2
- # loop {組隊系統::%loop-player%::*}:
- # set {_online} to loop-index parsed as offlineplayer
- # if {_online} is online:
- # set {_a} to {_online}
- # set {_did} to {玩家資料.%{_a}%::等級} + 12
- # if {_did} is smaller than or equal to {_lvl}:
- # send "&a【系統】 &a&l獲得經驗值 0。&7&l(等級低過%{_name}%&7&l無法獲得經驗)" to {_a}
- # #send "&a【系統】 &a&l獲得經驗值 0。&7&l(等級低過%{_name}%&7&l無法獲得經驗)" to {_a}
- # else:
- # set {_double} to 0.5 + {玩家資料.%{_a}%::經驗卷倍率}
- # if {玩家資料.%{_a}%::VIP} is set:
- # set {_double} to {_double} + 0.15
- # set {_omga} to round({經驗怪物::%{_uncolorname}%} * {_double} / {_maths})
- # add {_omga} to {玩家資料.%{_a}%::目前經驗值}
- # send "&a【系統】 &a&l獲得經驗值 %{_omga}%。" to {_a}
- # #send "&a【系統】 &a&l獲得經驗值 %round(({經驗怪物::%{_uncolorname}%} * {_double} / {_maths} - round({經驗怪物::%{_uncolorname}%} * {_double} / {_maths} * 0.08)) * {_how})%。" to {_a}
- # if {_gettotal.%loop-player%} is more than or equal to {_gettotal2.%loop-player%}:
- # set {_gettotal.%loop-player%} to {_gettotal.%loop-player%} - {_gettotal2.%loop-player%}
- # else:
- # set {_gettotal.%loop-player%} to 0
- # delete app "Monsters/%{_UUID}%.yml"
- command /expset [<text>] [<number>]:
- trigger:
- if player doesn't have permission "op.oao":
- execute console command "/warn %player% 該玩家使用管理員指令因此警告一隻。"
- stop trigger
- if arg-1 is set:
- 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 "%arg-1%":
- remove loop-value from {_數據處理::*}
- exit loop
- if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
- delete yml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- if arg-2 is set:
- add "%arg-1%:%arg-2%" to {_數據處理::*}
- send "&f已&9設置&f該怪物額外經驗"
- else:
- send "&f已&c移除&f該怪物額外經驗"
- loop {_數據處理::*}:
- add "%loop-value%" to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- else if arg-1 isn't set:
- if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
- set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- loop {_數據處理::*}:
- set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
- set {_name} to {_getit.%loop-value%::1}
- set {_exp} to {_getit.%loop-value%::2}
- send "%{_name}% - %{_exp}%"
- send "&a你要用 /expset 怪物名稱 可獲得經驗值 ——來設定經驗"
- send "只要怪物名字有你起的名字,就會獲得額外設置的經驗。"
- on load:
- loop {經驗怪物::*}:
- add "%loop-index%:%loop-value%" to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
- delete {經驗怪物::*}
- loop {金錢怪物::*}:
- add "%loop-index%:%loop-value%" to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
- delete {金錢怪物::*}
- command /moneyset [<text>] [<number>]:
- trigger:
- if player doesn't have permission "op.oao":
- execute console command "/warn %player% 該玩家使用管理員指令因此警告一隻。"
- stop trigger
- if arg-1 is set:
- 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 "%arg-1%":
- remove loop-value from {_數據處理::*}
- exit loop
- if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
- delete yml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
- if arg-2 is set:
- add "%arg-1%:%arg-2%" to {_數據處理::*}
- send "&f已&9設置&f該怪物額外經驗"
- else:
- send "&f已&c移除&f該怪物額外經驗"
- loop {_數據處理::*}:
- add "%loop-value%" to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
- else if arg-1 isn't set:
- if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
- set {_數據處理::*} to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
- loop {_數據處理::*}:
- set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
- set {_name} to {_getit.%loop-value%::1}
- set {_exp} to {_getit.%loop-value%::2}
- send "%{_name}% - %{_exp}%"
- send "&a你要用 /moneyset 怪物名稱 可獲得金錢 ——來設定金錢"
- send "只要怪物名字有你起的名字,就會獲得額外設置的金錢。"
Advertisement
Add Comment
Please, Sign In to add comment