hair_dyer.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. //===== rAthena Script =======================================
  2. //= Hair Dyer
  3. //===== By: ==================================================
  4. //= kobra_k88; L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.5
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  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. //= 1.4 Fixed getlook checking the wrong color. (bugreport:2392) [L0ne_W0lf]
  17. //= 1.5 Added Lighthalzen Hair Dying NPC. [L0ne_W0lf]
  18. //============================================================
  19. prt_in,243,168,4 script Jovovich 91,{
  20. mes "[Hairdresser Jovovich]";
  21. mes "Welcome~!";
  22. mes "How may I help you?";
  23. next;
  24. mes "[Hairdresser Jovovich]";
  25. if (Sex == SEX_MALE) mes "Oh, no! Your hair is damaged. It seems as if you may need professional treatment. Come sit over here, please. Come.";
  26. else {
  27. if (rand(20) > 11) {
  28. 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.";
  29. next;
  30. mes "[Hairdresser Jovovich]";
  31. mes "Would you let me treat your hair? Please?";
  32. }
  33. else mes "Wow! Your hair would be perfect once it's dyed~ How about dying your hair for a change?";
  34. }
  35. next;
  36. while(1) {
  37. switch(select("Dye Hair:Tips and Information:Cancel")) {
  38. case 1:
  39. mes "[Hairdresser Jovovich]";
  40. mes "Yes yes, good choice~";
  41. mes "Well then, this is your chance for a make-over, your chance to blossom in beauty! Choose the color you would like.";
  42. next;
  43. while(1) {
  44. if (.@choose_success == 1) {
  45. mes "[Hairdresser Jovovich]";
  46. mes "What do you think? Did you want a different color?";
  47. next;
  48. if (select("Yes:No") == 1) {
  49. mes "[Hairdresser Jovovich]";
  50. mes "Okay! Choose the color that you would like.";
  51. next;
  52. }
  53. else {
  54. mes "[Hairdresser Jovovich]";
  55. 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~";
  56. close;
  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. if (.@headpalette == getlook(VAR_HEADPALETTE)) {
  80. mes "[Hairdresser Jovovich]";
  81. mes "Eh? But that's the hair color you already have. Please choose a different color.";
  82. next;
  83. }
  84. else {
  85. switch(.@headpalette) {
  86. case 1: callsub S_NoDye,976,"yellow"; break;
  87. case 2: callsub S_NoDye,978,"violet"; break;
  88. case 3: callsub S_NoDye,980,"orange"; break;
  89. case 4: callsub S_NoDye,979,"green"; break;
  90. case 5: callsub S_NoDye,981,"blue"; break;
  91. case 6: callsub S_NoDye,982,"white"; break;
  92. case 7: callsub S_NoDye,983,"black"; break;
  93. case 8: callsub S_NoDye,975,"red"; break;
  94. }
  95. if (Zeny < 1000) {
  96. mes "[Hairdresser Jovovich]";
  97. mes "The fee is 1000 zeny. Do you not have enough...?";
  98. close;
  99. }
  100. switch(.@headpalette) {
  101. case 1: delitem 976,1; break; //Lemon_Dyestuffs
  102. case 2: delitem 978,1; break; //Violet_Dyestuffs
  103. case 3: delitem 980,1; break; //Orange_Dyestuffs
  104. case 4: delitem 979,1; break; //Darkgreen_Dyestuffs
  105. case 5: delitem 981,1; break; //Cobaltblue_Dyestuffs
  106. case 6: delitem 982,1; break; //White_Dyestuffs
  107. case 7: delitem 983,1; break; //Black_Dyestuffs
  108. case 8: delitem 975,1; break; //Scarlet_Dyestuffs
  109. }
  110. set Zeny, Zeny-1000;
  111. setlook VAR_HEADPALETTE,.@headpalette;
  112. set .@choose_success,1;
  113. break;
  114. }
  115. }
  116. }
  117. case 2:
  118. mes "[Hairdresser Jovovich]";
  119. 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...";
  120. next;
  121. mes "[Hairdresser Jovovich]";
  122. 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.";
  123. next;
  124. mes "[Hairdresser Jovovich]";
  125. mes "And try not to worry too much about the fee. Acquiring beauty is the same as acquiring everything. Hehe~";
  126. next;
  127. mes "[Hairdresser Jovovich]";
  128. mes "* Fees and Information *";
  129. mes "- 1 Dyestuffs item of the color of hair you want.";
  130. mes "- 1000 zeny fee.";
  131. break;
  132. case 3:
  133. mes "[Hairdresser Jovovich]";
  134. mes "Men or Women...";
  135. mes "Everyone has the right and obligation to be beautiful.";
  136. close;
  137. }
  138. }
  139. S_NoDye:
  140. if (countitem(getarg(0)) == 0) {
  141. mes "[Hairdresser Jovovich]";
  142. mes "Eh?! But you need the item '"+getitemname(getarg(0))+"' to dye your hair "+getarg(1)+"...";
  143. close;
  144. }
  145. return;
  146. }
  147. // Lighthalzen
  148. lhz_in02,100,134,3 script Hair Dyer#lich 850,{
  149. mes "[Rossa]";
  150. if (Sex == SEX_MALE) {
  151. mes "Welcome, come in~";
  152. mes "Oh, I see that you take";
  153. mes "much better care of your";
  154. mes "hair than those other boys.";
  155. mes "Now would you like to dye";
  156. mes "your hair another color?";
  157. }
  158. else {
  159. mes "Oh, wow~ Where did";
  160. mes "you get your hair styled?";
  161. mes "I love it! But... It would";
  162. mes "be even more beautiful if";
  163. mes "you dyed your hair. What";
  164. mes "do you think about that?";
  165. }
  166. while (.@choose_success != 2) {
  167. next;
  168. switch(select("Dye Hair:Coloring Information:Cancel")) {
  169. case 1:
  170. mes "[Rossa]";
  171. mes "Ho ho ho ho~";
  172. mes "So which color would";
  173. mes "you like to try? Something";
  174. mes "vivid or dark? Sexy or cute?";
  175. next;
  176. while (.@choose_success != 2) {
  177. if (.@choose_success == 1) {
  178. mes "[Rossa]";
  179. mes "Ooh, I like this color!";
  180. mes "But would you like to";
  181. mes "try a different one?";
  182. next;
  183. switch(select("Yes:No")) {
  184. case 1:
  185. mes "[Rossa]";
  186. mes "Please select";
  187. mes "another color~";
  188. next;
  189. break;
  190. case 2:
  191. mes "[Rossa]";
  192. mes "An excellent choice~";
  193. mes "Alright then, thank you";
  194. mes "for using my service and";
  195. mes "I hope you come by again!";
  196. close2;
  197. set .@choose_success,2;
  198. break;
  199. }
  200. }
  201. while (.@choose_success != 2) {
  202. switch(select("Red, please.:Yellow, please.:Purple, please.:Orange, please.:Green, please.:Blue, please.:White, please.:Dark Brown, please.:I like my hair color.")) {
  203. case 1:
  204. set .@headpalette,8;
  205. break;
  206. case 2:
  207. set .@headpalette,1;
  208. break;
  209. case 3:
  210. set .@headpalette,2;
  211. break;
  212. case 4:
  213. set .@headpalette,3;
  214. break;
  215. case 5:
  216. set .@headpalette,4;
  217. break;
  218. case 6:
  219. set .@headpalette,5;
  220. break;
  221. case 7:
  222. set .@headpalette,6;
  223. break;
  224. case 8:
  225. set .@headpalette,7;
  226. break;
  227. case 9:
  228. if (.@choose_success != 0) {
  229. mes "[Rossa]";
  230. mes "Are you sure?";
  231. mes "Alright then, you";
  232. mes "know what's best for";
  233. mes "your beauty and to tell";
  234. mes "the truth, I agree with you~";
  235. close2;
  236. set .@choose_success,2;
  237. }
  238. else {
  239. mes "[Rossa]";
  240. mes "Oh, I see. Still, I can't";
  241. mes "help but feel so disappointed.";
  242. mes "You'd look so good if you dyed";
  243. mes "your hair a different color~";
  244. close2;
  245. set .@choose_success,2;
  246. }
  247. break;
  248. }
  249. if (getlook(VAR_HEADPALETTE) == .@headpalette) {
  250. mes "[Rossa]";
  251. mes "Hmm, your hair color";
  252. mes "is still fine, so there's";
  253. mes "no need to dye it the same";
  254. mes "color again, if that's what";
  255. mes "you're worried about.";
  256. next;
  257. }
  258. else {
  259. if ((.@headpalette == 8) && (countitem(975) == 0)) {
  260. mes "[Rossa]";
  261. mes "Oh, I'm sorry dear,";
  262. mes "but I can't dye your";
  263. mes "hair if you didn't bring";
  264. mes "Scarlet Dyestuffs with you...";
  265. close2;
  266. set .@choose_success,2;
  267. break;
  268. }
  269. else if ((.@headpalette == 1) && (countitem(976) == 0)) {
  270. mes "[Rossa]";
  271. mes "Oh, I'm sorry dear,";
  272. mes "but I can't dye your";
  273. mes "hair if you didn't bring";
  274. mes "Lemon Dyestuffs with you...";
  275. close2;
  276. set .@choose_success,2;
  277. break;
  278. }
  279. else if ((.@headpalette == 2) && (countitem(981) == 0)) {
  280. mes "[Rossa]";
  281. mes "Oh, I'm sorry dear,";
  282. mes "but I can't dye your";
  283. mes "hair if you didn't bring";
  284. mes "Violet Dyestuffs with you...";
  285. close2;
  286. set .@choose_success,2;
  287. break;
  288. }
  289. else if ((.@headpalette == 3) && (countitem(980) == 0)) {
  290. mes "[Rossa]";
  291. mes "Oh, I'm sorry dear,";
  292. mes "but I can't dye your";
  293. mes "hair if you didn't bring";
  294. mes "Orange Dyestuffs with you...";
  295. close2;
  296. set .@choose_success,2;
  297. break;
  298. }
  299. else if ((.@headpalette == 4) && (countitem(979) == 0)) {
  300. mes "[Rossa]";
  301. mes "Oh, I'm sorry dear,";
  302. mes "but I can't dye your";
  303. mes "hair if you didn't bring";
  304. mes "Darkgreen Dyestuffs";
  305. mes "with you. Would you come";
  306. mes "back after you get some?";
  307. close2;
  308. set .@choose_success,2;
  309. break;
  310. }
  311. else if ((.@headpalette == 5) && (countitem(978) == 0)) {
  312. mes "[Rossa]";
  313. mes "Oh, I'm sorry dear,";
  314. mes "but I can't dye your";
  315. mes "hair if you didn't bring";
  316. mes "Cobaltblue Dyestuffs";
  317. mes "with you. Would you come";
  318. mes "back after you get some?";
  319. close2;
  320. set .@choose_success,2;
  321. break;
  322. }
  323. else if ((.@headpalette == 6) && (countitem(982) == 0)) {
  324. mes "[Rossa]";
  325. mes "Oh, I'm sorry dear,";
  326. mes "but I can't dye your";
  327. mes "hair if you didn't bring";
  328. mes "White Dyestuffs with you...";
  329. close2;
  330. set .@choose_success,2;
  331. break;
  332. }
  333. else if ((.@headpalette == 7) && (countitem(983) == 0)) {
  334. mes "[Rossa]";
  335. mes "Oh, I'm sorry dear,";
  336. mes "but I can't dye your";
  337. mes "hair if you didn't bring";
  338. mes "Black Dyestuffs with you...";
  339. close2;
  340. set .@choose_success,2;
  341. break;
  342. }
  343. if (Zeny < 1000) {
  344. mes "[Rossa]";
  345. mes "Oh, I'm so sorry dear,";
  346. mes "but my service fee is";
  347. mes "1,000 zeny. Did you forget";
  348. mes "to bring your money with you?";
  349. close2;
  350. set .@choose_success,2;
  351. break;
  352. }
  353. if (.@headpalette == 8) delitem 975,1; //Scarlet_Dyestuffs
  354. else if (.@headpalette == 1) delitem 976,1; //Lemon_Dyestuffs
  355. else if (.@headpalette == 2) delitem 981,1; //Violet_Dyestuffs
  356. else if (.@headpalette == 3) delitem 980,1; //Orange_Dyestuffs
  357. else if (.@headpalette == 4) delitem 979,1; //Darkgreen_Dyestuffs
  358. else if (.@headpalette == 5) delitem 978,1; //Cobaltblue_Dyestuffs
  359. else if (.@headpalette == 6) delitem 982,1; //White_Dyestuffs
  360. else if (.@headpalette == 7) delitem 983,1; //Black_Dyestuffs
  361. set Zeny, Zeny-1000;
  362. setlook VAR_HEADPALETTE,.@headpalette;
  363. set .@choose_success,1;
  364. break;
  365. }
  366. }
  367. }
  368. break;
  369. case 2:
  370. mes "[Rossa]";
  371. mes "When you're feeling";
  372. mes "down, when you just want";
  373. mes "to look nice for the one you";
  374. mes "love, or when you just want";
  375. mes "a different look, why don't";
  376. mes "you dye your hair?";
  377. next;
  378. mes "[Rossa]";
  379. mes "All you need is one";
  380. mes "Dyestuffs item of the";
  381. mes "color that you want to";
  382. mes "dye your hair, as well as";
  383. mes "a 1,000 zeny service fee.";
  384. mes "I'm here for your beauty needs~";
  385. break;
  386. case 3:
  387. mes "[Rossa]";
  388. mes "You know, when you";
  389. mes "put some effort into";
  390. mes "your appearance, you'll";
  391. mes "not only look better, but";
  392. mes "you'll feel better about";
  393. mes "yourself. Makes sense, right?";
  394. close;
  395. }
  396. }
  397. close;
  398. }