refine.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. //===== rAthena Script =======================================
  2. //= Renewal Refining NPCs
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Current Version: =====================================
  6. //= 1.4
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Renewal-specific refining NPCs and material merchants.
  11. //===== Additional Comments: =================================
  12. //= 1.0 Moved some scripts to Renewal file, optimized "Austry" NPC. [Euphy]
  13. //= 1.0a Added 'disable_items' command. [Euphy]
  14. //= 1.1 Added Malangdo Refiner "Clink". [Euphy]
  15. //= 1.2 Added official success calculation, thanks to Helvetica.
  16. //= The safe/multiple refine feature is now functional. [Euphy]
  17. //= 1.3 Updated to match the latest official script. [Euphy]
  18. //= 1.4 Added correct safe refines. [Haruna]
  19. //= 1.5 Added Refine UI [Atemo, Lemongrass]
  20. //============================================================
  21. // +11 and above Refiners
  22. //============================================================
  23. prt_in,90,72,5 script Vestri#prt 4_M_DWARF,{
  24. if( getbattleflag( "feature.refineui" ) ){
  25. mes "[Vestri]";
  26. mes "I'm the most skillful blacksmith!";
  27. close2;
  28. refineui();
  29. end;
  30. }else{
  31. callfunc "refinenew","Vestri",0;
  32. end;
  33. }
  34. }
  35. morocc_in,64,41,5 duplicate(Vestri#prt) Vestri#moc 4_M_DWARF
  36. payon_in01,18,132,3 duplicate(Vestri#prt) Vestri#pay 4_M_DWARF
  37. //============================================================
  38. // +11 and above Refiner Function
  39. //============================================================
  40. //= To allow auto safe refining/multiple refining set the
  41. //= second argument to '1' in the function call.
  42. //= If you enable this function, be sure to edit the value of
  43. //= .@safe to the max safe refine in refine.yml as well.
  44. //=
  45. //= On official servers, if an item is unsuccessfully refined
  46. //= it will break at a 20% rate and downgrade at an 80% rate.
  47. //============================================================
  48. function script refinenew {
  49. .@npc_name$ = getarg(0);
  50. disable_items;
  51. mes "["+ .@npc_name$ +"]";
  52. mes "I am the best Armsmith ever!";
  53. mes "I don't refine normal, boring items.";
  54. mes "I only refine items that are Level 10 or higher.";
  55. next;
  56. mes "["+ .@npc_name$ +"]";
  57. mes "Anyway, you may use my services if your item is Level 10 or higher.";
  58. mes "What do you want me to refine?";
  59. next;
  60. 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;
  61. for(.@i = 1; .@i<=10; ++.@i) {
  62. if (getequipisequiped(.@indices[.@i])) {
  63. .@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
  64. .@equipped = 1;
  65. }
  66. .@menu$ = .@menu$ + ":";
  67. }
  68. if (.@equipped == 0) {
  69. mes "["+ .@npc_name$ +"]";
  70. mes "I don't think I can refine any items you have...";
  71. close;
  72. }
  73. .@part = .@indices[ select(.@menu$) ];
  74. if (!getequipisequiped(.@part)) { //custom check
  75. mes "["+ .@npc_name$ +"]";
  76. mes "You're not wearing";
  77. mes "anything there that";
  78. mes "I can refine.";
  79. emotion ET_FRET;
  80. close;
  81. }
  82. if (!getequipisenableref(.@part)) {
  83. mes "["+ .@npc_name$ +"]";
  84. mes "I don't think I can";
  85. mes "refine this item at all...";
  86. close;
  87. }
  88. .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
  89. if (.@refinerycnt < 10) {
  90. mes "["+ .@npc_name$ +"]";
  91. mes "I said I don't work with items that are lower than Level 10.";
  92. close;
  93. }
  94. if (.@refinerycnt >= 20) { //custom check
  95. mes "["+ .@npc_name$ +"]";
  96. mes "I can't refine this";
  97. mes "any more. This is as";
  98. mes "refined as it gets!";
  99. close;
  100. }
  101. .@refineitemid = getequipid(.@part); // save id of the item
  102. setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);
  103. .@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
  104. .@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
  105. .@safe = 10;
  106. .@itemtype = getiteminfo( .@refineitemid, ITEMINFO_TYPE );
  107. if( .@itemtype == IT_WEAPON ){
  108. .@article$ = "a";
  109. .@type$ = "weapon";
  110. }else if( .@itemtype == IT_ARMOR ){
  111. .@article$ = "an";
  112. .@type$ = "armor";
  113. }else{
  114. // TODO:
  115. close;
  116. }
  117. mes "["+ .@npc_name$ +"]";
  118. mes "Hmm " + .@article$ + " " + .@type$ + ", is that ok?";
  119. mes "If you want to refine this " + .@type$ + ",";
  120. mes "I will need 1 ^003366" + getitemname(.@material) + "^000000 and " + callfunc("F_InsertComma",.@price) + " zeny.";
  121. mes "Are you sure you want to continue?";
  122. next;
  123. if (select("Yes:No") == 2) {
  124. mes "["+ .@npc_name$ +"]";
  125. mes "Hm... if you mind... never mind...";
  126. close;
  127. }
  128. if (getarg(1) != 1) {
  129. if (getequippercentrefinery(.@part) < 100) {
  130. mes "["+ .@npc_name$ +"]";
  131. mes "This "+.@type$+" already has been refined several times.";
  132. mes "It could be destroyed if I try again.";
  133. mes "It won't break for sure, but there is has a small chance.";
  134. next;
  135. mes "["+ .@npc_name$ +"]";
  136. mes "You could be ^FF0000lowering the upgrade level^000000 of the "+.@type$+",";
  137. mes "or if it breaks, you will lose ^FF0000any cards^000000 or special properties added to it.";
  138. next;
  139. mes "["+ .@npc_name$ +"]";
  140. mes "Do you still want me to refine it?";
  141. mes "I think I have given you enough warning.";
  142. next;
  143. if(select("Yes.:No.") == 2) {
  144. mes "["+ .@npc_name$ +"]";
  145. mes "Well, no challenge is one way to go...";
  146. mes "No risk... that could be wise.";
  147. close;
  148. }
  149. }
  150. if (countitem(.@material) < 1 || Zeny < .@price) {
  151. mes "["+ .@npc_name$ +"]";
  152. mes "Hm. You don't seem to have enough money or "+getitemname(.@material)+".";
  153. mes "Please come back when you have them.";
  154. close;
  155. }
  156. Zeny = Zeny - .@price;
  157. delitem .@material,1;
  158. // anti-hack
  159. if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
  160. callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) {
  161. mes "["+ .@npc_name$ +"]";
  162. emotion ET_FRET;
  163. mes "Wait a second...";
  164. mes "Do you think I'm stupid?!";
  165. mes "You switched the item while I wasn't looking! Get out of here!";
  166. close;
  167. }
  168. if (getequippercentrefinery(.@part) > rand(100)) {
  169. mes "Clang! Clang! Clang! Clang!";
  170. successrefitem .@part;
  171. next;
  172. emotion ET_BEST;
  173. mes "["+ .@npc_name$ +"]";
  174. mes "Good! Succes!!!";
  175. mes "I am the best Armsmith.";
  176. close;
  177. } else {
  178. if (rand(100) < 80) {
  179. mes "["+ .@npc_name$ +"]";
  180. mes "Clang! Clang! Clang! Clang!";
  181. downrefitem .@part,3; // Failed refine attempts decrease the item's refine level by 3
  182. next;
  183. emotion (!rand(5))?ET_MONEY:ET_HUK;
  184. mes "["+ .@npc_name$ +"]";
  185. mes "Ahhh!!!";
  186. next;
  187. mes "["+ .@npc_name$ +"]";
  188. mes "Oh my god!";
  189. mes "The upgrade level has dropped...";
  190. } else {
  191. mes "["+ .@npc_name$ +"]";
  192. mes "Clang! Clang! Clang!";
  193. failedrefitem .@part;
  194. next;
  195. emotion (!rand(5))?ET_MONEY:ET_HUK;
  196. mes "["+ .@npc_name$ +"]";
  197. mes "Hmmm!";
  198. next;
  199. mes "["+ .@npc_name$ +"]";
  200. mes "Oh my! I've failed to refine stuff...";
  201. mes "I didn't mean it!";
  202. }
  203. mes "I could have made a mistake even though I am the best Armsmith ever.";
  204. mes "It just wasn't meant to be.";
  205. next;
  206. mes "["+ .@npc_name$ +"]";
  207. mes "I will do a better job next time! Don't worry!";
  208. close;
  209. }
  210. }
  211. // New +11 and above Refining Functions ========================
  212. if (.@refinerycnt < .@safe) {
  213. mes "["+ .@npc_name$ +"]";
  214. mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
  215. next;
  216. .@menu2 = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
  217. } else
  218. .@menu2 = 2;
  219. switch(.@menu2){
  220. case 1:
  221. .@refinecnt = .@safe - .@refinerycnt;
  222. break;
  223. case 2:
  224. mes "["+ .@npc_name$ +"]";
  225. mes "How many times would you like me to refine your item?";
  226. next;
  227. input .@refinecnt;
  228. .@refinecheck = .@refinecnt + .@refinerycnt;
  229. if (.@refinecnt < 1 || .@refinecheck > 20) {
  230. mes "["+ .@npc_name$ +"]";
  231. mes "I can't refine this item that many times.";
  232. close;
  233. }
  234. if (.@refinecheck > .@safe) {
  235. .@refinecheck = .@refinecheck - .@safe;
  236. mes "["+ .@npc_name$ +"]";
  237. mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
  238. next;
  239. if(select("Yes...","No...") == 2){
  240. mes "["+ .@npc_name$ +"]";
  241. mes "You said so... So be it.";
  242. close;
  243. }
  244. }
  245. break;
  246. case 3:
  247. mes "["+ .@npc_name$ +"]";
  248. mes "You said so... So be it.";
  249. close;
  250. }
  251. .@fullprice = .@price * .@refinecnt;
  252. mes "["+ .@npc_name$ +"]";
  253. mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
  254. next;
  255. if(select("Yes:No...") == 2){
  256. mes "["+ .@npc_name$ +"]";
  257. mes "You said so... So be it.";
  258. close;
  259. }
  260. if (countitem(.@material) < .@refinecnt || Zeny < .@fullprice) {
  261. mes "["+ .@npc_name$ +"]";
  262. mes "Hm. You don't seem to have enough money or "+getitemname(.@material)+".";
  263. mes "Please come back when you have them.";
  264. close;
  265. }
  266. Zeny = Zeny - .@fullprice;
  267. delitem .@material,.@refinecnt;
  268. while(.@refinecnt){
  269. if (getequipisequiped(.@part) == 0) {
  270. mes "["+ .@npc_name$ +"]";
  271. mes "Look here... you don't have any items on...";
  272. close;
  273. }
  274. // anti-hack
  275. if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
  276. callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt))
  277. close;
  278. if (getequipid(.@part) != .@refineitemid || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) {
  279. mes "["+ .@npc_name$ +"]";
  280. mes "Clang... No, but did you imagine I could be so stupid?!";
  281. mes "You changed it...";
  282. mes "Get out before I stun you with my Hammer!!";
  283. close;
  284. }
  285. if (getequippercentrefinery(.@part) > rand(100)) {
  286. mes "Clang! Clang! Clang! Clang!";
  287. successrefitem .@part;
  288. .@refinecnt = .@refinecnt - 1;
  289. next;
  290. } else {
  291. if (rand(100) < 80) {
  292. mes "["+ .@npc_name$ +"]";
  293. mes "Clang! Clang! Clang! Clang!";
  294. downrefitem .@part,3; // Failed refine attempts decrease the item's refine level by 3
  295. next;
  296. emotion (!rand(5))?ET_MONEY:ET_HUK;
  297. mes "["+ .@npc_name$ +"]";
  298. mes "Ahhh!!!";
  299. next;
  300. mes "["+ .@npc_name$ +"]";
  301. mes "Oh my god!";
  302. mes "The upgrade level has dropped...";
  303. } else {
  304. mes "["+ .@npc_name$ +"]";
  305. mes "Clang! Clang! Clang!";
  306. failedrefitem .@part;
  307. next;
  308. emotion (!rand(5))?ET_MONEY:ET_HUK;
  309. mes "["+ .@npc_name$ +"]";
  310. mes "Hmmm!";
  311. next;
  312. mes "["+ .@npc_name$ +"]";
  313. mes "Oh my! I've failed to refine stuff...";
  314. mes "I didn't mean it!";
  315. }
  316. mes "I could have made a mistake even though I am the best Armsmith ever.";
  317. mes "It just wasn't meant to be.";
  318. next;
  319. mes "["+ .@npc_name$ +"]";
  320. mes "I will do a better job next time! Don't worry!";
  321. close;
  322. }
  323. .@refinerycnt = getequiprefinerycnt(.@part);
  324. }
  325. emotion ET_BEST;
  326. mes "["+ .@npc_name$ +"]";
  327. mes "Good! Succes!!!";
  328. mes "I am the best Blacksmith.";
  329. close;
  330. }
  331. // Ori/Elu to Carnium/Bradium Refiners
  332. //============================================================
  333. - script Austri#ref -1,{
  334. if (checkweight(1201,1) == 0) {
  335. mes "- Wait a minute !! -";
  336. mes "- Currently you're carrying -";
  337. mes "- too many items with you. -";
  338. mes "- Please try again -";
  339. mes "- after you lose some weight. -";
  340. close;
  341. }
  342. mes "[Austri]";
  343. mes "If you bring me 3";
  344. mes "Oridecon or Elunium";
  345. mes "I can exchange them for";
  346. mes "Bradium or Carnium.";
  347. mes "Just give me 50,000z.";
  348. next;
  349. switch(select("Oridecon to Bradium.:Elunium to Carnium.:Purified Bradium to Carnium.:No thanks.")) {
  350. case 1:
  351. setarray .@i[0],984,3,6224; //Oridecon -> Bradium
  352. break;
  353. case 2:
  354. setarray .@i[0],985,3,6223; //Elunium -> Carnium
  355. break;
  356. case 3:
  357. setarray .@i[0],6090,1,6223; //Purified_Bradium -> Carnium
  358. break;
  359. case 4:
  360. mes "[Austri]";
  361. mes "Hmm...";
  362. close;
  363. }
  364. if (countitem(.@i[0]) >= .@i[1] && Zeny >= 50000) {
  365. delitem .@i[0],.@i[1];
  366. Zeny = Zeny - 50000;
  367. getitem .@i[2],1;
  368. mes "[Austri]";
  369. if (.@i[0] == 6090) {
  370. mes "Refining with Refined Bradium";
  371. mes "can be a little expensive.";
  372. mes "I can exchange it for some Carnium.";
  373. } else
  374. mes "Ok! Here's your "+getitemname(.@i[2])+".";
  375. mes "Take it and use it well.";
  376. close;
  377. }
  378. mes "[Austri]";
  379. mes "You better not be trying";
  380. mes "to cheat me because you";
  381. mes "don't have enough money";
  382. mes "or "+getitemname(.@i[0])+".";
  383. close;
  384. }
  385. prt_in,85,71,5 duplicate(Austri#ref) Austri#prt 826
  386. payon_in01,14,125,5 duplicate(Austri#ref) Austri#pay 826
  387. morocc_in,60,38,5 duplicate(Austri#ref) Austri#moc 826
  388. // Malangdo Refiner
  389. //============================================================
  390. malangdo,224,172,6 script Clink#mal_normal 544,{
  391. disable_items;
  392. mes "[Clink]";
  393. mes "My cool dad Holink said I have the world's greatest refine hammer!!";
  394. mes "Meow Meow~";
  395. mes "Who do you think I am?";
  396. mes "Yes!!! You!! You want to refine?";
  397. next;
  398. 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;
  399. for(.@i = 1; .@i<=10; set .@i,.@i+1)
  400. .@menu$ = .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
  401. .@part = .@indices[ select(.@menu$) ];
  402. if (!getequipisequiped(.@part)) {
  403. mes "[Clink]";
  404. switch(.@part) {
  405. case EQI_HEAD_TOP:
  406. mes "Dad said. There's no cure for stupidity...";
  407. break;
  408. case EQI_ARMOR:
  409. mes "There's nothing to see here!!";
  410. break;
  411. case EQI_HAND_L:
  412. mes "What an arrogant left hand this is!";
  413. break;
  414. case EQI_HAND_R:
  415. mes "What an arrogant right hand this is!";
  416. break;
  417. case EQI_GARMENT:
  418. mes "Get that dirty thing off my face!!";
  419. break;
  420. case EQI_SHOES:
  421. mes "Kyaong~! Do not provoke me.";
  422. break;
  423. case EQI_ACC_L:
  424. case EQI_ACC_R:
  425. mes "Where is the accessory?";
  426. break;
  427. case EQI_HEAD_MID:
  428. case EQI_HEAD_LOW:
  429. mes "Are you talking about the other head part?";
  430. break;
  431. }
  432. close;
  433. }
  434. if (!getequipisenableref(.@part)) {
  435. mes "[Clink]";
  436. mes "This can't be refined!!";
  437. close;
  438. }
  439. .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
  440. if (.@refinerycnt >= 10) {
  441. mes "[Clink]";
  442. mes "Perfect refining. Did I do this for you?";
  443. close;
  444. }
  445. .@refineitemid = getequipid(.@part); // save id of the item
  446. setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);
  447. .@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
  448. .@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
  449. .@itemtype = getiteminfo( .@refineitemid, ITEMINFO_TYPE );
  450. mes "[Clink]";
  451. if( .@itemtype == IT_ARMOR ){
  452. switch( getequiparmorlv( .@part ) ){
  453. case 1: // Armor
  454. .@type$ = "armor";
  455. mes "Hmm, an armor refine? Someone like you?";
  456. break;
  457. default:
  458. // TODO:
  459. close;
  460. }
  461. }else if( .@itemtype == IT_WEAPON ){
  462. switch( getequipweaponlv( .@part ) ){
  463. case 1: // Level 1 Weapon
  464. .@type$ = "weapon";
  465. mes "A level 1 weapon?";
  466. mes "Urr... Annoying... Okay, let's try...";
  467. break;
  468. case 2: // Level 2 Weapon
  469. .@type$ = "weapon";
  470. mes "A level 2 weapon?";
  471. break;
  472. case 3: // Level 3 Weapon
  473. .@type$ = "weapon";
  474. mes "Woot!! A level 3 weapon? Impressive~";
  475. break;
  476. case 4: // Level 4 Weapon
  477. .@type$ = "weapon";
  478. mes "Wow!... A level 4 weapon~!!";
  479. break;
  480. default:
  481. // TODO:
  482. close;
  483. }
  484. }else{
  485. // TODO:
  486. close;
  487. }
  488. mes "You need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny. Do you have them?";
  489. next;
  490. if(select("Yes, I do!!:Forget about it!!") == 2) {
  491. mes "[Clink]";
  492. mes "I knew it!!";
  493. mes "I knew you were not worth trying my magical refining hammer for.";
  494. close;
  495. }
  496. if (getequippercentrefinery(.@part) < 100) {
  497. mes "[Clink]";
  498. mes "Wow!!";
  499. mes "This "+.@type$+" has been refined quite a bit, huh?";
  500. mes "You do know that this might break, right?";
  501. next;
  502. mes "[Clink]";
  503. mes "If you break the "+.@type$+", you can never use it again.";
  504. mes "Cards and enchant effects...";
  505. mes "the ^ff0000whole thing will disappear^000000.";
  506. mes "You still up for this~?";
  507. next;
  508. if(select("Yes, I am!!:Forget about it!!") == 2) {
  509. mes "[Clink]";
  510. mes "I knew it!!";
  511. mes "You can't even take this big step. Don't think about refining...";
  512. close;
  513. }
  514. }
  515. if (countitem(.@material) == 0 || Zeny < .@price) {
  516. mes "[Clink]";
  517. mes "Hey you!! Didn't I tell you";
  518. mes "that you need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny??!!";
  519. close;
  520. }
  521. delitem .@material,1;
  522. Zeny = Zeny-.@price;
  523. // anti-hack
  524. if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
  525. callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) {
  526. mes "[Clink]";
  527. emotion ET_FRET;
  528. mes "Wait a second...";
  529. mes "Do you think I'm stupid?!";
  530. mes "You switched the item while I wasn't looking! Get out of here!";
  531. close;
  532. }
  533. if (getequippercentrefinery(.@part) <= rand(100)) {
  534. failedrefitem .@part;
  535. mes "[Clink]";
  536. mes "Cry Hammer!! Cry!!!";
  537. next;
  538. switch(rand(1,5)) {
  539. case 1: emotion ET_CRY; break;
  540. case 2: emotion ET_PROFUSELY_SWEAT; break;
  541. case 3: emotion ET_KEK; break;
  542. case 4: emotion ET_SCRATCH; break;
  543. case 5: emotion ET_BIGTHROB; break;
  544. }
  545. mes "[Clink]";
  546. mes "Huh?! I failed?!";
  547. next;
  548. mes "[Clink]";
  549. mes "Arrgg~ It's all~ Broken...? What a pity~";
  550. next;
  551. mes "[Clink]";
  552. mes "Hey...!! Get me another one.";
  553. mes "This is not possible.";
  554. mes "How can my hammer fail from refining?";
  555. close;
  556. }
  557. successrefitem .@part;
  558. mes "[Clink]";
  559. mes "Cry Hammer!! Cry!!!";
  560. next;
  561. emotion ET_CHUP;
  562. mes "[Clink]";
  563. mes "Ok!! Perfect!!";
  564. mes "There's nothing I can't refine";
  565. mes "with this special hammer.";
  566. mes "You can praise me!!";
  567. mes "What a day!!";
  568. close;
  569. }