이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.19.2 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.6.4 |
아이템도박 스크립트를 다운로드 받았는데 오류가 있습니다.. 어떤 코드가 문제인지 알수있을까요?
options:
칭호 : &r &c&l! &7|&f
command /도박관리 [<text>] [<integer>]:
trigger:
if player is op:
if arg 1 is not set:
message "{@칭호} /도박관리 2배 <확률>"
message "{@칭호} /도박관리 3배 <확률>"
if arg 1 is "2배":
if arg 2 is not set:
message "{@칭호} 확률을 적어주세요."
if arg 2 is set:
set {2배도박.확률} to arg 2
message "{@칭호} 2배 도박 확률이 %arg 2%%% 로 설정되었습니다."
if arg 1 is "3배":
if arg 2 is not set:
message "{@칭호} 확률을 적어주세요."
if arg 2 is set:
set {확률.3배도박} to arg 2
message "{@칭호} 3배 도박 확률이 %arg 2%%% 로 설정되었습니다."
else:
message "{@칭호} 당신은 관리자가 아닙니다.
on inventory click:
if inventory name of current inventory of player is "Made by p_pa":
if click item is yellow wool or red wool or north-south detector rail or glass pane or downward command block:
cancel event
if click item is yellow wool:
if {%player%.start} is set:
close player's inventory
message "{@칭호} 이미 아이템도박을 시작하신 상태입니다."
if {%player%.start} is not set:
if id of slot 13 of current inventory of player is not 276 or 283 or 272 or 268 or 267 or 302 or 303 or 304 or 305 or 306 or 307 or 308 or 309 or 310 or 311 or 312 or 313 or 314 or 315 or 316 or 317:
close player's inventory
message "{@칭호} 검, 갑옷 종류를 넣어주세요!"
stop
if id of slot 13 of current inventory of player is 276 or 283 or 272 or 268 or 267 or 302 or 303 or 304 or 305 or 306 or 307 or 308 or 309 or 310 or 311 or 312 or 313 or 314 or 315 or 316 or 317:
set {아이템.%player%} to slot 13 of current inventory of player
set {name.%player%} to name of slot 13 of current inventory of player
close player's inventory
set {%player%.start} to 1
message "{@칭호} 도박 3초전..."
wait 1 second
message "{@칭호} 도박 2초전..."
wait 1 second
message "{@칭호} 도박 1초전..."
wait 1 second
chance of {확률.3배도박}+0%:
give {아이템.%player%} to player
give {아이템.%player%} to player
give {아이템.%player%} to player
broadcast "{@칭호} &6%player% &f님이 3배 도박에 &6성공&f하셨습니다. [ 아이템 : &6%{name.%player%}% &f]"
delete {아이템.%player%}
delete {%player%.start}
else:
message "{@칭호} 3배 도박에 실패하셨습니다."
delete {아이템.%player%}
delete {%player%.start}
if click item is red wool:
if {%player%.start} is set:
close player's inventory
message "{@칭호} 이미 아이템도박을 시작하신 상태입니다."
if {%player%.start} is not set:
if id of slot 13 of current inventory of player is not 276 or 283 or 272 or 268 or 267 or 302 or 303 or 304 or 305 or 306 or 307 or 308 or 309 or 310 or 311 or 312 or 313 or 314 or 315 or 316 or 317:
close player's inventory
message "{@칭호} 검, 갑옷 종류를 넣어주세요!"
stop
if id of slot 13 of current inventory of player is 276 or 283 or 272 or 268 or 267 or 302 or 303 or 304 or 305 or 306 or 307 or 308 or 309 or 310 or 311 or 312 or 313 or 314 or 315 or 316 or 317:
set {아이템.%player%} to slot 13 of current inventory of player
set {name.%player%} to name of slot 13 of current inventory of player
close player's inventory
set {%player%.start} to 1
message "{@칭호} 도박 3초전..."
wait 1 second
message "{@칭호} 도박 2초전..."
wait 1 second
message "{@칭호} 도박 1초전..."
wait 1 second
chance of {2배도박.확률}+0%:
give {아이템.%player%} to player
give {아이템.%player%} to player
broadcast "{@칭호} &6%player% &f님이 2배 도박에 &6성공&f하셨습니다. [ 아이템 : &6%{name.%player%}% &f]"
delete {아이템.%player%}
delete {%player%.start}
else:
message "{@칭호} 2배 도박에 실패하셨습니다."
delete {아이템.%player%}
delete {%player%.start}
on inventory close:
if inventory name of current inventory of player contains "Made by p_pa":
if slot 13 of current inventory of player is sword or chestplate or leggings or boots or helmet or air:
set {아이템.%player%} to slot 13 of current inventory of player
else:
set {아이템.%player%} to slot 13 of current inventory of player
message "{@칭호} 검 / 방어구 종류가 아닙니다!"
give {아이템.%player%} to player
delete {아이템.%player%}
command /아이템도박:
trigger:
if {%player%.start} is set:
message "{@칭호} 이미 아이템도박을 시작하셨습니다."
if {%player%.start} is not set:
open chest with 3 row named "Made by p_pa" to player
loop 27 times:
add 1 to {_player}
set slot {_player}-1 of current inventory of player to glass pane named "&bGlass"
set slot 4 of current inventory of player to command block named "&aScripts Making : p_pa"
set slot 11 of current inventory of player to red wool named "&f[ &a2배 도박 &f]" with lore "&c[&f!&c] &f클릭시 2배도박을 시작합니다." and "&6[&f!&6] &f확률 : %{2배도박.확률}%%%"
set slot 15 of current inventory of player to yellow wool named "&f[ &a3배 도박 &f]" with lore "&c[&f!&c] &f클릭시 3배도박을 시작합니다." and "&6[&f!&6] &f확률 : %{확률.3배도박}%%%"
set slot 0 of current inventory of player to detector rail named ""
set slot 9 of current inventory of player to detector rail named ""
set slot 18 of current inventory of player to detector rail named ""
set slot 8 of current inventory of player to detector rail named ""
set slot 17 of current inventory of player to detector rail named ""
set slot 26 of current inventory of player to detector rail named ""
set slot 13 of current inventory of player to air
set slot 13 of current inventory of player to {아이템.%player%}
0reo
2022.11.26click이 아니라 clicked아닌가요
qsef1256
2022.11.26구버전 애드온 구문을 갖다 쓴 스크립트로 보입니다.
clicked slot
등으로 마이그레이션 하세요.Junki1108
2022.11.27click item is slot: 을 clicked slot: 으로 바꿨더니 The expression 'clicked block' may only be used in a click event 라고 오류가납니다...
qsef1256
2022.11.27on inventory click 밑에서 쓴 게 맞죠?
Junki1108
2022.11.28네
qsef1256
2022.11.29소스 보여주세요
Junki1108
2022.11.29아이템도박.sk
qsef1256
2022.11.30clicked slot 이라고 쓰지 않았는데요
qsef1256
2022.11.30https://skripthub.net/docs/?id=858
하나의 Expression 이라 제대로 안 쓰면 다른 애드온 구문과 겹칩니다