SimekalLab 99c9e4c1b8cc4189b84e35acb3606915
이해도 | 입문자 |
---|---|
게임버전 (JE) | 관련없음 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.0 |
스크립트 오류가 뭘까요
options:
MenuName: "&8장비 과부하"
OpTag: "&4과부하"
LevelRequire: 10
on load:
set {targetEnchants::*} to sharpness, efficiency, power, thorns and protection
on right click on any anvil:
if block above clicked block is enchanting_table:
cancel event
set {_menu} to chest inventory with 1 rows named {@MenuName}
loop 9 times:
set slot ((loop-number) - 1) of {_menu} to red stained glass pane named " "
set {_book} to book named "&e적용 인챈트 목록"
loop {targetEnchants::*}:
add "&7%loop-value%" to lore of {_book}
set slot 0 of {_menu} to {_book}
set slot 4 of {_menu} to air
set slot 8 of {_menu} to anvil named "&a강화"
open {_menu} to player
play sound "block.grindstone.use" with pitch 1.6 at clicked block
on inventory click:
if name of current inventory of player is {@MenuName}:
if event-inventory is open inventory:
set {_index} to index of clicked slot
if {_index} is not 4:
cancel event
if {_index} is 8:
set {_item} to slot 4 of event-inventory
if {_item} is air:
message "&c강화할 아이템이 없습니다" to player
exit
if player's level < {@LevelRequire}:
message "&c레벨이 부족합니다: &e요구 레벨 30"
exit
set {random} to random integer between 1 and 3
if {random} is 1:
set {_enchants::*} to enchantments of {_item}
loop {_enchants::*}:
set {_enchantName::*} to split "%loop-value%" by " "
remove last element of {_enchantName::*} from {_enchantName::*}
set {_name} to join {_enchantName::*} with " "
loop {targetEnchants::*}:
if "%loop-value-2%" is {_name}:
set {_exist} to true
set {_lv} to (enchant level of loop-value-2 of {_item}) + 1
enchant {_item} with "%loop-value-2% %{_lv}%" parsed as enchantment type
if {_exist} is not set:
message "&c강화할 인챈트가 없습니다"
exit
remove {@LevelRequire} from player's level
set slot 4 of event-inventory to {_item}
play sound "block.enchantment_table.use" for player
play sound "block.anvil.use" for player
on inventory close:
if name of event-inventory is {@MenuName}:
set {_item} to slot 4 of event-inventory
if {_item} is not air:
if player has enough space for {_item}:
give {_item} to player
else:
drop {_item} at event-location
김이비
2023.03.19그렇게 올리시면 모르고 어떤게 오류나며
오류 구문이 있는지를 같이 올려주셔야..
환타비
2023.03.20오류난 구문을 올려주셔야 스크립트 하시는 분들이 도와드리거나 할수 있습니다 그냥 이렇게 구문만 올려놓으면 "나는 구문은 썼는데 오류를 모르겠다" 라고 쓴것같아 보여요...ㅠㅠ (위에 편집으로 오류난 사진을 올려주시거나 댓글로 올려주시면 빠른 시일내에 답글 받을수 있을거에요!)