set damage to %integer% が使えない

set damage to 0などとすると use attacker or victim in ~~~ とエラーします...
21 Replies
Melonium
MeloniumOP17mo ago
No description
Melonium
MeloniumOP17mo ago
Addons:
No description
chinatukano
chinatukano17mo ago
該当部分のコードがないとなんでそうなるのかわからない
Melonium
MeloniumOP17mo 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
月猫ch17mo ago
cancel the event があるから…とか? stopで止めてるのはわかるんやけど elseでちゃんと条件分岐して 明確に避けてあげればワンちゃんとかない?
chinatukano
chinatukano17mo ago
on damage: set damage to 0 とかでやってエラー出ないならcancel event原因っぽいけど
Melonium
MeloniumOP17mo ago
エラーなしでした... kore
chinatukano
chinatukano17mo ago
damage取得してset healthとかすれば いけそう
Yeahn
Yeahn17mo ago
それ死んだときの挙動おかしくなるからやめたほうがいい なんか半分死んでるみたいな 状況になる
chinatukano
chinatukano17mo ago
これvictimスケルトンの時しかやってないから大丈夫じゃない? 下の方プレイヤーかな
Yeahn
Yeahn17mo ago
held item is {item::axe} の部分から人じゃないの?
Melonium
MeloniumOP17mo ago
if {join;;*} ... からplayer です
月猫ch
月猫ch17mo ago
まじでon deathでhealthいじると10000%バグるからお勧めしない これ、気が向いたらためせます?
Yeahn
Yeahn17mo ago
SKのことだから theありなしで変わったりもしそう
Yeahn
Yeahn17mo ago
これスケルトンに斧で殴り掛かったら2個発火しない?w
chinatukano
chinatukano17mo ago
条件分岐わけるならelse if使ったほうがきれいだよ
Melonium
MeloniumOP17mo ago
iketazoooooooooo みなさんありがとう!
Yeahn
Yeahn17mo ago
しいて言うのであれば
Yeahn
Yeahn17mo ago
Yeahn
Yeahn17mo ago
ここまでまだ添削できます
Want results from more Discord servers?
Add your server