개인 자료란 (JE)

  서버 커뮤니티

Profile 질문 대표칭호 없음
Profile

질문하기 스크립트

인벤토리 특정 칸 아이템 개수 감지 하는 법

2024.03.09 조회 수 34 추천 수 0
이해도 입문자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 

set {_sword} to type of slot 19 of current inventory of player

@ if 1st line of lore of {_sword} is not set:

 @@ remove 1 of paper with custom model data 105 named "&6강화석" from current inventory of player

@@ delete slot 19 of current inventory of player

 @@ set slot 19 of current inventory of player to {_sword} with lore "&b&l +1강" and "&a공격력 +1"

@@ send "&a강화에 성공하였습니다" to player

@ if 1st line of lore of {_sword} is "&b&l +1강":

@@ set {_rkdghk} to "%slot 25 of current inventory of player%"

@@ if {_rkdghk} is bigger than 1:

@@@ if chance of 95%:                                    

@@@ remove 2 of paper with custom model data 105 named "&6강화석" from current inventory of player

@@@ delete slot 19 of current inventory of player

@@@ set slot 19 of current inventory of player to {_sword} with lore "&b&l +2강" and "&a공격력 +2"

@@@ send "&a강화에 성공하였습니다" to player

@@ else:

@@@ remove 2 of paper with custom model data 105 named "&6강화석" from current inventory of player

@@@ send "&c강화에 실패하였습니다" to player    

@ else:

@@ send "&c강화석이 부족합니다" to player

25번칸에 강화석을 올려 진행하는 강화 스크립트인데

set {_rkdghk} to "%slot 25 of current inventory of player%"

 if {_rkdghk} is bigger than 1:

이 구문에서 진행이 안됩니다

send "%{_rkdghk}%" to player 를 넣어서 확인 해보면

이런식으로 뜨는데 25번칸에 아이템이 2개 이상 들어 있을 경우 작동하는 구문을 어떻게 표현해야 할까요..

강화창은 이런식으로 설정 되어있습니다

1개의 댓글

슈퍼레몬
2024.03.09

이거 사용해보세요

뉴스 및 창작물
/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0