hd_refiner.txt 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. //===== rAthena Script =======================================
  2. //= HD Refiners
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Refiners that use HD ores to refine equipment. Upon
  12. //= failure, the equipment is not destroyed; rather, its
  13. //= refine level decreases by 1. The success rate is identical
  14. //= to that for Enriched ores.
  15. //= - "Blacksmith Mighty Hammer" only refines from +7~9.
  16. //= - "Basta" only refines from +10 and up.
  17. //===== Additional Comments: =================================
  18. //= 1.0 First version. [Euphy]
  19. //============================================================
  20. // Blacksmith Mighty Hammer (+7~9) :: cash_smelting79
  21. //============================================================
  22. - script ::MightyHammer -1,{
  23. disable_items;
  24. mes "[Blacksmith Mighty Hammer]";
  25. mes "Unlike others, I am a blacksmith who refines a very limited number of items.";
  26. mes "I refine only items that are ^CC0000+7 to +9^000000.";
  27. next;
  28. mes "[Blacksmith Mighty Hammer]";
  29. mes "My specialty is that even if my refining fails, the refine level decreases by 1 without losing the gear. Isn't it great?";
  30. next;
  31. mes "[Blacksmith Mighty Hammer]";
  32. mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";
  33. next;
  34. setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
  35. set .@menu$,"";
  36. for(set .@i,1; .@i<=10; set .@i,.@i+1)
  37. set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":";
  38. set .@part, select(.@menu$);
  39. if (!getequipisequiped(.@part)) {
  40. mes "[Blacksmith Mighty Hammer]";
  41. switch(.@part) {
  42. case 1:
  43. mes "I'm a blacksmith, not a hairstylist.";
  44. break;
  45. case 2:
  46. mes "With my hammer, I will make you a star of the sky.";
  47. break;
  48. case 3:
  49. case 4:
  50. mes "Making artificial hands is not my specialty.";
  51. break;
  52. case 5:
  53. mes "Bring out the item so I can refine it!";
  54. break;
  55. case 6:
  56. mes "Where is this foot odor coming from?";
  57. break;
  58. case 7:
  59. case 8:
  60. mes "Where is the accessory?";
  61. break;
  62. case 9:
  63. mes "What do you want me to refine?";
  64. break;
  65. case 10:
  66. mes "Huh? What do you want me to do?";
  67. break;
  68. }
  69. close;
  70. }
  71. if (!getequipisenableref(.@part)) {
  72. mes "[Blacksmith Mighty Hammer]";
  73. mes "This item can't be refined.";
  74. close;
  75. }
  76. if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) {
  77. mes "[Blacksmith Mighty Hammer]";
  78. mes "I only handle items with refine levels from +7 to +9.";
  79. close;
  80. }
  81. switch(getequipweaponlv(.@part)) {
  82. default:
  83. case 0:
  84. set .@price,20000;
  85. set .@material,6241; //HD_Elunium
  86. break;
  87. case 1:
  88. case 2:
  89. case 3:
  90. case 4:
  91. set .@price,20000;
  92. set .@material,6240; //HD_Oridecon
  93. break;
  94. }
  95. mes "[Blacksmith Mighty Hammer]";
  96. mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee.";
  97. mes "Do you have them ready?";
  98. next;
  99. if(select("Yes:No") == 2) {
  100. mes "[Blacksmith Mighty Hammer]";
  101. mes "I will wait until you are ready.";
  102. close;
  103. }
  104. if (getequippercentrefinery(.@part) < 100) {
  105. mes "[Blacksmith Mighty Hammer]";
  106. mes "It looks like this item will likely fail to be refined.";
  107. mes "Well, even if it fails, it only decreases by 1 refine level.";
  108. mes "Would you like to continue refining?";
  109. next;
  110. if(select("Yes:No") == 2) {
  111. mes "[Blacksmith Mighty Hammer]";
  112. mes "Only those who overcome fear of failure will obtain a masterpiece.";
  113. close;
  114. }
  115. }
  116. if (countitem(.@material) == 0 || Zeny < .@price) {
  117. mes "[Blacksmith Mighty Hammer]";
  118. mes "Didn't you just say you had everything ready?";
  119. close;
  120. }
  121. delitem .@material,1;
  122. set Zeny, Zeny-.@price;
  123. mes "[Blacksmith Mighty Hammer]";
  124. mes "Tac! Tac! Tac!";
  125. if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
  126. successrefitem .@part;
  127. next;
  128. emotion e_no1;
  129. mes "[Blacksmith Mighty Hammer]";
  130. mes "The sound refreshes my mind everytime I hear it.";
  131. mes "Here, have it. Refine succeeded flawlessly!";
  132. close;
  133. }
  134. downrefitem .@part;
  135. next;
  136. emotion e_omg;
  137. mes "[Blacksmith Mighty Hammer]";
  138. mes "Oops!!";
  139. next;
  140. mes "[Blacksmith Mighty Hammer]";
  141. mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm.";
  142. close;
  143. }
  144. prt_in,59,54,3 duplicate(MightyHammer) Mighty Hammer#prt 826
  145. morocc_in,65,30,3 duplicate(MightyHammer) Mighty Hammer#morocc 826
  146. payon,148,176,3 duplicate(MightyHammer) Mighty Hammer#pay 826
  147. alberta_in,16,56,3 duplicate(MightyHammer) Mighty Hammer#alb 826
  148. yuno_in01,171,18,3 duplicate(MightyHammer) Mighty Hammer#yuno 826
  149. ein_in01,22,82,3 duplicate(MightyHammer) Mighty Hammer#ein 826
  150. lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826
  151. // iRO NPC locations:
  152. // payon,174,133,4 duplicate(MightyHammer) Mighty Hammer#im 826
  153. // Basta (+10 and up) :: cash_smelting
  154. //============================================================
  155. - script ::Basta -1,{
  156. disable_items;
  157. mes "[Basta]";
  158. mes "I'm the best Blacksmith in the whole world, Basta.";
  159. mes "But I don't provide a normal refine service.";
  160. mes "I only refine equipment ^CC0000over +10^000000.";
  161. next;
  162. mes "[Basta]";
  163. mes "Which equipment do you want to refine?";
  164. next;
  165. setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
  166. set .@menu$,"";
  167. for(set .@i,1; .@i<=10; set .@i,.@i+1)
  168. set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":";
  169. set .@part, select(.@menu$);
  170. if (!getequipisequiped(.@part)) {
  171. mes "[Basta]";
  172. switch(.@part) {
  173. case 1:
  174. mes "Is your head an equipment?";
  175. break;
  176. case 2:
  177. mes "What do you want me to do?";
  178. break;
  179. case 3:
  180. case 4:
  181. mes "Making artificial hands is not my specialty.";
  182. break;
  183. case 5:
  184. mes "Do you even know what a robe is?";
  185. break;
  186. case 6:
  187. mes "If you want to refine your feet, don't come to me, try running a marathon.";
  188. break;
  189. case 7:
  190. case 8:
  191. mes "Where is the accessory?";
  192. break;
  193. case 9:
  194. mes "Well... I don't see any equipment worth refining.";
  195. break;
  196. case 10:
  197. mes "I can't make you smart. Go see a school teacher for that.";
  198. break;
  199. }
  200. close;
  201. }
  202. if (!getequipisenableref(.@part)) {
  203. mes "[Basta]";
  204. mes "Even I cannot refine this item. There's no way.";
  205. close;
  206. }
  207. if (getequiprefinerycnt(.@part) < 10) {
  208. mes "[Basta]";
  209. mes "Haven't I told you? I only refine equipments that are +10 and above.";
  210. close;
  211. }
  212. if (getequiprefinerycnt(.@part) == 20) {
  213. mes "[Basta]";
  214. mes "This weapon is perfect, no need to refine it anymore~";
  215. close;
  216. }
  217. switch(getequipweaponlv(.@part)) {
  218. default:
  219. case 0:
  220. set .@price,100000;
  221. set .@material,6225; //HD_Carnium
  222. set .@type$,"armor";
  223. break;
  224. case 1:
  225. case 2:
  226. case 3:
  227. case 4:
  228. set .@price,100000;
  229. set .@material,6226; //HD_Bradium
  230. set .@type$,"weapon";
  231. break;
  232. }
  233. mes "[Basta]";
  234. mes "Hmm... is this the one you want to refine?";
  235. mes "To refine this equipment, I need 1 ^ff9999"+getitemname(.@material)+"^000000 and 100,000 zeny as a fee.";
  236. mes "Do you really want to refine this?";
  237. next;
  238. if(select("Yes:No") == 2) {
  239. mes "[Basta]";
  240. mes "Okay. If that's what you want...";
  241. close;
  242. }
  243. if (getequippercentrefinery(.@part) < 100) {
  244. mes "[Basta]";
  245. mes "This "+.@type$+" has already been refined pretty high.";
  246. mes "If you try to refine it more, the refine level could decrease.";
  247. next;
  248. mes "[Basta]";
  249. mes "I am different from the blacksmiths in others places.";
  250. mes "It is impossible that the refine level will drop by, say, 3 or 4... that sounds scary.";
  251. mes "Here it can only decrease by 1 level.";
  252. next;
  253. mes "[Basta]";
  254. mes "Compared to other blacksmiths, the risk is smaller.";
  255. mes "I've given all precautions. Do you want to try it?";
  256. next;
  257. if(select("Yes:No") == 2) {
  258. mes "[Basta]";
  259. mes "Well~";
  260. mes "Not challenging at all could also be a kind of wisdom in life.";
  261. close;
  262. }
  263. }
  264. if (countitem(.@material) == 0 || Zeny < .@price) {
  265. mes "[Basta]";
  266. mes "Hmm... You didn't bring all the materials needed.";
  267. mes "Come back when you have them all.";
  268. close;
  269. }
  270. delitem .@material,1;
  271. set Zeny, Zeny-.@price;
  272. mes "Pow! Pow! Pow! Pow!";
  273. if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
  274. successrefitem .@part;
  275. next;
  276. emotion e_no1;
  277. mes "[Basta]";
  278. mes "Great! Nicely done!!";
  279. mes "I really am the best blacksmith in the whole wide world!";
  280. close;
  281. }
  282. downrefitem .@part;
  283. next;
  284. emotion (!rand(5))?e_cash:e_omg;
  285. mes "[Basta]";
  286. mes "Aaaaaaaaaaak!!!";
  287. next;
  288. mes "[Basta]";
  289. mes "Damn it!";
  290. mes "Refining failed and refine level has decreased!";
  291. mes "Even the best blacksmith in the world doesn't guarantee 100% success!";
  292. mes "Too bad.";
  293. next;
  294. mes "[Basta]";
  295. mes "I'll do better next time! Don't worry!";
  296. close;
  297. }
  298. prt_in,57,54,3 duplicate(Basta) Basta#prt 826
  299. morocc_in,68,30,3 duplicate(Basta) Basta#morocc 826
  300. payon,148,174,3 duplicate(Basta) Basta#payon 826
  301. alberta_in,18,56,3 duplicate(Basta) Basta#alberta 826
  302. yuno_in01,173,18,3 duplicate(Basta) Basta#yuno 826
  303. ein_in01,24,82,3 duplicate(Basta) Basta#einbroch 826
  304. lhz_in02,280,17,3 duplicate(Basta) Basta#lighthalzen 826