advanced_refiner.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. //===== rAthena Script =======================================
  2. //= Advanced Refiner
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Refiner that uses Enriched ores to increase upgrade success.
  12. //= After a conversation with Doddler, it's been established that
  13. //= the advanced refiner works similar the the "Bubble Gum" item.
  14. //= The success percentage is not "increased" however, if it fails
  15. //= You get a second try. This tries twice at the same time,
  16. //= effectively giving you a re-roll on your attempt.
  17. //===== Additional Comments: =================================
  18. //= 1.0 Added Malangdo Refiner "Holink". [Euphy]
  19. //============================================================
  20. // Main NPC :: mal_jerun
  21. //============================================================
  22. malangdo,221,174,6 script Holink#mal_cash 559,{
  23. disable_items;
  24. mes "[Holink]";
  25. mes "I am the meow~ Blacksmith Holink~";
  26. mes "Master of refining, Holink~";
  27. mes "I am the special cat Holink who learned from Morroc~";
  28. mes "My daughter is so proud of me, Holink~";
  29. mes "What should Holink~ refine today?";
  30. next;
  31. setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
  32. for (set .@i,1; .@i<=10; set .@i,.@i+1)
  33. set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
  34. set .@part, .@indices[ select(.@menu$) ];
  35. if (!getequipisequiped(.@part)) {
  36. mes "[Holink]";
  37. switch(.@part) {
  38. case 1:
  39. mes "My teacher Aragam said meow~";
  40. mes "There's no cure for stupidity...";
  41. break;
  42. case 2:
  43. mes "There's nothing to see here, meow!!";
  44. break;
  45. case 3:
  46. mes "Meow? What do you want me to do with this left hand...?";
  47. break;
  48. case 4:
  49. mes "Meow? What do you want me to do with this right hand...?";
  50. break;
  51. case 5:
  52. mes "Meow? You don't have anything on.";
  53. break;
  54. case 6:
  55. mes "Kyang~! Do not mess with my sensitive olfactory, meow~.";
  56. break;
  57. case 7:
  58. case 8:
  59. mes "Meow? Where is the accessory?";
  60. break;
  61. case 9:
  62. case 10:
  63. mes "Meow? You talking about the other head parts, meow?~";
  64. break;
  65. }
  66. close;
  67. }
  68. if (!getequipisenableref(.@part)) {
  69. mes "[Holink]";
  70. mes "Even Aragam can't refine such a thing, meow.";
  71. close;
  72. }
  73. if (getequiprefinerycnt(.@part) >= 10) {
  74. mes "[Holink]";
  75. mes "Meow~ Perfect refining. Did Aragam do this, meow?~";
  76. close;
  77. }
  78. mes "[Holink]";
  79. switch(getequipweaponlv(.@part)) {
  80. default:
  81. case 0: // Armor
  82. set .@price,15000;
  83. set .@material,7619; //Enriched_Elunium
  84. set .@type$,"armor";
  85. mes "You have chosen an armor, meow~";
  86. break;
  87. case 1: // Level 1 Weapon
  88. set .@price,500;
  89. set .@material,7620; //Enriched_Oridecon
  90. set .@type$,"weapon";
  91. mes "A level 1 weapon...?";
  92. break;
  93. case 2: // Level 2 Weapon
  94. set .@price,2000;
  95. set .@material,7620; //Enriched_Oridecon
  96. set .@type$,"weapon";
  97. mes "Meow, a level 2 weapon...?";
  98. break;
  99. case 3: // Level 3 Weapon
  100. set .@price,20000;
  101. set .@material,7620; //Enriched_Oridecon
  102. set .@type$,"weapon";
  103. mes "Meow Meow~~ A level 3 weapon~~";
  104. break;
  105. case 4: // Level 4 Weapon
  106. set .@price,50000;
  107. set .@material,7620; //Enriched_Oridecon
  108. set .@type$,"weapon";
  109. mes "Me-Meow!... A level 4 weapon...!";
  110. mes "I've only seen it twice while";
  111. mes "learning from Aragam... Me-Meow!!";
  112. break;
  113. }
  114. mes "You need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny for this refine, meow~";
  115. mes "Want to continue, meow?~";
  116. next;
  117. if(select("Yes!!:No!!") == 2) {
  118. mes "[Holink]";
  119. mes "Kyack!!";
  120. mes "You don't belive in refine master Holink, meow?~";
  121. close;
  122. }
  123. if (getequippercentrefinery(.@part) < 100) {
  124. mes "[Holink]";
  125. mes "Meow!!";
  126. if (.@type$ == "armor")
  127. mes "This armor was already refined so many times, meow.";
  128. else {
  129. mes "Danger. Danger~";
  130. mes "This weapon was refined a lot, meow~";
  131. next;
  132. mes "[Holink]";
  133. }
  134. mes "You might break it if you continue";
  135. mes "to try refining this item further, meow.";
  136. next;
  137. mes "[Holink]";
  138. mes "Once the "+.@type$+" is broken, you can";
  139. mes "never use it again, meow. Not to mention... all current";
  140. mes "^ff0000cards and enchantments will vanish for sure^000000.";
  141. mes "You still want to try, meow~?";
  142. next;
  143. if(select("Yes, I do!!:Forget about it!!") == 2) {
  144. mes "[Holink]";
  145. mes "Meow! Wise choice, meow.";
  146. mes "But!!";
  147. mes "I am not happy to see you doubting the refine master Holink, meow~";
  148. close;
  149. }
  150. }
  151. if (countitem(.@material) == 0 || Zeny < .@price) {
  152. mes "[Holink]";
  153. mes "You don't have the ingredients.";
  154. mes "You need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny, meow~";
  155. mes "Go get it, meow~";
  156. close;
  157. }
  158. delitem .@material,1;
  159. set Zeny, Zeny-.@price;
  160. if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
  161. successrefitem .@part;
  162. mes "[Holink]";
  163. mes "Me~ Me~ Meow! Fun fun refining~";
  164. next;
  165. emotion e_kis;
  166. mes "[Holink]";
  167. mes "Perfect!! Perfect, meow!!";
  168. mes "I am the disciple of the refining wizard Aragam~";
  169. mes "Holink!!";
  170. mes "Another day of successful refining, meow!!";
  171. close;
  172. }
  173. failedrefitem .@part;
  174. mes "[Holink]";
  175. mes "Meo~ Meow~ Kyaaak!!";
  176. next;
  177. switch(rand(1,5)) {
  178. case 1: emotion e_sob; break;
  179. case 2: emotion e_swt2; break;
  180. case 3: emotion e_wah; break;
  181. case 4: emotion e_hmm; break;
  182. case 5: emotion e_lv2; break;
  183. }
  184. mes "[Holink]";
  185. mes "Meow!! Aaaaakk~~!!!!";
  186. mes "Kyaaak!! I have failed, meow!!";
  187. next;
  188. mes "[Holink]";
  189. mes "......";
  190. mes "......";
  191. mes "All~ Everything~ Broken, meow...";
  192. next;
  193. mes "[Holink]";
  194. mes "Meow.... Master Aragam once said,";
  195. mes "learn from your failures...";
  196. mes "Human, this one failure will be the beginning of your success in the future.";
  197. close;
  198. }