이해도 | 입문자 |
---|---|
게임버전 (JE) | 1.19.4, 1.20 |
게임버전 (BE) | 관련없음 |
command /atm출금:
trigger:
play sound "entity.experience_orb.pickup" with volume 1 and pitch 2 at player
open chest with 3 rows named "&cATM출금" to player
set slot 10 of current inventory of player to cyan dye named "&b1coin" with lore "클릭시 계좌에서 1coin 차감 후 현금 1coin을 지급합니다,"
set slot 11 of current inventory of player to green dye named "&b10coin" with lore "클릭시 계좌에서 10coin 차감 후 현금 10coin을 지급합니다,"
set slot 12 of current inventory of player to yellow dye named "&b50coin" with lore "클릭시 계좌에서 50coin 차감 후 현금 50coin을 지급합니다,"
set slot 13 of current inventory of player to purple dye named "&b100coin" with lore "클릭시 계좌에서 100coin 차감 후 현금 100coin을 지급합니다,"
set slot 14 of current inventory of player to magenta dye named "&b500coin" with lore "클릭시 계좌에서 500coin 차감 후 현금 500coin을 지급합니다,"
set slot 15 of current inventory of player to orange dye named "&b1000coin" with lore "클릭시 계좌에서 1000coin 차감 후 현금 1000coin을 지급합니다,"
set slot 16 of current inventory of player to light gray dye named "&b5000coin" with lore "클릭시 계좌에서 5000coin 차감 후 현금 5000coin을 지급합니다,"
on inventory click:
if event-inventory's name contains "&cATM출금":
cancel event
if clicked slot is 10:
if {돈::%uuid of player%} > 0:
subtract 1 from {돈::%uuid of player%}
give cyan dye of mending 1 named "&o1coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 11:
if {돈::%uuid of player%} > 10:
subtract 10 from {돈::%uuid of player%}
give green dye of mending 1 named "&o10coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 12:
if {돈::%uuid of player%} > 50:
subtract 50 from {돈::%uuid of player%}
give yellow dye of mending 1 named "&o50coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 13:
if {돈::%uuid of player%} > 100:
subtract 100 from {돈::%uuid of player%}
give purple dye of mending 1 named "&o100coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 14:
if {돈::%uuid of player%} > 500:
subtract 500 from {돈::%uuid of player%}
give magenta dye of mending 1 named "&o500coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 15:
if {돈::%uuid of player%} > 1000:
subtract 1000 from {돈::%uuid of player%}
give orange dye of mending 1 named "&o1000coin" to the player
else:
message "{@오류} 돈이 없습니다"
if clicked slot is 16:
if {돈::%uuid of player%} > 5000:
subtract 5000 from {돈::%uuid of player%}
give light gray dye of mending 1 named "&o5000coin" to the player
else:
message "{@오류} 돈이 없습니다"
give 와 subtract의 반대 명령어가 뭔가요ㅠㅠ
수정을 어떻게해야하나요?ㅠㅠㅠ
환타비
2024.03.02give 의 반대는 remove고
subtract 반대는 add 입니당