OSDN Git Service

First version
[st-ro/stro.git] / npc / merchants / clothes_dyer.txt
1 //===== rAthena Script ======================================= 
2 //= Clothes Dyer
3 //===== By: ================================================== 
4 //= Usnul
5 //===== Current Version: ===================================== 
6 //= 2.5
7 //===== Compatible With: ===================================== 
8 //= rAthena Project
9 //===== Description: ========================================= 
10 //= Clothes dyer with standard palletes
11 //===== Additional Comments: ================================= 
12 //= Fully working
13 //= 2.1 Shortened some labels to make this script loading,
14 //= Added Black+White Colors desc [Lupus]
15 //= 2.1a added adv classes + baby class support [Lupus]
16 //= 2.2 Spell checked. [Nexon]
17 //= 2.3 Fixed dis $hit! [Poki#3]
18 //= 2.4 Disabled cloth dyeing since it's not implemented
19 //         on official servers and cause your client to crash
20 //         [Playtester]
21 //= 2.5 Optimized. [Euphy]
22 //============================================================
23
24 prt_in,284,168,2        script  Dyer Ginedin Rephere    55,{
25 function Dyes;
26
27         set .@EnableDyes,1;     // Disable (set to 0) if palettes cause errors [see note v2.4]
28
29         set .n$,"[Dyer Ginedin Rephere]";
30         mes .n$;
31         mes "11... 12... Mmm... good. I think I'll be able to finish before tonight's party. Oh! I didn't notice you were here!";
32         while(1) {
33                 next;
34                 mes .n$;
35                 mes "How may I assist you?";
36                 next;
37                 switch(select("- Talk:- Dye Clothing:- Price List:- ^777777Cancel^000000")) {
38                 case 1:
39                         mes .n$;
40                         mes "Life may have gotten a bit better, but when I look at all of the orders I've received... Whew!";
41                         mes "It seems that the young women of Rune Midgard must be very well off these days.";
42                         next;
43                         mes .n$;
44                         mes "Not that I think that they are indulging in anything luxurious, mind you.";
45                         mes "I don't think there is anything wrong with the pursuit of beauty and being fashionable.";
46                         next;
47                         mes .n$;
48                         mes "For us humans, who have no colorful fur or decorative scales, clothes are one of the few ways we have to display our personality, style, and beauty.";
49                         next;
50                         mes .n$;
51                         mes "Haha... When I think about it, I really feel that my job is worthwhile.  I believe that I provide a service that the people desire.";
52                         next;
53                         mes .n$;
54                         mes "Can you feel it too? The energy that is released when rough fabric and leather are brought to life with color?.....";
55                         next;
56                         mes .n$;
57                         mes "Although the process is very tedious and time consuming, the joy and happiness I feel when a dress is finished more than makes up for all of the hard work!!";
58                         break;
59                 case 2:
60                         mes .n$;
61                         if (!.@EnableDyes) {
62                                 mes "Sorry, I'm too busy with other jobs to dye your clothes.";
63                                 break;
64                         }
65                         mes "Oh... you need my work? Well... okay, sounds good.";
66                         next;
67                         mes .n$;
68                         mes "Please choose a color";
69                         mes "that suits you.";
70                         next;
71
72                         // Dyes(<color value>,<dye number>{,...});
73                         // Colors: [1]Orange, [2]Violet, [3]Red, [4]Black, [5]Green, [6]Blue, [7]White, [8]Yellow
74                         switch(BaseJob) {
75                         case Job_Novice:
76                                 if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(6,1,3,2,5,3,4,4);
77                         case Job_Swordman:
78                                 if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(3,1,5,3,4,4);
79                         case Job_Mage:
80                                 if (Sex == SEX_MALE) Dyes(3,1,2,2,1,3,7,4); else Dyes(3,1,2,2,7,3,4,4);
81                         case Job_Archer:
82                                 if (Sex == SEX_MALE) Dyes(4,1,2,2,5,3); else Dyes(3,1,5,2,7,3,4,4);
83                         case Job_Acolyte:
84                                 if (Sex == SEX_MALE) Dyes(6,1,3,2,7,3,4,4); else Dyes(3,1,5,3,4,4);
85                         case Job_Merchant:
86                                 if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(2,1,5,3,4,4);
87                         case Job_Thief:
88                                 if (Sex == SEX_MALE) Dyes(5,1,3,2,7,4); else Dyes(3,1,7,3,4,4);
89                         case Job_Knight:
90                         case Job_Crusader:
91                                 if (Sex == SEX_MALE) Dyes(2,1,3,3,4,4); else Dyes(6,1,7,3,4,4);
92                         case Job_Priest:
93                         case Job_Monk:
94                                 if (Sex == SEX_MALE) Dyes(6,1,5,2,3,3,7,4); else Dyes(3,1,5,2,7,3,4,4);
95                         case Job_Wizard:
96                         case Job_Sage:
97                                 if (Sex == SEX_MALE) Dyes(6,1,5,3,4,4); else Dyes(3,1,6,2,7,3,5,4);
98                         case Job_Blacksmith:
99                         case Job_Alchemist:
100                                 if (Sex == SEX_MALE) Dyes(4,4,5,2,7,3); else Dyes(3,1,5,2,2,3,4,4);
101                         case Job_Hunter:
102                         case Job_Bard:
103                         case Job_Dancer:
104                                 if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(6,1,5,3,2,4);
105                         case Job_Assassin:
106                         case Job_Rogue:
107                                 if (Sex == SEX_MALE) Dyes(6,1); else Dyes(4,1,8,2,7,3);
108                         case Job_Super_Novice:
109                                 if (Sex == SEX_MALE) Dyes(2,1,6,2,5,3,4,4); else Dyes(6,1,3,2,5,3,4,4);
110                         default: 
111                                 mes "Wow, I've never seen clothes like that before! I'm sorry, but I don't think I can paint it.";
112                                 close;
113                         }
114                 case 3:
115                         mes .n$;
116                         mes "Each color costs 10000z and 1 dye:";
117                         mes " ";
118                         mes " - ^FF4422Red^000000: Scarlet Dyestuffs";
119                         mes " - ^D5A500Yellow^000000: Lemon Dyestuffs";
120                         mes " - ^AA00AAViolet^000000: Violet Dyestuffs";
121                         mes " - ^FF8800Orange^000000: Orange Dyestuffs";
122                         mes " - ^4422FFBlue^000000: CobaltBlue Dyestuffs";
123                         mes " - ^009500Green^000000: DarkGreen Dyestuffs";
124                         mes " - Black: Black Dyestuffs";
125                         mes " - White: White Dyestuffs";
126                         break;
127                 case 4:
128                         goto L_End;
129                 }
130         }
131
132 L_End:
133         mes .n$;
134         mes "Make yourself at home. Even though I don't have time for you.";
135         close;
136
137 function Dyes {
138         setarray .@DyeName$[0],"the default color","Orange","Violet","Red","Black","Green","Blue","White","Yellow";
139         setarray .@DyeItems[0],0,980,981,975,983,979,978,982,976;
140         set .@menu$,"- Default:";
141         for(set .@i,0; .@i<getargcount(); set .@i,.@i+2)
142                 set .@menu$, .@menu$+"- "+.@DyeName$[getarg(.@i)]+":";
143         set .@menu$, .@menu$+"- ^777777Cancel^000000";
144         set .@s, select(.@menu$)-1;
145         if (.@s == (getargcount()/2)+1) goto L_End;
146         mes .n$;
147         if (.@s == 0) {
148                 mes "I can change your dye to";
149                 mes "the default for free.";
150                 mes "Are you sure?";
151                 next;
152                 switch(select("Yes:No")) {
153                 case 1:
154                         mes .n$;
155                         setlook 7,0;
156                         mes "Your clothes have been dyed "+.@DyeName$[0]+".";
157                         close;
158                 case 2:
159                         goto L_End;
160                 }
161         }
162         if (!countitem(.@DyeItems[getarg((.@s-1)*2)])) {
163                 mes "For me to dye your clothes, I'll need the appropriate Dyestuffs. Please check my price list for the information.";
164                 close;
165         }
166         if (Zeny < 10000) {
167                 mes "I'm sorry, but you don't have enough money.";
168                 close;
169         }
170         delitem .@DyeItems[getarg((.@s-1)*2)],1;
171         set Zeny, Zeny-10000;
172         setlook 7, ((.@s)?(getarg((.@s-1)*2+1)):0);
173         mes "Your clothes have been dyed "+((.@s)?.@DyeName$[getarg((.@s-1)*2)]:.@DyeName$[0])+".";
174         close;
175 }
176 }