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