close_btn
로그인, 회원가입후 더 많은 혜택을 누리세요 로그인 회원가입 닫기

[DR] 염색약을 만들어보자!

2016.08.01 08:23

행복e 조회 수:320

첫째!

아이템을 추가하고나서, 아이템 속성값 을 '캐시'로 줍니다.
 
둘째!
스크립트를 추가해 봅시다.
 
item    천연염색약(파랑색)    {
onuse:
    set @id, myid();
    set @sd, mysd();
 
    // 이름과, 기간 수정
    set @day, 30;
    set @color, 75;
 
    set #cash_item$, "천연염색약(파랑색)";
    set #cash_expiration, @day*3600*24;
    cashcolor @sd, 3, -1, -1, @color;
    end;
}
 
위에서 이름과 기간을 자기 마음대로 수정하시면 됩니다~
 
셋째!
이벤트 스크립트 부분으로 가서
 
event    OnPCColor    {
    // @type == 4, 컬러 0~7
 
    set @id, myid();
    set @sd, mysd();
    set @e_type, .type & 0x07;
    set @slot, .type & 0x08;
    set @type, (.type & 0xE0) >> 5;
    set @color, (.type & 0x3FF00) >> 9;    // 필요 x -> type: 5
    set @rcolor, ((@color%32 == 24) ? rand(@color-24, @color+8) : 0x00);
 
    if (checkitem(@sd, name2item_id(#cash_item$), 1) == 0) {
        message @sd, 8, #cash_item$ + "이 필요합니다.\n( @ bug!!!!!!! )";
        end;
    }
 
    switch (@e_type) {
    case 0: // 얼굴장식
    case 1: // 머리장식
    case 2: // 망토
    case 3: // 겉옷
    case 4: // 신발
        delitem @sd, name2item_id(#cash_item$), 1;
 
        switch (@type) {
        case 1: // 랜덤 + 색 선택 염색
            // @color:후, @rcolor:선 이용해서 색상 입혀주기.
            if (@rcolor) set @color, @rcolor;
            break;
 
        case 2: // 기간 연장
            break;
 
        case 5: // 한 부위 염색
            if (@rcolor) set @color, @rcolor;
            switch (@e_type) {
            case 0: // 얼굴장식
                if (@slot) { // 2번째 슬롯 염색
                    set_faceacccolor2 @sd, 0, @color;
                    set_faceacccolor2 @sd, 1, @color;
                    set_faceacccolor2_expiration @sd, 0, gettimetick(3) + #cash_expiration;
                    set_faceacccolor2_expiration @sd, 1, gettimetick(3) + #cash_expiration;
                } else {
                    set_faceacccolor1 @sd, 0, @color;
                    set_faceacccolor1 @sd, 1, @color;
                    set_faceacccolor1_expiration @sd, 0, gettimetick(3) + #cash_expiration;
                    set_faceacccolor1_expiration @sd, 1, gettimetick(3) + #cash_expiration;
                }
                set #cash_expiration, 0;
                if (@slot) { set @slot, 1; }
                cashcolor @sd, 1, @e_type+8, @slot, 0;
                updatelookpc @sd, 1;
                break;
            case 1: // 머리장식
                break;
            case 2: // 망토
                break;
            case 3: // 겉옷
                break;
            case 4: // 신발
                break;
            }
            break;
 
        case 6: // 염색 지우기
            break;
        }
        break;
    }
    end;
}
 
이런식으로 추가해주시면 완료!
 
 
참! 쉽죠잉~

번호 제목 글쓴이 날짜 조회 수
25 [DR] F2 운영자 메뉴에 간단한 승급 변경 추가 호밍 2022.06.19 215
24 [ DH ] 초등학생도 이해할수있는 구축방법 [8] file 디에이치 2019.10.22 2253
23 DR구축 방법 및 스크립트 구성과 변수의 종류 [2] file 에이전시 2019.04.09 1873
22 dr] 대화창 스타일 혹등고래 2018.07.28 617
21 [DR] 함수 기능 정리 [1] 마사카 2017.01.06 2174
20 [DR] 류미피의 자문자답 DR관련 소소한 FAQ ver1.2 우지냥 2016.12.08 846
19 [기타] 몬스터 마법정보 및 마법데미지 우지냥 2016.12.08 619
18 DR] 각 직업별 승급마법 공식데미지 포함. 7.34 이전 공식자료 우지냥 2016.12.08 959
17 [기타] 각직업별 데미지 공식.(734이후기연마법종류) 우지냥 2016.12.08 617
16 [DR] CANMOVE file 우지냥 2016.12.08 530
15 [DR] CR에서 DR로 넘어갈 때 혼동되지 않게 꼭 짚어봐야 하는 함수들! [1] 우지냥 2016.12.08 622
14 [DR] NPC 가상 PC 만들기 file 행복e 2016.11.30 539
13 [DR] 김태희의 모든 DB 양식목록. 16.2.16 NEW 최신화 행복e 2016.11.30 776
12 DR] 타라님의! 염색약을 만들어보자! 행복e 2016.11.30 317
11 [DR] CR에서 DR로 넘어갈 때 혼동되지 않게 꼭 짚어봐야 하는 함수들! 행복e 2016.11.30 340
10 [DR] Say 스크립트 /이동 맵이름 x y 추가 행복e 2016.11.30 318
9 [DR] DB 양식목록. 16.2.16 NEW 최신화 [1] 행복e 2016.08.01 610
8 [DR] 천상 미궁 좌표 현황입니다. file 행복e 2016.08.01 290
» [DR] 염색약을 만들어보자! [2] 행복e 2016.08.01 320
6 [DR] Seol님의 부활마법 만들어보기! 행복e 2016.08.01 320
5 [DR] 전설의 소소 팁! 행복e 2016.08.01 573
4 [DR] 전설의 effect_xy file 행복e 2016.08.01 349
3 [DR] NPC 가상 PC 만들기 file 행복e 2016.08.01 257
2 [DR] 자문자답 DR관련 소소한 FAQ ver1.2 행복e 2016.08.01 629
1 [DR] CR에서 DR로 넘어갈 때 혼동되지 않게 꼭 짚어봐야 하는 함수들! [1] 행복e 2016.08.01 388