viewing paste Unknown #670 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
//===== rAthena Script =======================================
//= Stylist
//===== by: ==================================================
//= 1.0 - Euphy
//= 2.0 - Myzter
//===== Current Version: =====================================
//= 2.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//============================================================
 
prontera,160,187,1  script  Stylist#custom01    122,{
    set .@Item,8888; // Set here the item to pay for any style change
    setarray .@MaxCode[0],553,37,250;
    setarray .@StyleClass[0],7,1,6; // Don't change it
    setarray .@StyleClassName$[0],"Cloth color","Hairstyle","Hair color";
    set .@opt, select(.@StyleClassName$[0],.@StyleClassName$[1],.@StyleClassName$[2],"[x] Exit") - 1;
    if (.@opt == 3) close;
    if (!countitem(.@Item)) {
        message strcharinfo(0), "Hmm, i need a " + getitemname(.@Item) + " to change my style.";
        close;
    }
    delitem .@Item,1;
    set .@selCat, .@StyleClass[.@opt];
    set .@Original, getlook(.@selCat);
    set .@Style, .@Original;
    set .@Direction,1;
    dispbottom .@selCat + " " + .@Original + " " + .@MaxCode[.@opt];
    dispbottom "> Original " + .@StyleClassName$[.@opt] + ": " + .@Original;
    while(1) {
        if (.@Style < 0) set .@Style, .@MaxCode[.@opt];
        if (.@Style > .@MaxCode[.@opt]) set .@Style, 0;
 
        setlook .@selCat, .@Style;
 
        set .@Nx$, "[>] ^0080FFNext^000000";
        set .@Pv$, "[<] ^8080C0Previows^000000";
        // set .@menu$, .@Direction?.@Nx$ + "[^FF641A" + .@Style + "^000000 / " + .@MaxCode[.@opt] + "]:" + .@Pv$:.@Pv$  + " / " + .@MaxCode[.@opt] + "]:" + .@Nx$;
        set .@menu$, (.@Direction?.@Nx$:.@Pv$) + " [^FF641A" + .@Style + "^000000 / " + .@MaxCode[.@opt] + "]:" + (.@Direction?.@Pv$:.@Nx$);
        set .@menu$, .@menu$ + ":[*] ^008000Jump to...^000000:[!] ^ff0000Finish!^000000";
        switch(prompt(.@menu$)) {
            case 1:
                if (.@Direction) {
                    set .@Style, .@Style + 1;
                } else {
                    set .@Style, .@Style - 1;
                    set .@Direction,0;
                }
                break;
            case 2:
                if (.@Direction) {
                    set .@Style, .@Style - 1;
                    set .@Direction,0;
                } else {
                    set .@Style, .@Style + 1;
                    set .@Direction,1;
                }
                break;
            case 3:
                message strcharinfo(0),"I have to input a style between 1 and " + .@MaxCode[.@opt] + "...";
                input .@Style,0,.@MaxCode[.@opt];
                set .@Direction,1;
                break;
            case 4:
                dispbottom "> Selected " + .@StyleClassName$[.@opt] + ": " + .@Style;
                close;
            case 255: // Player press the Cancel button
                if (getlook(.@selCat) != .@Original) {
                    setlook .@selCat, .@Original;
                    dispbottom "> Process Canceled, restoring original " + .@StyleClassName$[.@opt] + ": " + .@Original;
                }
                getitem .@Item,1;
                end;
            }
    }
    end;
}
Viewed 836 times, submitted by Myzter.