개인 자료란 (JE)

  서버 커뮤니티

Profile 귀농놀부 대표칭호 없음

Lee0119 68530d1dba174206be5f736313d6e714

Profile

이해도 입문자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 
스크립트 버전 2.7.0 -beta3 

command /잔고확인:

    trigger:

        message "&e%player% &7님의 가진 돈은 &2%{돈::%player%.돈}%&7원 입니다."

        

on first join:

    set {돈::%player%.돈} to 50000

    message "&e돈을 초기화했습니다."

    

command /돈벌기:

    trigger:

        add 10000 to {돈::%player%.돈}

        message "&210000&7원이 추가되었습니다."

        

command /돈쓰기:

    trigger:

        subtract 10000 from {돈::%player%.돈}

        message "&210000&7원이 감소되었습니다."


command /수표 [<integer>]:

    trigger:

        if arg-1 is bigger than {돈::%player%.돈}:

            message "&c당신이 가진 돈보다 더 많은 금액을 인출할 수 없습니다."

        else:

            message "&a 수표를 발급했습니다."

            give paper named "&a수표 %arg-1%원" with lore "&c우클릭하면 돈을 지급받습니다." to player

            subtract arg-1 from {돈::%player%.돈}


on right click with paper:

    if name of player's tool contains "수표":

        set {_name} to uncolored name of player's tool

        replace all "수표" and "원" and " " with " " in {_name}

        set {_name} to {_name} parsed as integer

        message "&a수표를 사용하여 %{_name}%원을 지급받았습니다."

        remove 1 paper from player's tool

        add {_name} to {돈::%player%.돈}


수표를 뽑으면 정상적으로 돈이 차감 되면서 종이가 나오는데 종이를 우클릭하면 종이는 사라지고 %{_name}%원을 지급받았습니다.에서 %{name}%이 {none}으로 뜹니다. 돈도 추가가 안되어있어요.




8개의 댓글

코코냐
2023.07.08

로그는 디버깅의 기본입니다. replace가 덜된건지, 아니면 파싱이 그냥 안되는지 찍어봅시다.

환타비
2023.07.08

제 섭에서 테스트 한 결과

 

on rightclick 구문에서 replace 줄에서 with "(여기) " 이거를 with "(여기)" ""을 붙여서 해보세여 모르겠으면 밑에 구문 복사해서 저기에 붙여넣기 해보세욧!

 

 

replace all "수표" and "원" and " " with "" in {_name}

귀농놀부
2023.07.08
@환타비

알려주신 대로 해봤는데, 계속 {none}으로만 나오네요... 왜 안되는지 모르곘습니다 ㅠㅠ

qpwrou
2023.07.08

set {_name} to {_name} parsed as integer이부분을

 

set {_name} to "%{_name}%" parsed as integer 이렇게 한번 해보시겠어요

귀농놀부
2023.07.08
@qpwrou

여러가지 도전 해보고 있는데 아직 스크립트가 정상적으로 작동하지 않습니다... ㅠㅠ

qpwrou
2023.07.08
@귀농놀부


잘 되는거 같은데 스크립트 수정하시고 /sk reload [skript이름] 하고계신가요


@qpwrou

애드온 중에 빠지거나 추가해야 될게 있을까요?

qpwrou
2023.07.09
@귀농놀부

on right click with paper:


    if name of player's tool contains "수표":


        set {_name} to uncolored name of player's tool


        replace all "수표" and "원" and " " with "" in {_name}  


        set {_name} to {_name} parsed as integer


        message "&a2. 수표를 사용하여 %{_name}%원을 지급받았습니다."


        remove 1 paper from player's tool


        add {_name} to {돈::%player%.돈}



replace에서 with "" 이것만수정해고 테스트해보니 잘 됩니다.


스크립트 수정하시고 아래와같이 다시 불러오면 잘되요


뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240428135129

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/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