SHOW:
|
|
- or go back to the newest paste.
| 1 | on right click: | |
| 2 | player is sneaking | |
| 3 | set {_itemName} to name of player's tool
| |
| 4 | {_itemName} does not contain "+"
| |
| 5 | if player's offhand item is iron nugget: | |
| 6 | - | set name of player's tool to "&f%{_itemName}% &a+鉄塊"
|
| 6 | + | set name of player's tool to "&f%name of player's tool% &a+鉄塊" |
| 7 | - | synthesize() |
| 7 | + | synthesize(player) |
| 8 | if player's offhand item is spider eye: | |
| 9 | - | set name of player's tool to "&f%{_itemName}% &a+クモの目"
|
| 9 | + | set name of player's tool to "&f%name of player's tool% &a+クモの目" |
| 10 | - | synthesize() |
| 10 | + | synthesize(player) |
| 11 | ||
| 12 | - | function synthesize(): |
| 12 | + | function synthesize(p: player): |
| 13 | - | remove 1 of player's offhand item from player |
| 13 | + | remove 1 of {_p}'s offhand item from {_p}
|
| 14 | - | play sound "ui.button.click" with volume 1 and pitch 2 at player |
| 14 | + | command "/execute %{_p}% ~ ~ ~ playsound minecraft:ui.button.click master %{_p}% ~ ~ ~ 1 1"
|
| 15 | ||
| 16 | on damage: | |
| 17 | attacker is a player | |
| 18 | - | attacker's tool is not air |
| 18 | + | |
| 19 | - | player does not have player's tool on cooldown: |
| 19 | + | |
| 20 | if {_itemName} contains "+鉄塊":
| |
| 21 | damage victim by 2 hearts | |
| 22 | ||
| 23 | - | if "+鉄塊" is in {_itemName}:
|
| 23 | + | if {_itemName} contains "+クモの目":
|
| 24 | - | set damage of event to (damage of event + 2) |
| 24 | + |