viewing paste Unknown #12228 | Athena

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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
//===== rAthena Script =======================================
//= Stylist with Autoscroll
//===== By: ==================================================
//= Brian
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//= Allows users to autoscroll with 1-second progressbars.
//===== Additional Comments: =================================
//= 
//============================================================
 
aretnorp,192,207,1  script  Stylist#autoscroll  122,{
OnProgressbarEnd:
    setarray .@max[1], 
        // wedding palettes only go up to 77
        checkoption(0x1000) ? 77 : getbattleflag("max_cloth_color"),
        getbattleflag("max_hair_style"),
        getbattleflag("max_hair_color");
    setarray .@Look[1],LOOK_CLOTHES_COLOR,LOOK_HAIR,LOOK_HAIR_COLOR;
    
    if (@autoscroll) {
        set @autoscroll, 0;
    } else {
        set @s, select(" ~ Cloth color (^0055FF"+getlook(LOOK_CLOTHES_COLOR)+"^000000): ~ Hairstyle (^0055FF"+getlook(LOOK_HAIR)+"^000000): ~ Hair color (^0055FF"+getlook(LOOK_HAIR_COLOR)+"^000000)");
        set @Revert, getlook(.@Look[@s]);
    }
    set .@Style, getlook(.@Look[@s]);
    
    while(1) {
        set .@menu$, (.@previous ? (": ~ Previous (^0055FF"+((.@Style>1)?.@Style-1:.@max[@s])+"^000000): ~ Next (^0055FF"+((.@Style<.@max[@s])?.@Style+1:1)+"^000000)") 
                   : (" ~ Next (^0055FF"+((.@Style<.@max[@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style>1)?.@Style-1:.@max[@s])+"^000000):")) 
                   + ": ~ Next ^008000autoscroll^000000: ~ Previous ^008000autoscroll^000000:"
                   + " ~ Jump to...: ~ Revert to original (^0055FF"+@Revert+"^000000)";
        switch(select(.@menu$)) {
            case 1:
            case 3:
                set .@previous,0;
                set .@Style, ((.@Style<.@max[@s])?.@Style+1:1);
                break;
            case 2:
                set .@previous,1;
                set .@Style, ((.@Style>1)?.@Style-1:.@max[@s]);
                break;
                
            case 4:
                mes "Click close to begin autoscroll...";
                mes " ";
                mes "Move your character to return to the menu.";
                close2;
                set @autoscroll, 1;
                addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
                while (1) {
                    set .@Style, ((.@Style<.@max[@s])?.@Style+1:1);
                    setlook .@Look[@s], .@Style;
                    message strcharinfo(0),"This is style #"+.@Style+".";
                    progressbar "FFFF00",1;
                }
                end;
            case 5:
                mes "Click close to begin autoscroll...";
                mes " ";
                mes "Move your character to return to the menu.";
                close2;
                set @autoscroll, 1;
                addtimer 1,strnpcinfo(3)+"::OnProgressbarEnd";
                while (1) {
                    set .@Style, ((.@Style>1)?.@Style-1:.@max[@s]);
                    setlook .@Look[@s], .@Style;
                    message strcharinfo(0),"This is style #"+.@Style+".";
                    progressbar "FFFF00",1;
                }
                end;
            
            case 6: message strcharinfo(0),"Choose a style between 1 - "+.@max[@s]+".";
                input .@Style,0,.@max[@s];
                if (!.@Style) set .@Style, rand(1,.@max[@s]);
                break;
            case 7: set .@Style, @Revert; setlook .@Look[@s], @Revert; break;
        }
        setlook .@Look[@s], .@Style;
        message strcharinfo(0),"This is style #"+.@Style+".";
    }
}
 
 
    setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color");
    setarray .@Look[1],7,1,6;
    set .@s, select(" ~ Cloth color: ~ Hairstyle: ~ Hair color");
    set .@Revert, getlook(.@Look[.@s]);
    set .@style,1;
    while(1) {
        setlook .@Look[.@s], .@style;
        message strcharinfo(0),"This is style #"+.@style+".";
        set .@menu$, " ~ Next (^0055FF"+((.@style!=.@styles[.@s])?.@style+1:1)+"^000000): ~ Previous (^0055FF"+((.@style!=1)?.@style-1:.@styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
        switch(select(.@menu$)) {
            case 1: set .@style, ((.@style!=.@styles[.@s])?.@style+1:1); break;
            case 2: set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]); break;
            case 3: message strcharinfo(0),"Choose a style between 1 - "+.@styles[.@s]+".";
                input .@style,0,.@styles[.@s];
                if (!.@style) set .@style, rand(1,.@styles[.@s]);
                break;
            case 4: set .@style, .@Revert; setlook .@Look[.@s], .@Revert; break;
        }
    }
}
 
Viewed 922 times, submitted by karazu.