advanced_refiner.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. //===== eAthena Script =======================================
  2. //= Advanced Refiner
  3. //===== By: ==================================================
  4. //= L0ne_W0lf
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= Eathena SVN
  9. //===== Description: =========================================
  10. //= [Aegis 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. //= - Dialog is only partly official to iRO.
  18. //= - Uses the iRO position for this NPC.
  19. //===== Additional Comments: =================================
  20. //= 1.0 First Version. [L0ne_W0lf]
  21. //= 1.1 Fixed a weird carriage return. o_o [L0ne_W0lf]
  22. //============================================================
  23. payon,174,138,0 script Suhnbi#cash 85,{
  24. mes "[Suhnbi]";
  25. mes "I am the Armsith";
  26. mes "I can refine all kinds of weapons,";
  27. mes "armor and equipment, so let me";
  28. mes "know what you want to refine.";
  29. next;
  30. set .@strRetPart1$,getequipname(1);
  31. set .@strRetPart2$,getequipname(2);
  32. set .@strRetPart3$,getequipname(3);
  33. set .@strRetPart4$,getequipname(4);
  34. set .@strRetPart5$,getequipname(5);
  35. set .@strRetPart6$,getequipname(6);
  36. set .@strRetPart7$,getequipname(7);
  37. set .@strRetPart8$,getequipname(8);
  38. set .@strRetPart9$,getequipname(9);
  39. set .@strRetPart10$,getequipname(10);
  40. set .@menu$,.@strRetPart1$+":"+.@strRetPart2$+":"+.@strRetPart3$+":"+.@strRetPart4$+":"+.@strRetPart5$+":"+.@strRetPart6$+":"+.@strRetPart7$+":"+.@strRetPart8$+":"+.@strRetPart9$+":"+.@strRetPart10$;
  41. switch(select(.@menu$)) {
  42. case 1:
  43. set .@part,1;
  44. if (getequipisequiped(1) == 0) {
  45. mes "[Suhnbi]";
  46. mes "Do you want me to refine your skull?";
  47. close;
  48. }
  49. break;
  50. case 2:
  51. set .@part,2;
  52. if (getequipisequiped(2) == 0) {
  53. mes "[Suhnbi]";
  54. mes "I'll refine your torso with my own passionate body!";
  55. close;
  56. }
  57. break;
  58. case 3:
  59. set .@part,3;
  60. if (getequipisequiped(3) == 0) {
  61. mes "[Suhnbi]";
  62. mes "Sorry, there ain't any technology yet to put rockets on your left hand...";
  63. close;
  64. }
  65. break;
  66. case 4:
  67. set .@part,4;
  68. if (getequipisequiped(4) == 0) {
  69. mes "[Suhnbi]";
  70. mes "Sorry, there ain't any technology yet to put rockets on your right hand...";
  71. close;
  72. }
  73. break;
  74. case 5:
  75. set .@part,5;
  76. if (getequipisequiped(5) == 0) {
  77. mes "[Suhnbi]";
  78. mes "You're not even wearing a garment? Are you?";
  79. close;
  80. }
  81. break;
  82. case 6:
  83. set .@part,6;
  84. if (getequipisequiped(6) == 0) {
  85. mes "[Suhnbi]";
  86. mes "What do I look like, a makeover artist? I can't refine your bare feet!";
  87. close;
  88. }
  89. break;
  90. case 7:
  91. set .@part,7;
  92. if (getequipisequiped(7) == 0) {
  93. mes "[Suhnbi]";
  94. mes "Um... You're not wearing an Accessory.";
  95. close;
  96. }
  97. break;
  98. case 8:
  99. set .@part,8;
  100. if (getequipisequiped(8) == 0) {
  101. mes "[Suhnbi]";
  102. mes "Accessory? You're not wearing one of those.";
  103. close;
  104. }
  105. break;
  106. case 9:
  107. set .@part,9;
  108. if (getequipisequiped(9) == 0) {
  109. mes "[Suhnbi]";
  110. mes "I refine equipment. I don't give hair cuts.";
  111. close;
  112. }
  113. break;
  114. case 10:
  115. set .@part,10;
  116. if (getequipisequiped(10) == 0) {
  117. mes "[Suhnbi]";
  118. mes "What am I, your personal hairstylist?. Go to the salon if you want work done on your precious hair.";
  119. close2;
  120. }
  121. break;
  122. }
  123. if (getequipisenableref(.@part) == 0) {
  124. mes "[Suhnbi]";
  125. mes "I don't think I can refine this item at all.";
  126. close;
  127. }
  128. if (getequipisidentify(.@part) == 0) {
  129. mes "[Suhnbi]";
  130. mes "This is has not been identified. So, it can't be refined...";
  131. close;
  132. }
  133. if (getequiprefinerycnt(.@part) >= 10) {
  134. mes "[Suhnbi]";
  135. mes "This item cannot be refined because it has already reached its maximum level...";
  136. close;
  137. }
  138. // Make sure you have the neccessary items and Zeny to refine your items
  139. // Determines chance of failure and verifies that you want to continue.
  140. switch(getequipweaponlv(.@part)) {
  141. case 1: callsub S_RefineValidate,1,7620,50,.@part; break;
  142. case 2: callsub S_RefineValidate,2,7620,200,.@part; break;
  143. case 3: callsub S_RefineValidate,3,7620,5000,.@part; break;
  144. case 4: callsub S_RefineValidate,4,7620,20000,.@part; break;
  145. default: callsub S_RefineValidate,0,7619,2000,.@part; break;
  146. }
  147. if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
  148. mes "[Suhnbi]";
  149. mes "Clink! Clank! Clunk!";
  150. SuccessRefItem .@part;
  151. next;
  152. Emotion e_no1;
  153. mes "[Suhnbi]";
  154. mes "Here you are! It's done.";
  155. mes "It's been a while since I've made such a fine weapon. You must be happy because it has become stronger!";
  156. close;
  157. }
  158. else {
  159. mes "[Suhnbi]";
  160. mes "Clink! Clank! Clunk!";
  161. FailedRefItem .@part;
  162. next;
  163. if (rand(5) == 1)
  164. Emotion e_cash;
  165. else
  166. Emotion e_omg;
  167. mes "[Suhnbi]";
  168. mes "Cough!!!!";
  169. next;
  170. mes "[Suhnbi]";
  171. mes "Cough...Cough..";
  172. mes "What a shame...";
  173. mes "Your equipment broke during hte refining process. I had told you earlier this might happen!";
  174. close;
  175. }
  176. S_RefineValidate:
  177. mes "[Suhnbi]";
  178. if (getarg(0))
  179. mes "A level "+getarg(0)+" weapon...";
  180. mes "To refine this I need one ^ff9999"+getitemname(getarg(1))+"^000000 and a service fee of "+getarg(2)+" Zeny.";
  181. mes "Do you wish to continue?";
  182. next;
  183. if (select("Yes:No") == 1) {
  184. if (getequippercentrefinery(getarg(3)) < 100) {
  185. mes "[Suhnbi]";
  186. mes "Wow!!";
  187. mes "This weapon, probably";
  188. mes "looks like it's been refined...";
  189. mes "many times...";
  190. mes "It may break if";
  191. mes "you refine it again.";
  192. next;
  193. mes "And if it breaks,";
  194. mes "you can't use it anymore!";
  195. mes "All the cards in it and the";
  196. mes "properties";
  197. mes "^ff0000will be lost^000000!!";
  198. mes "^ff0000 besides, the equipment will break!^000000";
  199. mes " ";
  200. mes "Are you sure you still want to continue?";
  201. next;
  202. if (select("Yes:No") == 2) {
  203. mes "[Suhnbi]";
  204. mes "I completely agree...";
  205. mes "I might be a great refiner, but something even I make mistakes.";
  206. close;
  207. }
  208. }
  209. if (countitem(getarg(1)) > 0 && Zeny > getarg(2)) {
  210. delitem getarg(1),1;
  211. set zeny,zeny-getarg(2);
  212. return;
  213. }
  214. else {
  215. mes "[Suhnbi]";
  216. mes "You don't seem to have enough Zeny or "+getitemname(getarg(1))+"...";
  217. mes "Go get some more. I'll be here ll day if you need me.";
  218. close;
  219. }
  220. }
  221. else {
  222. mes "[Suhnbi]";
  223. mes "Yeah... There's no need to rush.";
  224. mes "Take your time.";
  225. close;
  226. }
  227. }