if {test::%player%} is set:でクールタイムを作った時に、waitを使うとバグる

on rightclick holding enchanted book:
if uncoloured name of player's tool is "test":
if {test::%player%} is set:
difference of {test::%player%} and now < 5 seconds
stop
execute console command "playsound minecraft:block.portal.trigger ambient %player% ~ ~ ~ 1 2 1"
set {_countdown} to 10
apply potion of speed 2 without particles to player for 10 seconds
apply potion of jump boost 10 without particles to player for 10 seconds
loop 7 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 0.5 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
loop 3 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 1 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
execute console command "/playsound minecraft:entity.ender_dragon.growl ambient %player% ~ ~ ~ 1 1 1"
remove speed from the player
remove jump boost from the player
set {test::%player%} to now
on rightclick holding enchanted book:
if uncoloured name of player's tool is "test":
if {test::%player%} is set:
difference of {test::%player%} and now < 5 seconds
stop
execute console command "playsound minecraft:block.portal.trigger ambient %player% ~ ~ ~ 1 2 1"
set {_countdown} to 10
apply potion of speed 2 without particles to player for 10 seconds
apply potion of jump boost 10 without particles to player for 10 seconds
loop 7 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 0.5 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
loop 3 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 1 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
execute console command "/playsound minecraft:entity.ender_dragon.growl ambient %player% ~ ~ ~ 1 1 1"
remove speed from the player
remove jump boost from the player
set {test::%player%} to now
3 Replies
makaronipizaa
makaronipizaaOP13mo ago
waitを使うと時が止まってるみたいになって、waitが終わった後からクールタイムが始まります waitをループさせている10秒間スキル使い放題で、もう一回スキルを使うとまたwaitが発動するので無限に連打できてしまうんですよね
Yeahn
Yeahn13mo ago
on rightclick holding enchanted book:
if uncoloured name of player's tool is "test":
if {test::%player%} is set:
difference of {test::%player%} and now < 10 seconds
stop
set {test::%player%} to now
execute console command "playsound minecraft:block.portal.trigger ambient %player% ~ ~ ~ 1 2 1"
set {_countdown} to 10
apply potion of speed 2 without particles to player for 10 seconds
apply potion of jump boost 10 without particles to player for 10 seconds
loop 7 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 0.5 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
loop 3 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 1 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
execute console command "/playsound minecraft:entity.ender_dragon.growl ambient %player% ~ ~ ~ 1 1 1"
remove speed from the player
remove jump boost from the player
on rightclick holding enchanted book:
if uncoloured name of player's tool is "test":
if {test::%player%} is set:
difference of {test::%player%} and now < 10 seconds
stop
set {test::%player%} to now
execute console command "playsound minecraft:block.portal.trigger ambient %player% ~ ~ ~ 1 2 1"
set {_countdown} to 10
apply potion of speed 2 without particles to player for 10 seconds
apply potion of jump boost 10 without particles to player for 10 seconds
loop 7 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 0.5 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
loop 3 times:
send action bar "&a&l残り時間&c&l%{_countdown}%&a&l秒" to player
execute console command "/playsound entity.experience_orb.pickup master %player% ~ ~ ~ 1 1 1"
wait 1 seconds
set {_countdown} to {_countdown} - 1
execute console command "/playsound minecraft:entity.ender_dragon.growl ambient %player% ~ ~ ~ 1 1 1"
remove speed from the player
remove jump boost from the player
変数の位置を変え、そこから10秒以内すれば如何でしょうか?
makaronipizaa
makaronipizaaOP13mo ago
できました;;;;;;; ほんと助かります!!!! ありがとうございます!!!
Want results from more Discord servers?
Add your server