1 | //===== eAthena Script ======================================= |
---|
2 | //= Hair Dyer |
---|
3 | //===== By: ================================================== |
---|
4 | //= kobra_k88; L0ne_W0lf |
---|
5 | //===== Current Version: ===================================== |
---|
6 | //= 1.3 |
---|
7 | //===== Compatible With: ===================================== |
---|
8 | //= eAthena SVN |
---|
9 | //===== Description: ========================================= |
---|
10 | //= Hair Dyer with standard palletes |
---|
11 | //===== Additional Comments: ================================= |
---|
12 | //= Fully working |
---|
13 | //= 1.1 Bugfix: fixed missing menu label LEnd->M_End [Lupus] |
---|
14 | //= 1.2 Rescripted to Aegis 10.3 standards. [L0ne_W0lf] |
---|
15 | //= 1.3 Fixed problem what "freezes" the NPC. (bugreport:509) [Samuray22] |
---|
16 | //============================================================ |
---|
17 | |
---|
18 | prt_in,243,168,4 script Jovovich 91,{ |
---|
19 | mes "[Hairdresser Jovovich]"; |
---|
20 | mes "Welcome~!"; |
---|
21 | mes "How may I help you?"; |
---|
22 | next; |
---|
23 | mes "[Hairdresser Jovovich]"; |
---|
24 | if (sex) mes "Oh, no! Your hair is damaged. It seems as if you may need professional treatment. Come sit over here, please. Come."; |
---|
25 | else { |
---|
26 | if (rand(20) > 11) { |
---|
27 | mes "Eh!? Oh my! Oh no no no no! Your hair is sooo damaged! It's not good if you leave your hair like this."; |
---|
28 | next; |
---|
29 | mes "[Hairdresser Jovovich]"; |
---|
30 | mes "Would you let me treat your hair? Please?"; |
---|
31 | } |
---|
32 | else mes "Wow! Your hair would be perfect once it's dyed~ How about dying your hair for a change?"; |
---|
33 | } |
---|
34 | next; |
---|
35 | while(1) { |
---|
36 | switch(select("Dye Hair:Tips and Information:Cancel")) { |
---|
37 | case 1: |
---|
38 | mes "[Hairdresser Jovovich]"; |
---|
39 | mes "Yes yes, good choice~"; |
---|
40 | mes "Well then, this is your chance for a make-over, your chance to blossom in beauty! Choose the color you would like."; |
---|
41 | next; |
---|
42 | while(1) { |
---|
43 | if (.@choose_success == 1) { |
---|
44 | mes "[Hairdresser Jovovich]"; |
---|
45 | mes "What do you think? Did you want a different color?"; |
---|
46 | next; |
---|
47 | if (select("Yes:No") == 1) { |
---|
48 | mes "[Hairdresser Jovovich]"; |
---|
49 | mes "Okay! Choose the color that you would like."; |
---|
50 | next; |
---|
51 | } |
---|
52 | else { |
---|
53 | mes "[Hairdresser Jovovich]"; |
---|
54 | mes "Hmm, I'm sort of disappointed. I wanted to do a better job. But I promise I'll do it better next time. Please come again~"; |
---|
55 | close; |
---|
56 | } |
---|
57 | } |
---|
58 | |
---|
59 | while(1) { |
---|
60 | switch(select("Red, please.:Yellow, please.:Violet, please.:Orange, please.:Green, please.:Blue, please.:White, please.:Black, please.:Actually, I like my hair as it is.")) { |
---|
61 | case 1: set .@headpalette,8; break; |
---|
62 | case 2: set .@headpalette,1; break; |
---|
63 | case 3: set .@headpalette,2; break; |
---|
64 | case 4: set .@headpalette,3; break; |
---|
65 | case 5: set .@headpalette,4; break; |
---|
66 | case 6: set .@headpalette,5; break; |
---|
67 | case 7: set .@headpalette,6; break; |
---|
68 | case 8: set .@headpalette,7; break; |
---|
69 | case 9: |
---|
70 | if (.@choose_success != 0) { |
---|
71 | mes "[Hairdresser Jovovich]"; |
---|
72 | mes "You must like your hair color~"; |
---|
73 | close; |
---|
74 | } |
---|
75 | mes "[Hairdresser Jovovich]"; |
---|
76 | mes "Eehh~? You're not going to dye your hair? I'm a little sad..."; |
---|
77 | close; |
---|
78 | } |
---|
79 | |
---|
80 | if (.@headpalette == getlook(7)) { |
---|
81 | mes "[Hairdresser Jovovich]"; |
---|
82 | mes "Eh? But that's the hair color you already have. Please choose a different color."; |
---|
83 | next; |
---|
84 | } |
---|
85 | else { |
---|
86 | switch(.@headpalette) { |
---|
87 | case 1: callsub S_NoDye,976,"yellow"; break; |
---|
88 | case 2: callsub S_NoDye,978,"violet"; break; |
---|
89 | case 3: callsub S_NoDye,979,"orange"; break; |
---|
90 | case 4: callsub S_NoDye,980,"green"; break; |
---|
91 | case 5: callsub S_NoDye,981,"blue"; break; |
---|
92 | case 6: callsub S_NoDye,982,"white"; break; |
---|
93 | case 7: callsub S_NoDye,983,"black"; break; |
---|
94 | Case 8: callsub S_NoDye,975,"red"; break; |
---|
95 | } |
---|
96 | if (zeny < 1000) { |
---|
97 | mes "[Hairdresser Jovovich]"; |
---|
98 | mes "The fee is 1000 zeny. Do you not have enough...?"; |
---|
99 | close; |
---|
100 | } |
---|
101 | |
---|
102 | switch(.@headpalette) { |
---|
103 | case 1: delitem 976,1; break; //Lemon_Dyestuffs |
---|
104 | case 2: delitem 978,1; break; //Violet_Dyestuffs |
---|
105 | case 3: delitem 979,1; break; //Orange_Dyestuffs |
---|
106 | case 4: delitem 980,1; break; //Darkgreen_Dyestuffs |
---|
107 | case 5: delitem 981,1; break; //Cobaltblue_Dyestuffs |
---|
108 | case 6: delitem 982,1; break; //White_Dyestuffs |
---|
109 | case 7: delitem 983,1; break; //Black_Dyestuffs |
---|
110 | case 8: delitem 975,1; break; //Scarlet_Dyestuffs |
---|
111 | } |
---|
112 | set Zeny,Zeny-1000; |
---|
113 | setlook 6,.@headpalette; |
---|
114 | set .@choose_success,1; |
---|
115 | break; |
---|
116 | } |
---|
117 | |
---|
118 | } |
---|
119 | |
---|
120 | } |
---|
121 | |
---|
122 | case 2: |
---|
123 | mes "[Hairdresser Jovovich]"; |
---|
124 | mes "When you're feeling down , when you get dumped, when you want to impress someone, or even when you just want to stand out..."; |
---|
125 | next; |
---|
126 | mes "[Hairdresser Jovovich]"; |
---|
127 | mes "For that special place and time, wouldn't you want a hairstyle of your very own? As long as you have the appropriate dyestuffs, I will make your hair look wonderful."; |
---|
128 | next; |
---|
129 | mes "[Hairdresser Jovovich]"; |
---|
130 | mes "And try not to worry too much about the fee. Acquiring beauty is the same as acquiring everything. Hehe~"; |
---|
131 | next; |
---|
132 | mes "[Hairdresser Jovovich]"; |
---|
133 | mes "* Fees and Information *"; |
---|
134 | mes "- 1 Dyestuffs item of the color of hair you want."; |
---|
135 | mes "- 1000 zeny fee."; |
---|
136 | break; |
---|
137 | |
---|
138 | case 3: |
---|
139 | mes "[Hairdresser Jovovich]"; |
---|
140 | mes "Men or Women..."; |
---|
141 | mes "Everyone has the right and obligation to be beautiful."; |
---|
142 | close; |
---|
143 | } |
---|
144 | |
---|
145 | } |
---|
146 | |
---|
147 | S_NoDye: |
---|
148 | if (countitem(getarg(0)) == 0) { |
---|
149 | mes "[Hairdresser Jovovich]"; |
---|
150 | mes "Eh?! But you need the item '"+getitemname(getarg(0))+"' to dye your hair "+getarg(1)+"..."; |
---|
151 | close; |
---|
152 | } |
---|
153 | return; |
---|
154 | } |
---|