Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on rightclick on anvil:
- block under the event-block is obsidian block
- cancel event
- if player's tool is sword:
- if {tool.%player%} is set:
- message "<pink>既に剣がセットされています"
- stop
- set {tool.%player%} to player's tool
- delete player's tool
- else if player's tool is a charcoal or a coal item:
- if {tool.%player%} is not set:
- message "<pink>剣がセットされていません"
- stop
- if lore of {tool.%player%} doesn't contain "-AttackBonus:":
- if lore of {tool.%player%} is "":
- set lore of {tool.%player%} to "-AttackBonus:0%%"
- else:
- set lore of {tool.%player%} to "%lore of {tool.%player%}%||-AttackBonus:0%%"
- if player's tool is a charcoal:
- set {_up} to 3
- else if player's tool is a coal item:
- set {_up} to 5
- remove 1 of player's tool from player
- while true:
- add 1 to {_line}
- set {_lore} to line {_line} of lore of {tool.%player%}
- if {_lore} is not set:
- exit 2 sections
- add {_lore} to {_lore::*}
- delete {_lore}
- loop {_lore::*}:
- add 1 to {_inx}
- if the first index of "-AttackBonus:" in loop-value is not -1:
- set {_number} to (subtext of loop-value from 14 to length of loop-value) parsed as number
- add {_up} to {_number}
- set line {_inx} of lore of {tool.%player%} to "-AttackBonus:%{_number}%"
- message "<red>強化後→-AttackBonus:%{_number}%"
- else if player's tool is air block:
- give {tool.%player%} to player
- delete {tool.%player%}
- else:
- if {tool.%player%} is set:
- message "<pink>既に剣がセットされています"
- stop
- message "<pink>剣以外は強化できません"
- on damage:
- {AttackBonus.%attacker%} is set
- set damage to damage * (100+{AttackBonus.%attacker%})/100
- on tool change:
- delete {AttackBonus.%player%}
- lore of player's tool is set
- while true:
- add 1 to {_line}
- set {_lore} to line {_line} of lore of player's tool
- if {_lore} is not set:
- exit 2 sections
- add {_lore} to {_lore::*}
- delete {_lore}
- loop {_lore::*}:
- add 1 to {_inx}
- if the first index of "-AttackBonus:" in loop-value is not -1:
- set {_number} to (subtext of loop-value from 14 to length of loop-value) parsed as number
- set {AttackBonus.%player%} to {_number}
- if {AttackBonus.%player%} is set:
- message "<lime>攻撃力ボーナス:%{AttackBonus.%player%}%%%"
Add Comment
Please, Sign In to add comment