set damage to %integer% が使えない

set damage to 0などとすると use attacker or victim in ~~~ とエラーします...
21 Replies
Melonium
MeloniumOP2y ago
No description
Melonium
MeloniumOP2y ago
Addons:
No description
chinatukano
chinatukano2y ago
該当部分のコードがないとなんでそうなるのかわからない
Melonium
MeloniumOP2y ago
on damage:
if damage cause is fall:
cancel event
stop
if {join::*} do not contain victim:
if {join::*} do not contain attacker:
if attacker is not a player:
stop
cancel event
stop
if victim is a skeleton:
if name of attacker's tool contains "スケ狩り剣":
set the damage to 5000
set {_tttt} to "%uncolored name of attacker's held item%"
set {_leng} to (length of {_tttt}) - 7
set {_tttt} to last {_leng} character of {_tttt}
set {_saas::*} to {_tttt} split at "/"
set {_datas} to {_saas::1} parsed as integer
remove 1 from {_datas}
if {_datas} is 0:
remove 1 of attacker's held item from attacker
set name of attacker's tool to "&9スケ狩り剣 &7(%{_datas}%/30)"
stop
set the damage to 3
set victim's invulnerability ticks to 5
if damage cause is a projectile:
if metadata value "stun" of event-projectile is true:
apply blindness 5 without particles to victim for 5 second
apply slowness 40 without particles to victim for 5 second
Stun(victim)
if attacker's held item is {item::axe}:
set {_us} to hotbar slot of attacker
play sound "item.totem.use" with volume 2 at location of victim for all players in radius 5 around victim
set the damage to 3000
if {limitaxe} is true:
if {night} is not set:
wait 1 tick
set {_sl} to 0
loop 45 time:
if {_sl} is {_us}:
continue loop
if slot {_sl} of attacker is {item::axe}:
set slot {_sl} of attacker to {item::noaxe}
add 1 to {_sl}
if damage cause is a projectile:
if event-projectile is an arrow:
set the damage to 3000
on damage:
if damage cause is fall:
cancel event
stop
if {join::*} do not contain victim:
if {join::*} do not contain attacker:
if attacker is not a player:
stop
cancel event
stop
if victim is a skeleton:
if name of attacker's tool contains "スケ狩り剣":
set the damage to 5000
set {_tttt} to "%uncolored name of attacker's held item%"
set {_leng} to (length of {_tttt}) - 7
set {_tttt} to last {_leng} character of {_tttt}
set {_saas::*} to {_tttt} split at "/"
set {_datas} to {_saas::1} parsed as integer
remove 1 from {_datas}
if {_datas} is 0:
remove 1 of attacker's held item from attacker
set name of attacker's tool to "&9スケ狩り剣 &7(%{_datas}%/30)"
stop
set the damage to 3
set victim's invulnerability ticks to 5
if damage cause is a projectile:
if metadata value "stun" of event-projectile is true:
apply blindness 5 without particles to victim for 5 second
apply slowness 40 without particles to victim for 5 second
Stun(victim)
if attacker's held item is {item::axe}:
set {_us} to hotbar slot of attacker
play sound "item.totem.use" with volume 2 at location of victim for all players in radius 5 around victim
set the damage to 3000
if {limitaxe} is true:
if {night} is not set:
wait 1 tick
set {_sl} to 0
loop 45 time:
if {_sl} is {_us}:
continue loop
if slot {_sl} of attacker is {item::axe}:
set slot {_sl} of attacker to {item::noaxe}
add 1 to {_sl}
if damage cause is a projectile:
if event-projectile is an arrow:
set the damage to 3000
set damage to だけ全てエラー出ます
月猫ch
月猫ch2y ago
cancel the event があるから…とか? stopで止めてるのはわかるんやけど elseでちゃんと条件分岐して 明確に避けてあげればワンちゃんとかない?
chinatukano
chinatukano2y ago
on damage: set damage to 0 とかでやってエラー出ないならcancel event原因っぽいけど
Melonium
MeloniumOP2y ago
エラーなしでした... kore
chinatukano
chinatukano2y ago
damage取得してset healthとかすれば いけそう
Yeahn
Yeahn2y ago
それ死んだときの挙動おかしくなるからやめたほうがいい なんか半分死んでるみたいな 状況になる
chinatukano
chinatukano2y ago
これvictimスケルトンの時しかやってないから大丈夫じゃない? 下の方プレイヤーかな
Yeahn
Yeahn2y ago
held item is {item::axe} の部分から人じゃないの?
Melonium
MeloniumOP2y ago
if {join;;*} ... からplayer です
月猫ch
月猫ch2y ago
まじでon deathでhealthいじると10000%バグるからお勧めしない これ、気が向いたらためせます?
Yeahn
Yeahn2y ago
SKのことだから theありなしで変わったりもしそう
Yeahn
Yeahn2y ago
これスケルトンに斧で殴り掛かったら2個発火しない?w
chinatukano
chinatukano2y ago
条件分岐わけるならelse if使ったほうがきれいだよ
Melonium
MeloniumOP2y ago
iketazoooooooooo みなさんありがとう!
Yeahn
Yeahn2y ago
しいて言うのであれば
Yeahn
Yeahn2y ago
ここまでまだ添削できます
Want results from more Discord servers?
Add your server