Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on damage:
- if attacker is a player:
- if victim is a player:
- if {玩家資料.%victim%::等級} isn't set:
- cancel event
- stop
- set {_check} to 5
- set {_lore::*} to uncolored lore of attacker's tool split at "||"
- loop {_lore::*}:
- if {_lore::%loop-index%} contains "職業限制" or "職業需求":
- set {_nameofattackertool.%attacker%} to {_lore::%loop-index%}
- set {_check} to 0
- exit loop
- loop {職業::*}:
- if "%{_nameofattackertool.%attacker%}%" contains "%loop-value%":
- if {玩家資料.%attacker%::職業} is "%loop-value%":
- set {_check} to 1
- if {_check} is 0:
- send "職業不吻合武器需求" to attacker
- set damage to 0
- cancel event
- stop
- if {玩家資料.%attacker%::爆擊率} is set:
- set {_幾率.%attacker%} to {玩家資料.%attacker%::爆擊率} / 100 + {飾品狀態.%attacker%::爆擊率}
- Chance of {_幾率.%attacker%}:
- set {_omg} to damage * 1.65 + 0.01 * {飾品狀態.%attacker%::爆擊倍率} * damage
- set damage to {_omg}
- play raw sound "mob.irongolem.hit" at attacker with pitch 1 volume 0.5
- # play raw sound "mob.zombie.metal" at attacker with pitch 1 volume 0.5
- # play raw sound "mob.zombie.remedy" at attacker with pitch 1 volume 0.5
- if victim isn't a player:
- if name of victim contains "lv":
- set {_uncolorname} to uncolored name of victim
- if file "Monsters/%{_uncolorname}%.yml" doesn't exists:
- create file "Monsters/%{_uncolorname}%.yml"
- set "血量最大" to "%victim's max health * 2%" in yaml file "Monsters/%{_uncolorname}%.yml"
- if {%name of victim%::*} is set:
- delete {%name of victim%::*}
- delete {%name of victim%}
- set {_seehow} to round(damage * 2)
- if name of attacker's tool contains "«×»":
- set {_lore::*} to uncolored lore of attacker's tool split at "||"
- loop {_lore::*}:
- if {_lore::%loop-index%} contains "攻擊傷害":
- replace all "攻擊傷害" and " " with "" in {_lore::%loop-index%}
- set {_aaaaaa} to {_lore::%loop-index%}
- if {_lore::%loop-index%} contain "+":
- loop 5000 times:
- set {_search} to first loop-number characters of {_aaaaaa}
- if {_search} contains "+":
- replace "+" with "" in {_aaaaaa}
- set {_目前耐久} to first (loop-number - 1) characters of {_aaaaaa}
- set {_最大耐久} to subtext of {_aaaaaa} from characters loop-number to length of {_aaaaaa}
- exit loop
- set {_最大耐久} to {_最大耐久} parsed as integer
- set {_目前耐久} to {_目前耐久} parsed as integer
- set {_lore::%loop-index%} to {_最大耐久} + {_目前耐久}
- set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
- set {_seehow} to {_lore::%loop-index%} + {_seehow}
- exit loop
- if {_seehow} is more than or equal to (victim's max health * 2):
- set {_seehow} to victim's max health * 2
- set {_atk} to "%name of attacker%"
- replace all "_" with "啊" in {_atk}
- set {_omgomgomg} to 0
- if {組隊系統::%{_atk}%} is set:
- set {_attacker} to "%{_atk}%"
- set {_gettotal} to single value "%{_attacker}%" get of "Monsters/%{_uncolorname}%.yml"
- set {_gettotal} to {_gettotal} parsed as integer
- set {_gettotal} to {_seehow} + {_gettotal}
- set "%{_attacker}%" to "%{_gettotal}%" in yaml file "Monsters/%{_uncolorname}%.yml"
- set {_omgomgomg} to 1
- if {_omgomgomg} is 0:
- loop {組隊系統::*}:
- set {_name} to loop-index
- if {_omgomgomg} is 0:
- if {組隊系統.%{_name}%::%{_atk}%} is set:
- set {_attacker} to "%{_name}%"
- set {_gettotal} to single value "%{_attacker}%" get of "Monsters/%{_uncolorname}%.yml"
- set {_gettotal} to {_gettotal} parsed as integer
- set {_gettotal} to {_seehow} + {_gettotal}
- set "%{_attacker}%" to "%{_gettotal}%" in yaml file "Monsters/%{_uncolorname}%.yml"
- set {_omgomgomg} to 1
- if {_omgomgomg} is 0:
- set {_gettotal} to single value "%{_atk}%" get of "Monsters/%{_uncolorname}%.yml"
- set {_gettotal} to {_gettotal} parsed as integer
- add {_seehow} to {_gettotal}
- set "%attacker%" to "%{_gettotal}%" in yaml file "Monsters/%{_uncolorname}%.yml"
- set {_omgomgomg} to 1
- on death:
- if attacker is a player:
- if victim isn't a player:
- if name of victim contains "lv":
- set {_name} to name of victim#下面全部範圍內 name of victim取代成 {_name}
- set {_uncolorname} to uncolored name of victim
- set {_loc} to attacker
- loop 25000 times:
- if {_uncolorname} contains "%25000 - loop-number%":
- set {_lvl} to 25000 - loop-number
- exit loop
- set {_maxhp} to single value "血量最大" get of "Monsters/%{_uncolorname}%.yml"
- set {_maxhp} to {_maxhp} parsed as integer
- wait 1 ticks
- loop {在綫玩家::*}:
- clear {_gettotal.%loop-value%}
- set {_check} to "%loop-value%"
- replace all "啊" with "_" in {_check}
- set {_gettotal.%loop-value%} to single value "%{_check}%" get of "Monsters/%{_uncolorname}%.yml"
- set {_gettotal.%loop-value%} to {_gettotal.%loop-value%} parsed as integer
- set {_how} to {_gettotal.%loop-value%} / {_maxhp}
- if {_name} don't contain "boss":
- if {_how} is more than or equal to 0.1:
- set {_how} to 1
- if {組隊系統::%loop-value%} is set:
- if {_how} is more than or equal to 0.1:
- set {_ok} to 0
- loop {組隊系統.%loop-value%::*}:
- set {_online} to loop-index-2 parsed as offlineplayer
- if {_online} is online:
- add 1 to {_ok}
- set {_ok} to {_ok} / 2
- loop {組隊系統.%loop-value%::*}:
- set {_online} to loop-index-2 parsed as offlineplayer
- if {_online} is online:
- set {_a} to loop-index-2 parsed as player
- 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}%} is set:
- add 0.2 to {_double}
- if {玩家資料.%{_a}%::VIP} is set:
- set {_double} to {_double} + 0.15
- set {_omga} to round({經驗怪物::%{_uncolorname}%} * {_double} / {_ok})
- add {_omga} to {玩家資料.%{_a}%::now}
- 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-value%} is more than or equal to {_maxhp}:
- set {_gettotal.%loop-value%} to {_gettotal.%loop-value%} - {_maxhp}
- else:
- set {_gettotal.%loop-value%} to 0
- set "%loop-value%" to "%{_gettotal.%loop-value%}%" in yaml file "Monsters/%{_uncolorname}%.yml"
- else if {_how} isn't smaller than or equal to 0:
- set {_a} to loop-value
- set {_double} to 1 + {玩家資料.%{_a}%::經驗卷}
- if {玩家資料.%{_a}%::VIP} is set:
- set {_double} to {_double} + 0.3
- add round({經驗怪物::%{_uncolorname}%} * {_double} * {_how}) to {玩家資料.%{_a}%::now}
- set {_did} to {玩家資料.%{_a}%::等級} + 12
- send "&a【系統】 &a&l獲得經驗值 %round({經驗怪物::%{_uncolorname}%} * {_double} * {_how})%。" to {_a}
- if {_gettotal.%loop-value%} is more than or equal to {_maxhp}:
- set {_gettotal.%loop-value%} to {_gettotal.%loop-value%} - {_maxhp}
- else:
- set {_gettotal.%loop-value%} to 0
- set "%loop-value%" to "%{_gettotal.%loop-value%}%" in yaml file "Monsters/%{_uncolorname}%.yml"
- on join:
- set {_pl} to "%player%" parsed as offlineplayer
- wait 10 seconds
- if {_pl} is online:
- add {_pl} to {在綫玩家::*}
- on quit:
- set {_pl} to "%player%" parsed as offlineplayer
- remove {_pl} from {在綫玩家::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement