viewing paste Stylist | 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 111 112
//===== eAthena Script ======================================= 
//= Stylist
//===== By: ================================================== 
//= Saithis
//===== Credits: =============================================
//= eAthena Dev team (some of the text)
//===== Current Version: ===================================== 
//= 1.2
//===== Compatible With: ===================================== 
//= eAthena SVN 
//===== Description: ========================================= 
//= Revised dye NPC
//===== TODO: ================================================
// - Implement price for look change
//===== Additional Comments: =================================
//= v1.0 - First release [Saithis]
//= v1.1 - The NPC remebers now the direction (keep going - go back) [Saithis]
//= v1.2 - Use getbattleflag to get max values [Saithis]
//============================================================ 
 
prontera,183,213,3  script  Stylist 122,{
    mes "[^FF8000Stylist^000000]";
    mes "I'm the greatest stylist in all of Rune-Midgard~~!";
    mes "I can change your hair style or color!";
    mes "What do you wish to change?";
    next;
    switch(select("Hair style:Hair color:Cloth color:Nothing")){
    case 1:
        set .@what,1;
        set .@min,getbattleflag("min_hair_style");
        set .@max,getbattleflag("max_hair_style");
        set .@what$,"hairstyle";
        break;
    case 2:
        set .@what,6;
        set .@min,getbattleflag("min_hair_color");
        set .@max,getbattleflag("max_hair_color");
        set .@what$,"haircolor";
        break;
    case 3:
        set .@what,7;
        set .@min,getbattleflag("min_cloth_color");
        set .@max,getbattleflag("max_cloth_color");
        set .@what$,"cloth color";
        break;
    default:
        mes "[^FF8000Stylist^000000]";
        mes "Well come again.";
        close;
    }
    mes "[^FF8000Stylist^000000]";
    mes "Do you want to browse through the choices, or do you know what you want?";
    next;
    if(select("Browse:I know what I want") == 2){
        mes "[^FF8000Stylist^000000]";
        mes "Great!  Now just pick a "+.@what$+" and I'll get started!";
        next;
        mes "[^FF8000Stylist^000000]";
        mes "Please pick a "+.@what$+" number ^0000FFbetween "+.@min+" and "+.@max+"^000000.";
        mes "Number "+.@min+", by the way, is the default "+.@what$+" for your character.";
        next;
        while(1){
            input .@set,.@min,.@max;
            setlook .@what,.@set;
            mes "[^FF8000Stylist^000000]";
            mes "Is this good, or do you want a different "+.@what$+"?";
            next;
            if(select("This is good:Different "+.@what$+", please") == 1) break;
        }
    } else {
        mes "[^FF8000Stylist^000000]";
        mes "Okay, here we go~! Just stop me when you see something you like, okay?";
        set .@look,.@min;
        while(1){
            next;
            mes "[^FF8000Stylist^000000]";
            setlook .@what,.@look;
            mes "This is "+.@what$+" Number^FF9009 "+.@look+" ^000000!"; 
            if(.@look == .@min) 
                select("Keep going::I like this one");
            else if(.@look == .@max) 
                select(":Go back:I like this one");
            else if(.@direction) 
                select("Go back:Keep going:I like this one");
            else 
                select("Keep going:Go back:I like this one");
            if(.@direction && !(.@look == .@max || .@look == .@min)) {
                if(@menu == 1) {
                    set .@look,.@look-1;
                    set .@direction,1;
                } else if(@menu == 2) {
                    set .@look,.@look+1;
                    set .@direction,0;
                } else 
                    break;
            } else {
                if(@menu == 1) {
                    set .@look,.@look+1;
                    set .@direction,0;
                } else if(@menu == 2) {
                    set .@look,.@look-1;
                    set .@direction,1;
                } else 
                    break;
            }
        }
    }
    next;
    mes "[^FF8000Stylist^000000]";
    mes "You look great~!  I love it~! ^_^";
    close;
}
Viewed 514 times, submitted by Guest.