이해도 | 입문자 |
---|---|
게임버전 (JE) | 1.11.2 |
게임버전 (BE) | 1.12.x |
스크립트 구문인데 시세상점 스크립트 입니다 여기서 시세변동시간을 변동하고 싶은데 어떤 부분을 바꿔야 하나요?
Options:
접: &9슬기로운 형민이의 포켓몬생활
command /광물 [<player>]:
permission: op
trigger:
open chest with 6 rows named "&7&l광물 상점" to arg 1
set {_a::*} to 53, 52, 51, 50, 48, 47, 46 and 45
loop {_a::*}:
set slot loop-value of current inventory of arg 1 to green stained glass pane named "&f"
set slot 49 of current inventory of arg 1 to gold ingot named "&6소지금액" with lore "&e%arg 1's money% &f원 을 소지하고 있습니다."
wait 1 tick
loop {광물시세아이템::*}:
set {_item} to loop-value
set slot loop-index parsed as integer of current inventory of arg 1 to {_item} with lore "" and "&7기본가 : &e%{광물시세기본가::%loop-index%}% &f/ &7현재가 : &b%{광물시세::%loop-index%}%" and "&a&l좌클릭 &f│ &71개를 &6%{광물시세::%loop-index%}%&7 원에 판매" and "&c&l우클릭 &f│ &764개를 &6%{광물시세::%loop-index%}*64% &7원에 판매" and "&c&l우클릭+Shift &f│ &7전체판매" and ""
command /작물 [<player>]:
permission: op
trigger:
open chest with 6 rows named "&e&l작물 상점" to arg 1
set {_a::*} to 53, 52, 51, 50, 48, 47, 46 and 45
loop {_a::*}:
set slot loop-value of current inventory of arg 1 to green stained glass pane named "&f"
set slot 49 of current inventory of arg 1 to gold ingot named "&6소지금액" with lore "&e%arg 1's money% &f원 을 소지하고 있습니다."
wait 1 tick
loop {작물시세아이템::*}:
set {_item} to loop-value
set slot loop-index parsed as integer of current inventory of arg 1 to {_item} with lore "" and "&7기본가 : &e%{작물시세기본가::%loop-index%}% &f/ &7현재가 : &b%{작물시세::%loop-index%}%" and "&a&l좌클릭 &f│ &71개를 &6%{작물시세::%loop-index%}%&7 원에 판매" and "&c&l우클릭 &f│ &7 &6%{작물시세::%loop-index%}*64% &7원에 판매" and "&c&l우클릭+Shift &f│ &7전체판매" and ""
on inventory click:
if inventory name of player's current inventory is "&e&l작물 상점":
cancel event
if clicked raw slot <= 44:
if name of clicked item is "&e&l작물 상점 &c[판매전용]":
stop
if clicked item is air:
stop
if click type is left mouse button:
if player has 1 of {작물시세아이템::%clicked raw slot%}:
remove 1 of {작물시세아이템::%clicked raw slot%} from player
send "{@접} %{작물시세::%clicked raw slot%}% 원이 지급되었습니다."
add {작물시세::%clicked raw slot%} to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
send "{@접} 판매할 1개의 아이템이 없습니다."
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 2 at player
if "%click type%" contain "RIGHT":
if "%click type%" contain "SHIFT":
set {_item} to {작물시세아이템::%clicked raw slot%}
if amount of 1 of {_item} in player < 1:
send "{@접} 판매할 아이템을 가지고 있지 않습니다."
exit
set {_amount} to 2304
set {_player} to amount of {_item} in player
if {_player} > {_amount}:
set {_player} to {_amount}
set {_a} to 2304 / {_amount} * {_player}
set {_item} to {_player} of {_item}
remove {_item} from player
send "{@접} %{작물시세::%clicked raw slot%}*{_player}% 원이 지급되었습니다."
add {작물시세::%clicked raw slot%}*{_player} to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
if player has 64 of {작물시세아이템::%clicked raw slot%}:
remove 64 of {작물시세아이템::%clicked raw slot%} from player
send "{@접} %{작물시세::%clicked raw slot%}*64% 원이 지급되었습니다."
add {작물시세::%clicked raw slot%}*64 to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
send "{@접} 판매할 64개의 아이템이 없습니다."
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 2 at player
stop
if inventory name of player's current inventory is "&7&l광물 상점":
cancel event
if clicked raw slot <= 44:
if name of clicked item is "&7&l광물 상점 &c[판매전용]":
stop
if clicked item is air:
stop
if click type is left mouse button:
if player has 1 of {광물시세아이템::%clicked raw slot%}:
remove 1 of {광물시세아이템::%clicked raw slot%} from player
send "{@접} %{광물시세::%clicked raw slot%}% 원이 지급되었습니다."
add {광물시세::%clicked raw slot%} to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
send "{@접} 판매할 1개의 아이템이 없습니다."
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 2 at player
if "%click type%" contain "RIGHT":
if "%click type%" contain "SHIFT":
set {_item} to {광물시세아이템::%clicked raw slot%}
if amount of 1 of {_item} in player < 1:
send "{@접} 판매할 아이템을 가지고 있지 않습니다."
exit
set {_amount} to 2304
set {_player} to amount of {_item} in player
if {_player} > {_amount}:
set {_player} to {_amount}
set {_a} to 2304 / {_amount} * {_player}
set {_item} to {_player} of {_item}
remove {_item} from player
send "{@접} %{광물시세::%clicked raw slot%}*{_player}% 원이 지급되었습니다."
add {광물시세::%clicked raw slot%}*{_player} to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
if player has 64 of {광물시세아이템::%clicked raw slot%}:
remove 64 of {광물시세아이템::%clicked raw slot%} from player
send "{@접} %{광물시세::%clicked raw slot%}*64% 원이 지급되었습니다."
add {광물시세::%clicked raw slot%}*64 to player's money
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 1 at player
else:
send "{@접} 판매할 64개의 아이템이 없습니다."
play sound "BLOCK_NOTE_CHIME" with volume 1 and pitch 2 at player
command /시세설정 [<text>] [<text>] [<integer>] [<text>]:
permission: op
trigger:
if arg 1 is not set:
send ""
send "{@접} 아이템 슬롯은 0부터 시작합니다."
send ""
send "{@접} /상점 &7- 상점을 열어 추가한 아이템 또는 시세를 확인하세요."
send "{@접} /시세강제변동 &7- 시세를 지금바로 변동합니다."
send "{@접} /시세설정 아이템설정 <작물/광물> <슬롯 0~44> <기본가격> &7- 들고있는 아이템을 설정합니다."
send "{@접} /시세설정 아이템제거 <작물/광물> <슬롯 0~44> &7- 슬롯에 있는 아이템을 제거합니다."
send ""
stop
if arg 1 is "아이템설정":
if arg 2 contains "작물" or "광물":
set {%arg 2%시세기본가::%arg 3%} to arg 4 parsed as integer
set {%arg 2%시세::%arg 3%} to arg 4 parsed as integer
set {%arg 2%시세아이템::%arg 3%} to 1 of player's tool
send "{@접} %arg 2% 상점 %arg 3% 슬롯에 기본가격 %arg 4% 원의 아이템을 설정헀습니다."
if arg 1 is "아이템제거":
if arg 2 contains "작물" or "광물":
delete {%arg 2%시세::%arg 3%}
delete {%arg 2%시세아이템::%arg 3%}
send "{@접} %arg 2% 상점 %arg 3% 슬롯에있는 아이템을 제거헀습니다."
command /시세강제변동:
permission: op
trigger:
set {_a} to now formatted human-readable as "hh시 mm분 ss초"
broadcast ""
broadcast "{@접} 상점 시세가 변동되었습니다. 현재시간은 %{_a}% 입니다."
broadcast ""
loop {광물시세::*}:
if {광물시세::%loop-index%} is not 1:
#2배
set {_a변동폭} to {광물시세기본가::%loop-index%}*1.5
set {_a변동폭pp} to {광물시세기본가::%loop-index%}*0.5
#0원부터 2배까지 (-100% 기본값 + 100%) 50~150% 가격변동
set {_a가격} to random integer between {_a변동폭pp} to {_a변동폭}
set {광물시세::%loop-index%} to {_a가격}
loop {작물시세::*}:
if {작물시세::%loop-index%} is not 1:
#1.5배
set {_b변동폭} to {작물시세기본가::%loop-index%}*1.5
#0.5배
set {_b변동폭2} to {광물시세기본가::%loop-index%}*0.5
#0.5배에서 1.5배까지 가격변동
set {_b가격} to random integer between {_b변동폭2} to {_b변동폭}
set {작물시세::%loop-index%} to {_b가격}
every 1 minutes:
if "%now%" contains "오후 4:00" or "오후 8:00" or "오후 11:59" or "오전 4:00" or "오전 8:00" or "오전 11:59":
set {_a} to now formatted human-readable as "hh시 mm분 ss초"
broadcast ""
broadcast "{@접} 상점 시세가 변동되었습니다. 현재시간은 %{_a}% 입니다."
broadcast ""
loop {광물시세::*}:
#0배에서 2.0배까지 변동
set {_a변동폭} to {광물시세기본가::%loop-index%}*2
set {_a가격} to random integer between 0 to {_a변동폭}
set {광물시세::%loop-index%} to {_a가격}
loop {작물시세::*}:
#0.5배에서 1.5배까지 변동
set {_b변동폭} to {작물시세기본가::%loop-index%}*1.5
set {_b변동폭2} to {작물시세기본가::%loop-index%}/2
set {_b가격} to random integer between {_b변동폭2} to {_b변동폭}
set {작물시세::%loop-index%} to {_b가격}
qsef1256
2023.02.16이거 바꾸시면 됩니다
mjwonbin06
2023.02.16저도 좀 전에 알앗습니다! 알려주셔서 감사해요!