hair_dyer.txt 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. //= 1.6 Moving NPC Jovovich to Pre-Renewal [JohnnyPlayy]
  19. //============================================================
  20. prt_in,243,168,4 script Jovovich 91,{
  21. mes "[Hairdresser Jovovich]";
  22. mes "Welcome~!";
  23. mes "How may I help you?";
  24. next;
  25. mes "[Hairdresser Jovovich]";
  26. 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.";
  27. else {
  28. if (rand(20) > 11) {
  29. 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.";
  30. next;
  31. mes "[Hairdresser Jovovich]";
  32. mes "Would you let me treat your hair? Please?";
  33. }
  34. else mes "Wow! Your hair would be perfect once it's dyed~ How about dying your hair for a change?";
  35. }
  36. next;
  37. while(1) {
  38. switch(select("Dye Hair:Tips and Information:Cancel")) {
  39. case 1:
  40. mes "[Hairdresser Jovovich]";
  41. mes "Yes yes, good choice~";
  42. mes "Well then, this is your chance for a make-over, your chance to blossom in beauty! Choose the color you would like.";
  43. next;
  44. while(1) {
  45. if (.@choose_success == 1) {
  46. mes "[Hairdresser Jovovich]";
  47. mes "What do you think? Did you want a different color?";
  48. next;
  49. if (select("Yes:No") == 1) {
  50. mes "[Hairdresser Jovovich]";
  51. mes "Okay! Choose the color that you would like.";
  52. next;
  53. }
  54. else {
  55. mes "[Hairdresser Jovovich]";
  56. 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~";
  57. close;
  58. }
  59. }
  60. while(1) {
  61. 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.")) {
  62. case 1: set .@headpalette,8; break;
  63. case 2: set .@headpalette,1; break;
  64. case 3: set .@headpalette,2; break;
  65. case 4: set .@headpalette,3; break;
  66. case 5: set .@headpalette,4; break;
  67. case 6: set .@headpalette,5; break;
  68. case 7: set .@headpalette,6; break;
  69. case 8: set .@headpalette,7; break;
  70. case 9:
  71. if (.@choose_success != 0) {
  72. mes "[Hairdresser Jovovich]";
  73. mes "You must like your hair color~";
  74. close;
  75. }
  76. mes "[Hairdresser Jovovich]";
  77. mes "Eehh~? You're not going to dye your hair? I'm a little sad...";
  78. close;
  79. }
  80. if (.@headpalette == getlook(VAR_HEADPALETTE)) {
  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,980,"orange"; break;
  90. case 4: callsub S_NoDye,979,"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. switch(.@headpalette) {
  102. case 1: delitem 976,1; break; //Lemon_Dyestuffs
  103. case 2: delitem 978,1; break; //Violet_Dyestuffs
  104. case 3: delitem 980,1; break; //Orange_Dyestuffs
  105. case 4: delitem 979,1; break; //Darkgreen_Dyestuffs
  106. case 5: delitem 981,1; break; //Cobaltblue_Dyestuffs
  107. case 6: delitem 982,1; break; //White_Dyestuffs
  108. case 7: delitem 983,1; break; //Black_Dyestuffs
  109. case 8: delitem 975,1; break; //Scarlet_Dyestuffs
  110. }
  111. set Zeny, Zeny-1000;
  112. setlook VAR_HEADPALETTE,.@headpalette;
  113. set .@choose_success,1;
  114. break;
  115. }
  116. }
  117. }
  118. case 2:
  119. mes "[Hairdresser Jovovich]";
  120. 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...";
  121. next;
  122. mes "[Hairdresser Jovovich]";
  123. 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.";
  124. next;
  125. mes "[Hairdresser Jovovich]";
  126. mes "And try not to worry too much about the fee. Acquiring beauty is the same as acquiring everything. Hehe~";
  127. next;
  128. mes "[Hairdresser Jovovich]";
  129. mes "* Fees and Information *";
  130. mes "- 1 Dyestuffs item of the color of hair you want.";
  131. mes "- 1000 zeny fee.";
  132. close;
  133. case 3:
  134. mes "[Hairdresser Jovovich]";
  135. mes "Men or Women...";
  136. mes "Everyone has the right and obligation to be beautiful.";
  137. close;
  138. }
  139. }
  140. S_NoDye:
  141. if (countitem(getarg(0)) == 0) {
  142. mes "[Hairdresser Jovovich]";
  143. mes "Eh?! But you need the item '"+getitemname(getarg(0))+"' to dye your hair "+getarg(1)+"...";
  144. close;
  145. }
  146. return;
  147. }