개인 자료란 (JE)

  서버 커뮤니티

Profile 질문 대표칭호 없음
Profile

질문하기 스크립트

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

2024.03.09 조회 수 38 추천 수 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/841/773/003/262x150.crop.jpg?20240526120908

레드스톤

마인크래프트 노트블록버전 『 봄을 고하다 (春を告げる) 』 [더블옥타브 버전]

노트블럭전문가

2024-05-26

0

/files/thumbnails/712/796/003/262x150.crop.jpg?20240525085438

레드스톤

마인크래프트 노트블록으로 만든 『 봄을 고하다 (春を告げる) 』 1

Sonttukk

2024-05-25

0

/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/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 모드에서 악성코드 발견 3

학교가기싫다

2024-05-08

1