개인 자료란 (JE)

  서버 커뮤니티

Profile 너의멘탈을삭제 대표칭호 없음

DEL_your_Mental cfb5b4a85cc641e68e34a1e8b4a206fc

Profile

질문하기 스크립트

죽었을떄 랜덤아이템 삭제 메시지

2022.10.08 조회 수 59 추천 수 0
이해도 입문자 
게임버전 (JE) 1.19 
게임버전 (BE) 1.19.x 
스크립트 버전 2.6.3 

 

on death:

    set {_slot} to a random integer between 0 and 35

    set {_lost} to slot {_slot} of victim's inventory   

    

    player is victim

    send "%{_lost}% 아이템을 잃어버렸습니다!" to victim

    set slot {_slot} of victim's inventory to air

    if type of {_lost} is air:

        send "운좋게 아이템을 잃지않았습니다!" to victim


해결하였지만     "운좋게 아이템을 잃었습니다" , "air 아이템을 잃었습니다"  가 동시에 나오는데 이럴경우에는 어떻게 해야하나요??


15개의 댓글

거너아나
2022.10.08

set {_lost} to slot {_slot} of victim's inventory

@거너아나

구문을 넣으니까 {_lost} 아이템을 잃어버렸습니다 로 나오네요,,,

@너의멘탈을삭제

구문적용은되서 구문은 맞는거같은데

send message "{_lost} 아이템을 잃어버렸습니다!" to victim

여기가 문제일까요??

 

qsef1256
2022.10.08
@너의멘탈을삭제

네 거기가 문제입니다, 문자열 안에서 변수를 쓸 때는 %% 를 양 옆에 써줘야 합니다.

 

기본 문법에 해당하는 사항이니 공략을 다시 읽어보시는 것을 추천드립니다

@qsef1256

진짜 감사합니다 두분 ㅠㅜ !!

덕북에 해결됐어ㅓ요 ㅠㅜ

 

@qsef1256

그럼 하나만 더 물어봐도 될까요

 

 

on death:

set {_slot} to a random integer between 0 and 35

set {_lost} to slot {_slot} of victim's inventory

player is victim

send "%{_lost}% 아이템을 잃어버렸습니다!" to victim

set slot {_slot} of victim's inventory to air

if {_lost} is air:

send "운좋게 아이템을 잃지않았습니다!" to victim

 

에서 if {_lost} is air: 에러가 나는데 대신 쓸수있는 구문이 있을까요??

qsef1256
2022.10.08
@너의멘탈을삭제

오류 내용을 올려주시기 바랍니다. 대신 쓸 수 있는 구문은 대부분의 경우 없습니다.

@qsef1256

cant understand this condition: {_lost} is air:

 

qsef1256
2022.10.08
@너의멘탈을삭제

해당 구문 제 쪽에서는 문제 없습니다. 스크립트 전문을 파일로 올려주시기 바랍니다

@qsef1256

on death:

set {_slot} to a random integer between 0 and 35

set {_lost} to slot {_slot} of victim's inventory

player is victim

send "%{_lost}% 아이템을 잃어버렸습니다!" to victim

set slot {_slot} of victim's inventory to air

if {_lost} is air:

send "운좋게 아이템을 잃지않았습니다!" to victim

 

입니다~

 

qsef1256
2022.10.08
@너의멘탈을삭제

파일로 올려주세요. 들여쓰기가 다 망가져서 고쳐서 사용하면 제대로 돌아가는데, 그게 아닌 것 같아서 파일로 달라고 하는겁니다

qsef1256
2022.10.08
@너의멘탈을삭제

에디터 기능으로 올리시면 됩니다

거너아나
2022.10.08
@너의멘탈을삭제

if type of {_lost} is air:

@거너아나

오 바로 적용됬습니다~~~감사합니다!!

 

@너의멘탈을삭제

에러를 하나 발견했는데

 

on death:

     set {_slot} to a random integer between 0 and 35

     set {_lost} to slot {_slot} of victim's inventory


     player is victim

     send "%{_lost}% 아이템을 잃어버렸습니다!" to victim

     set slot {_slot} of victim's inventory to air

          if type of {_lost} is air:

               send "운좋게 아이템을 잃지않았습니다!" to victim

 

 

아이템이 air 일때 "운좋게 아이템을 잃었습니다" , "air 아이템을 잃었습니다" 가 동시에 나오는데 이럴경우에는 어떻게 해야하나요??

뉴스 및 창작물
/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1

/files/thumbnails/932/765/003/262x150.crop.jpg?20240410124459

레드스톤

마인크래프트 노트블록으로 만든 『 밤양갱 (Bam Yang Gang) 』

노트블럭전문가

2024-04-10

0

/files/thumbnails/403/765/003/262x150.crop.jpg?20240409190538

레드스톤

마인크래프트 노트블록으로 만든 『 밤양갱 (Bam Yang Gang) 』

Sonttukk

2024-04-09

4