이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (JE) | 1.17.1 |
게임버전 (BE) | 관련없음 |
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 20: if inventory name is "&bBuy":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 56: if inventory name is "&8BUYITEM":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 66: if inventory name is "&8아이템최종구매":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 90: if inventory name is "&8auction":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 121: if inventory name is "&aShow Auction":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 139: if inventory name is "&8Cancel":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 153: if inventory name is "&eSell":')
[20:57:34 ERROR]: Can't compare 'inventory name' with a text (auction.sk, line 193: if inventory name is "&8ConFirm":')
[20:57:34 ERROR]: Can't compare 'icname' with a text (auction.sk, line 217: if icname is "&eSell":')
[20:57:34 ERROR]: Can't compare 'icname' with a text (auction.sk, line 223: if icname is "&8ConFirm":')
라고 합니다. 플러그인 폴더에 스크립트 , sk쿼리, sk utilities, skrayfall, skchoke 다 있는데도 저 구문이 안된다고 합니다. 다음은 전체 구문입니다.
on rightclick on entity:
if entity's name is "&bAuction":
open chest inventory with 3 rows named "&8auction" to player
set slot 11 of current inventory of player to bookshelf named "&bBuy"
set slot 13 of current inventory of player to clock named "&aShow auction"
set slot 15 of current inventory of player to gold ingot named "&eSell"
on inventory click:
if inventory name is "&bBuy":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 53:
if {전체아이템수} > ( {BUYSLOT%uuid of player%} + 1 ) * 45:
set {_right} to 0
loop 45 times:
set slot {_right} of current inventory of player to 0 of air
add 1 to {BUYSLOT.%uuid of player%}
set {_right2} to ( {BUYSLOT.%uuid of player%} + 1 ) * 45 + ( 9 * {BUYSLOT.%uuid of player%} ) - 45
set {_right3} to {_right2} + 1
loop 45 times:
set slot {_right2} of current inventory of player to {AUCTION::%{_right3}%}
add 1 to {_right2}
add 1 to {_right3}
if clicked raw slot is between 0 and 44:
set {_per} to uncolored line 3 of lore of clicked item
set {_per} to {_per} parsed as integer
set {가격.%uuid of player%} to {_per}
set {clickeditem.%uuid of player%} to clicked item
set {_per2} to uncolored line 6 of lore of clicked item
set {판매자.%uuid of player%} to {_per2}
set {_per2} to {_per2} parsed as player
if {_per2} is not player:
if {money.%uuid of player%} >= {_per}:
set {_item} to clicked item
open chest with 3 rows named "&8BUYITEM" to player
set slot 11 of current inventory of player to lime wool named "&a구매하기"
set slot 13 of current inventory of player to {_item}
set slot 15 of current inventory of player to red wool named "&c구매취소하기"
else:
send "&c당신은 이 아이템을 살만한 돈이 없어요!" to player
close player's inventory
else:
close player's inventory
send "&c본인의 아이템은 살 수 없어요!" to player
if inventory name is "&8BUYITEM":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 15:
close player's inventory
if clicked raw slot is 11:
set {_per} to slot 13 of current inventory of player
open chest with 3 rows named "&8아이템최종구매" to player
set slot 12 of current inventory of player to lime wool named "&a최종구매"
set slot 14 of current inventory of player to red wool named "&a구매취소"
if inventory name is "&8아이템최종구매":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 14:
close player's inventory
if clicked raw slot is 12:
subtract {가격.%uuid of player%} from {money.%uuid of player%}
clear lore of {clickeditem.%uuid of player%}
give {clickeditem.%uuid of player%} to player
close player's inventory
set {_wow} to {판매자.%uuid of player%}
set {_wow} to {_wow} parsed as player
set {_wow} to {_wow}'s uuid
remove {clickeditem.%uuid of player%} from {AUCTION::*}
remove {clickeditem.%uuid of player%} from {AUCTION.%{_wow}%::*}
set {_wow2} to {clickeditem.%uuid of player%}
clear lore of {_wow2}
set line 1 of lore of {_wow2} to "&e팔렸습니다!"
set line 2 of lore of {_wow2} to "&a가격------"
set line 3 of lore of {_wow2} to "&e%{가격.%uuid of player%}%"
set line 4 of lore of {_wow2} to "&a"
set line 5 of lore of {_wow2} to "&a판매자------"
set line 6 of lore of {_wow2} to "&b%player%"
add {_wow2} to {AUCTION.%{_wow}%::*}
if inventory name is "&8auction":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 11:
cancel event
open chest with 6 rows named "&bBuy" to player
set slot 53 of current inventory of player to arrow named "&aNext Page"
set {_right} to 0
set {BUYSLOT%uuid of player%} to 0
loop {AUCTION::*}:
if {_right} <= 44:
set slot {_right} of current inventory of player to loop-value
add 1 to {_right}
if clicked raw slot is 13:
cancel event
open chest with 1 row named "&aShow Auction" to player
set {_per} to 0
loop {AUCTION.%uuid of player%::*}:
set slot {_per} of current inventory of player to loop-value
add 1 to {_per}
if clicked raw slot is 15:
cancel event
if {경매아이템.%uuid of player%} is 9:
send "&c경매 최대 아이템 수를 초과하셨습니다!" to player
close player's inventory
else:
open chest with 6 rows named "&eSell" to player
set slot 13 of current inventory of player to white stained glass pane named "&a아이템" with lore "&e이곳에 팔고 싶은 아이템을 클릭해주세요!"
set slot 31 of current inventory of player to yellow stained glass pane named "&a아이템가격" with lore "&e이곳에 원하는 가격을 수표로 만들어 클릭해주세요!"
set slot 29 of current inventory of player to lime wool named "&a아이템 팔기"
set slot 33 of current inventory of player to red wool named "&c취소하기"
if inventory name is "&aShow Auction":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is between 0 and 8:
if line 1 of lore of clicked item is "&e팔렸습니다!":
set {_per} to uncolored line 3 of lore of clicked item
set {_per} to {_per} parsed as integer
add {_per} to {money.%uuid of player%}
add {_per} to {money.%uuid of player%}
remove clicked item from {AUCTION.%uuid of player%::*}
subtract 1 from {경매아이템.%uuid of player%}
close player's inventory
else:
if clicked item is not 0 of air:
set {수거.%uuid of player%} to clicked item
open chest with 5 rows named "&8Cancel" to player
set slot 13 of current inventory of player to {수거.%uuid of player%}
set slot 31 of current inventory of player to red wool named "&c아이템 수거하기"
if inventory name is "&8Cancel":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 31:
close player's inventory
set {_per3} to uncolored line 3 of lore of {수거.%uuid of player%}
set {_per3} to {_per3} parsed as integer
give 1 of paper named "%{_per3}%" with lore "수표" to player
send "&c아이템이 수거되었습니다!" to player
remove {수거.%uuid of player%} from {AUCTION.%uuid of player%::*}
remove {수거.%uuid of player%} from {AUCTION::*}
clear lore of {수거.%uuid of player%}
subtract 1 from {경매아이템.%uuid of player%}
give {수거.%uuid of player%} to player
if inventory name is "&eSell":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is between 54 and 88:
if clicked item's lore does not contain "수표":
if clicked item is not 0 of air:
if slot 13 of current inventory of player is white stained glass pane:
set slot 13 of current inventory of player to clicked item
set clicked item to air
set {아이템돌려주기.%uuid of player%} to true
else:
if slot 31 of current inventory of player is yellow stained glass pane:
if clicked item is not 0 of air:
set slot 31 of current inventory of player to 1 of clicked item
subtract 1 of clicked item from player
set {아이템돌려주기.%uuid of player%} to true
if clicked raw slot is 13:
if clicked item is not white stained glass pane:
give slot 13 of current inventory of player to player
set slot 13 of current inventory of player to white stained glass pane
if clicked raw slot is 31:
if clicked item is not yellow stained glass pane:
give slot 31 of current inventory of player to player
set slot 31 of current inventory of player to yellow stained glass pane
if clicked raw slot is 33:
close player's inventory
if clicked raw slot is 29:
if slot 13 of current inventory of player is not white stained glass pane:
if slot 31 of current inventory of player is not yellow stained glass pane:
set {아이템돌려주기.%uuid of player%} to false
set {슬롯13.%uuid of player%} to slot 13 of current inventory of player
set {슬롯31.%uuid of player%} to slot 31 of current inventory of player
set {_per2} to slot 13 of current inventory of player
set {_per} to slot 31 of current inventory of player's name
set {_per} to {_per} parsed as integer
open chest with 3 rows named "&8ConFirm" to player
set {아이템돌려주기2.%uuid of player%} to true
set slot 11 of current inventory of player to lime wool named "&a팔기!"
set slot 13 of current inventory of player to {_per2} with lore "&a" and "&a가격------" and "&e%{_per}%" and "&a" and "&a판매자------" and "&b%player%"
set slot 15 of current inventory of player to red wool named "&c취소하기!"
if inventory name is "&8ConFirm":
if clicked raw slot is between 0 and 200:
cancel event
if clicked raw slot is 11:
if {전체아이템수} is not set:
set {전체아이템수} to 0
set {아이템돌려주기2.%uuid of player%} to false
add 1 to {경매아이템.%uuid of player%}
add slot 13 of current inventory of player to {AUCTION::*}
add slot 13 of current inventory of player to {AUCTION.%uuid of player%::*}
add 1 to {전체아이템수}
close player's inventory
if clicked raw slot is 15:
close player's inventory
if clicked raw slot is 13:
set {아이템돌려주기2.%uuid of player%} to false
open chest with 6 rows named "&eSell" to player
set {아이템돌려주기.%uuid of player%} to true
set slot 13 of current inventory of player to {슬롯13.%uuid of player%}
set slot 31 of current inventory of player to {슬롯31.%uuid of player%}
set slot 29 of current inventory of player to lime wool named "&a아이템 팔기"
set slot 33 of current inventory of player to red wool named "&c취소하기"
on inventory close:
if icname is "&eSell":
if {아이템돌려주기.%uuid of player%} is true:
if slot 13 of current inventory of player is not white stained glass pane:
give slot 13 of current inventory of player to player
if slot 31 of current inventory of player is not yellow stained glass pane:
give slot 31 of current inventory of player to player
if icname is "&8ConFirm":
if {아이템돌려주기2.%uuid of player%} is true:
give {슬롯13.%uuid of player%} to player
give {슬롯31.%uuid of player%} to player
command /가격:
trigger:
set {_wow} to {판매자.%uuid of player%}
set {_wow} to {_wow} parsed as player
set {_wow} to {_wow}'s uuid
send "%{_wow}%" to player
보빈이
2021.11.08혹시 clicked slot is between a and b 구문을 적용하는데 필요한 다른 애드온이나 플러그인이 있나요?
스크립터브혼
2021.11.10clicked slot은 아이템을 반환합니다. 슬롯 번호를 사용하려면 index of clicked slot을 사용하셔야 해요.
보빈이
2021.11.10해보겠습니다. 감사합니다