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"#儲存傷害表
- 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 "%1000 - loop-number%":
- set {_lvl} to 1000 - loop-number
- exit loop
- loop all players:
- set {_gettotal} to single value "%loop-player%" get of "Monsters/%{_UUID}%.yml"
- set {_gettotal} to {_gettotal} parsed as integer
- set {_gettotal2} to single value "怪物生命" get of "Monsters/%{_UUID}%.yml"
- set {_gettotal2} to {_gettotal2} parsed as integer
- set {_how} to {_gettotal} / {_gettotal2}
- if {_name} don't contain "boss":
- if {_gettotal} 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} is more than or equal to {_gettotal2}:
- set {_gettotal} to {_gettotal} - {_gettotal2}
- else:
- set {_gettotal} to 0
- delete app "Monsters/%{_UUID}%.yml"
- command /armorset [<text>] [<number>]:
- trigger:
- if player doesn't have permission "op.oao":
- stop trigger
- if arg-1 is set:
- if arg-2 is set:
- set {怪物防禦::%arg-1%} to arg-2
- send "&f已&9設置&f該怪物防禦力"
- else if {怪物防禦::%arg-1%} is set:
- delete {經驗怪物::%arg-1%}
- send "&f已&c移除&f該怪物防禦力"
- else if arg-1 isn't set:
- loop {怪物防禦::*}:
- send "%loop-index% - %loop-value%"
- send "&a你要用 /armorset 怪物名稱 防禦力 ——來設定防禦力"
- send "只要怪物名字有你起的名字,就會有防禦力。"
- 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 arg-2 is set:
- set {經驗怪物::%arg-1%} to arg-2
- send "&f已&9設置&f該怪物額外經驗"
- else if {經驗怪物::%arg-1%} is set:
- delete {經驗怪物::%arg-1%}
- send "&f已&c移除&f該怪物額外經驗"
- else if arg-1 isn't set:
- loop {經驗怪物::*}:
- send "%loop-index% - %loop-value%"
- send "&a你要用 /expset 怪物名稱 可獲得經驗值 ——來設定經驗"
- send "只要怪物名字有你起的名字,就會獲得額外設置的經驗。"
Advertisement
Add Comment
Please, Sign In to add comment