clothes_dyer.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. prt_in,284,168,2 script Dyer Ginedin Rephere 55,{
  24. function Dyes;
  25. set .@EnableDyes,1; // Disable (set to 0) if palettes cause errors [see note v2.4]
  26. set .n$,"[Dyer Ginedin Rephere]";
  27. mes .n$;
  28. 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!";
  29. while(1) {
  30. next;
  31. mes .n$;
  32. mes "How may I assist you?";
  33. next;
  34. switch(select("- Talk:- Dye Clothing:- Price List:- ^777777Cancel^000000")) {
  35. case 1:
  36. mes .n$;
  37. mes "Life may have gotten a bit better, but when I look at all of the orders I've received... Whew!";
  38. mes "It seems that the young women of Rune Midgard must be very well off these days.";
  39. next;
  40. mes .n$;
  41. mes "Not that I think that they are indulging in anything luxurious, mind you.";
  42. mes "I don't think there is anything wrong with the pursuit of beauty and being fashionable.";
  43. next;
  44. mes .n$;
  45. 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.";
  46. next;
  47. mes .n$;
  48. 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.";
  49. next;
  50. mes .n$;
  51. mes "Can you feel it too? The energy that is released when rough fabric and leather are brought to life with color?.....";
  52. next;
  53. mes .n$;
  54. 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!!";
  55. break;
  56. case 2:
  57. mes .n$;
  58. if (!.@EnableDyes) {
  59. mes "Sorry, I'm too busy with other jobs to dye your clothes.";
  60. break;
  61. }
  62. mes "Oh... you need my work? Well... okay, sounds good.";
  63. next;
  64. mes .n$;
  65. mes "Please choose a color";
  66. mes "that suits you.";
  67. next;
  68. // Dyes(<color value>,<dye number>{,...});
  69. // Colors: [1]Orange, [2]Violet, [3]Red, [4]Black, [5]Green, [6]Blue, [7]White, [8]Yellow
  70. switch(BaseJob) {
  71. case Job_Novice:
  72. if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(6,1,3,2,5,3,4,4);
  73. case Job_Swordman:
  74. if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(3,1,5,3,4,4);
  75. case Job_Mage:
  76. if (Sex == SEX_MALE) Dyes(3,1,2,2,1,3,7,4); else Dyes(3,1,2,2,7,3,4,4);
  77. case Job_Archer:
  78. if (Sex == SEX_MALE) Dyes(4,1,2,2,5,3); else Dyes(3,1,5,2,7,3,4,4);
  79. case Job_Acolyte:
  80. if (Sex == SEX_MALE) Dyes(6,1,3,2,7,3,4,4); else Dyes(3,1,5,3,4,4);
  81. case Job_Merchant:
  82. if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(2,1,5,3,4,4);
  83. case Job_Thief:
  84. if (Sex == SEX_MALE) Dyes(5,1,3,2,7,4); else Dyes(3,1,7,3,4,4);
  85. case Job_Knight:
  86. case Job_Crusader:
  87. if (Sex == SEX_MALE) Dyes(2,1,3,3,4,4); else Dyes(6,1,7,3,4,4);
  88. case Job_Priest:
  89. case Job_Monk:
  90. if (Sex == SEX_MALE) Dyes(6,1,5,2,3,3,7,4); else Dyes(3,1,5,2,7,3,4,4);
  91. case Job_Wizard:
  92. case Job_Sage:
  93. if (Sex == SEX_MALE) Dyes(6,1,5,3,4,4); else Dyes(3,1,6,2,7,3,5,4);
  94. case Job_Blacksmith:
  95. case Job_Alchemist:
  96. if (Sex == SEX_MALE) Dyes(4,4,5,2,7,3); else Dyes(3,1,5,2,2,3,4,4);
  97. case Job_Hunter:
  98. case Job_Bard:
  99. case Job_Dancer:
  100. if (Sex == SEX_MALE) Dyes(4,1,6,2,5,3); else Dyes(6,1,5,3,2,4);
  101. case Job_Assassin:
  102. case Job_Rogue:
  103. if (Sex == SEX_MALE) Dyes(6,1); else Dyes(4,1,8,2,7,3);
  104. case Job_Super_Novice:
  105. if (Sex == SEX_MALE) Dyes(2,1,6,2,5,3,4,4); else Dyes(6,1,3,2,5,3,4,4);
  106. default:
  107. mes "Wow, I've never seen clothes like that before! I'm sorry, but I don't think I can paint it.";
  108. close;
  109. }
  110. case 3:
  111. mes .n$;
  112. mes "Each color costs 10000z and 1 dye:";
  113. mes " ";
  114. mes " - ^FF4422Red^000000: Scarlet Dyestuffs";
  115. mes " - ^D5A500Yellow^000000: Lemon Dyestuffs";
  116. mes " - ^AA00AAViolet^000000: Violet Dyestuffs";
  117. mes " - ^FF8800Orange^000000: Orange Dyestuffs";
  118. mes " - ^4422FFBlue^000000: CobaltBlue Dyestuffs";
  119. mes " - ^009500Green^000000: DarkGreen Dyestuffs";
  120. mes " - Black: Black Dyestuffs";
  121. mes " - White: White Dyestuffs";
  122. break;
  123. case 4:
  124. goto L_End;
  125. }
  126. }
  127. L_End:
  128. mes .n$;
  129. mes "Make yourself at home. Even though I don't have time for you.";
  130. close;
  131. function Dyes {
  132. setarray .@DyeName$[0],"the default color","Orange","Violet","Red","Black","Green","Blue","White","Yellow";
  133. setarray .@DyeItems[0],0,980,981,975,983,979,978,982,976;
  134. set .@menu$,"- Default:";
  135. for(set .@i,0; .@i<getargcount(); set .@i,.@i+2)
  136. set .@menu$, .@menu$+"- "+.@DyeName$[getarg(.@i)]+":";
  137. set .@menu$, .@menu$+"- ^777777Cancel^000000";
  138. set .@s, select(.@menu$)-1;
  139. if (.@s == (getargcount()/2)+1) goto L_End;
  140. mes .n$;
  141. if (.@s == 0) {
  142. mes "I can change your dye to";
  143. mes "the default for free.";
  144. mes "Are you sure?";
  145. next;
  146. switch(select("Yes:No")) {
  147. case 1:
  148. mes .n$;
  149. setlook 7,0;
  150. mes "Your clothes have been dyed "+.@DyeName$[0]+".";
  151. close;
  152. case 2:
  153. goto L_End;
  154. }
  155. }
  156. if (!countitem(.@DyeItems[getarg((.@s-1)*2)])) {
  157. mes "For me to dye your clothes, I'll need the appropriate Dyestuffs. Please check my price list for the information.";
  158. close;
  159. }
  160. if (Zeny < 10000) {
  161. mes "I'm sorry, but you don't have enough money.";
  162. close;
  163. }
  164. delitem .@DyeItems[getarg((.@s-1)*2)],1;
  165. set Zeny, Zeny-10000;
  166. setlook 7, ((.@s)?(getarg((.@s-1)*2+1)):0);
  167. mes "Your clothes have been dyed "+((.@s)?.@DyeName$[getarg((.@s-1)*2)]:.@DyeName$[0])+".";
  168. close;
  169. }
  170. }