refine.txt 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
  1. //===== rAthena Script =======================================
  2. //= Refining NPCs
  3. //===== By: ==================================================
  4. //= Syrus22 (1.1) dafide18 (1.4) Skotlex (1.5)
  5. //===== Current Version: =====================================
  6. //= 3.4
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Refining NPCs and Metal Salesmen.
  11. //===== Additional Comments: =================================
  12. //= 3.0 Updated several NPC names and locations. [Xantara]
  13. //= Added WoE map Refiners.
  14. //= 3.1 Added the new refinement & Ore creation NPC's for +11 and above Refinement. [Masao]
  15. //= 3.2 Moved some scripts to Renewal file, other minor changes. [Euphy]
  16. //= 3.2a Added 'disable_items' command. [Euphy]
  17. //= 3.3 Some official script updates. [Euphy]
  18. //= 3.4 Added VIP features. [Euphy]
  19. //= 3.5 Added Refine UI [Atemo, Lemongrass]
  20. //============================================================
  21. // Christopher: Geffen Blacksmith
  22. //============================================================
  23. geffen_in,110,172,0 script Christopher#1 63,{
  24. mes "[Christopher Guillenrow]";
  25. mes "Welcome to Christopher's Workshop. Ye can get all yer stuff for forging here. What business";
  26. mes "brings ye to me?";
  27. next;
  28. switch(select("Purchase Anvil:Purchase Forging Item:Purchase Metal:Purify Rough Ores:Cancel")) {
  29. case 1:
  30. mes "[Christopher Guillenrow]";
  31. mes "A better Anvil gives ye a greeeater chance to make better weapons, ye know? But they'll cost ye more zeny. Just get it off yer chest and buy what fits your purposes best, laddy.";
  32. next;
  33. switch(select("Anvil - 30,000 zeny:Oridecon Anvil - 120,000 zeny:Golden Anvil - 300,000 zeny:Better Anvil than the others.:Cancel.")) {
  34. case 1:
  35. if (Zeny < 30000) {
  36. mes "[Christopher Guillenrow]";
  37. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  38. close;
  39. }
  40. getitem 986,1; // Anvil
  41. Zeny = Zeny-30000;
  42. mes "[Christopher Guillenrow]";
  43. mes "This is the cheapest one, but efficient enough to forge most items. Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  44. close;
  45. case 2:
  46. if (Zeny < 120000) {
  47. mes "[Christopher Guillenrow]";
  48. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  49. close;
  50. }
  51. getitem 987,1; // Oridecon_Anvil
  52. Zeny = Zeny-120000;
  53. mes "[Christopher Guillenrow]";
  54. mes "Aye, friend ye have an eye for the anvil. This must be the proper anvil for a Blacksmith, eh? Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  55. close;
  56. case 3:
  57. if (Zeny < 300000) {
  58. mes "[Christopher Guillenrow]";
  59. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  60. close;
  61. }
  62. getitem 988,1; // Golden_Anvil
  63. Zeny = Zeny-300000;
  64. mes "[Christopher Guillenrow]";
  65. mes "This one is the best among all me stuffs in me workshop! With this, ye can rule the Blacksmith world! Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  66. close;
  67. case 4:
  68. mes "[Christopher Guillenrow]";
  69. mes "Well, sorry. But I don't have anythin' harder' than the Golden Anvil.";
  70. next;
  71. mes "[Christopher Guillenrow]";
  72. mes "Me thinks 'Ringgel,' the Legendary Anvil Maker would have one. But, I don't think ye can find him, though he be somewhere in this world.";
  73. close;
  74. case 5:
  75. mes "[Christopher Guillenrow]";
  76. mes "Okay, feel free to come anytime, whenever ye need. Fare ye well.";
  77. close;
  78. }
  79. case 2:
  80. mes "[Christopher Guillenrow]";
  81. mes "A respectable blacksmith uses fine tools. Ye can become one o'those with me Stuff. Choose anything ye want.";
  82. next;
  83. switch(select("Mini-Furnace - 150 zeny:Iron Hammer - 1000 zeny:Golden Hammer - 3000 zeny:Oridecon Hammer - 5000 zeny:Cancel.")) {
  84. case 1:
  85. mes "[Christopher Guillenrow]";
  86. mes "It's a much needed tool fer refining metal! So, How many do ye wish to buy? If ye want to quit, just type the number '0.'";
  87. next;
  88. while(1) {
  89. input .@input;
  90. if (.@input == 0) {
  91. mes "[Christopher Guillenrow]";
  92. mes "Aye, the deal is canceled. Fare ye well.";
  93. close;
  94. }
  95. else if ((.@input < 0) || (.@input > 500)) {
  96. mes "[Christopher Guillenrow]";
  97. mes "Ye can buy 500, er less.";
  98. next;
  99. }
  100. else {
  101. break;
  102. }
  103. }
  104. .@sell = .@input * 150;
  105. if (Zeny < .@sell) {
  106. mes "[Christopher Guillenrow]";
  107. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  108. close;
  109. }
  110. if (checkweight(612,.@input) == 0) {
  111. mes "[Christopher Guillenrow]";
  112. mes "Ye look like you don't got enough room in yer inventory. Put some stuff into your Kafra Storage, why don't ye?";
  113. close;
  114. }
  115. getitem 612,.@input; // Portable_Furnace
  116. Zeny = Zeny-.@sell;
  117. mes "[Christopher Guillenrow]";
  118. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  119. close;
  120. case 2:
  121. if (Zeny < 1000) {
  122. mes "[Christopher Guillenrow]";
  123. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  124. close;
  125. }
  126. getitem 613,1; // Iron_Hammer
  127. Zeny = Zeny-1000;
  128. mes "[Christopher Guillenrow]";
  129. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  130. close;
  131. case 3:
  132. if (Zeny < 3000) {
  133. mes "[Christopher Guillenrow]";
  134. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  135. close;
  136. }
  137. getitem 614,1; // Golden_Hammer
  138. Zeny = Zeny-3000;
  139. mes "[Christopher Guillenrow]";
  140. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  141. close;
  142. case 4:
  143. if (Zeny < 5000) {
  144. mes "[Christopher Guillenrow]";
  145. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  146. close;
  147. }
  148. getitem 615,1; // Oridecon_Hammer
  149. Zeny = Zeny-5000;
  150. mes "[Christopher Guillenrow]";
  151. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  152. close;
  153. case 5:
  154. mes "[Christopher Guillenrow]";
  155. mes "Feel free to come anytime, whenever ye need. Fare ye well.";
  156. close;
  157. }
  158. case 3:
  159. mes "[Christopher Guillenrow]";
  160. mes "I prepare every Metal, and only the high quality ones o'course. Now then, which one do ye need?";
  161. next;
  162. switch(select("Phracon - 200z.:Emveretarcon - 1000z.:Cancel.")) {
  163. case 1:
  164. mes "[Christopher Guillenrow]";
  165. mes "So, How many do ye wish to buy? If ye dont want anything, just type the number as '0.'";
  166. next;
  167. while(1) {
  168. input .@input;
  169. if (.@input == 0) {
  170. mes "[Christopher Guillenrow]";
  171. mes "Deal has";
  172. mes "been canceled.";
  173. mes "Fare ye well.";
  174. close;
  175. }
  176. else if ((.@input < 0) || (.@input > 500)) {
  177. mes "[Christopher Guillenrow]";
  178. mes "Ye can buy 500, er less.";
  179. next;
  180. }
  181. else {
  182. break;
  183. }
  184. }
  185. .@sell = .@input * 200;
  186. if (Zeny < .@sell) {
  187. mes "[Christopher Guillenrow]";
  188. mes "Ye don't have enough money. Ye know I can't sell this at a lower price... You know how the wifey nags about Zeny.";
  189. close;
  190. }
  191. if (checkweight(1010,.@input) == 0) {
  192. mes "[Christopher Guillenrow]";
  193. mes "Ye look like you don't have the room to carry anythin' new. Why don't ye put some things into Kafra Storage n' come back.";
  194. close;
  195. }
  196. getitem 1010,.@input; // Phracon
  197. Zeny = Zeny-.@sell;
  198. mes "[Christopher Guillenrow]";
  199. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
  200. close;
  201. case 2:
  202. mes "[Christopher Guillenrow]";
  203. mes "So, how many do ye wish to buy? If ye dont want anything at all, just type the number as '0.'";
  204. next;
  205. while(1) {
  206. input .@input;
  207. if (.@input == 0) {
  208. mes "[Christopher Guillenrow]";
  209. mes "Deal has";
  210. mes "been canceled.";
  211. mes "Fare ye well.";
  212. close;
  213. }
  214. else if ((.@input < 0) || (.@input > 500)) {
  215. mes "[Christopher Guillenrow]";
  216. mes "Ye can buy 500, er less.";
  217. next;
  218. }
  219. else {
  220. break;
  221. }
  222. }
  223. .@sell = .@input * 1000;
  224. if (Zeny < .@sell) {
  225. mes "[Christopher Guillenrow]";
  226. mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
  227. close;
  228. }
  229. if (checkweight(1011,.@input) == 0) {
  230. mes "[Christopher Guillenrow]";
  231. mes "Me friend... Seems to me ye don't have Inventory space. Why doncha put some things into Kafra Storage first?";
  232. close;
  233. }
  234. getitem 1011,.@input; // Emveretarcon
  235. Zeny = Zeny-.@sell;
  236. mes "[Christopher Guillenrow]";
  237. mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need, whenever ye want.";
  238. close;
  239. case 3:
  240. mes "[Christopher Guillenrow]";
  241. mes "Feel free to come anytime, whenever ye need. Fare ye well.";
  242. close;
  243. }
  244. case 4:
  245. mes "[Christopher Guillenrow]";
  246. mes "I can purify yer Oridecon and Elunium. I make a refined Ore out of 5 o'each rough ones. Well... Which one do ye want to make?";
  247. next;
  248. switch(select("Make Oridecon:Make Elunium:Cancel.")) {
  249. case 1:
  250. if (countitem(756) < 5) {
  251. mes "[Christopher Guillenrow]";
  252. mes "I told ye, I need 5 o'the rough Oridecons fer one Oridecon.";
  253. close;
  254. }
  255. else {
  256. delitem 756,5; //Oridecon_Stone
  257. getitem 984,1; // Oridecon
  258. mes "[Christopher Guillenrow]";
  259. mes "Here's an Oridecon fer ye. Ye will be always welcome here, I'll be waitin' for ye.";
  260. close;
  261. }
  262. case 2:
  263. if (countitem(757) < 5) {
  264. mes "[Christopher Guillenrow]";
  265. mes "I told ye, I need 5 rough Eluniums fer one Elunium.";
  266. close;
  267. }
  268. else {
  269. delitem 757,5; //Elunium_Stone
  270. getitem 985,1; // Elunium
  271. mes "[Christopher Guillenrow]";
  272. mes "Arrr, here's yer Elunium. Yer business is always welcome here, so feel free to come again.";
  273. close;
  274. }
  275. case 3:
  276. mes "[Christopher Guillenrow]";
  277. mes "Feel free to come anytime, whenever ye need. Fare ye well.";
  278. close;
  279. }
  280. case 5:
  281. mes "[Christopher Guillenrow]";
  282. mes "Feel free to come anytime, whenever ye need and whenever ye want. Fare ye well.";
  283. close;
  284. }
  285. }
  286. // Paul Spanner: Einbroch Blacksmith Supplier
  287. //============================================================
  288. ein_in01,38,29,0 script Paul Spanner 63,{
  289. if (checkweight(1201,1) == 0) {
  290. mes "- Wait a minute !! -";
  291. mes "- Currently you're carrying -";
  292. mes "- too many items with you. -";
  293. mes "- Please try again -";
  294. mes "- after you lose some weight. -";
  295. close;
  296. }
  297. mes "[Paul Spanner]";
  298. mes "Welcome, my friend.";
  299. mes "In my shop, you will find everything that you need in forging.";
  300. mes "Tell me what you need.";
  301. next;
  302. switch(select("Purchase Anvil.:Purchase Forging Items.:Purchase Metal.:Process Ores.:Quit.")) {
  303. case 1:
  304. mes "[Paul Spanner]";
  305. mes "Anvil is the most necessary item for Blacksmiths.";
  306. mes "Since you will use an Anvil more than once, you'd better buy a nice one.";
  307. next;
  308. switch(select("Anvil - 30,000z.:Oridecon Anvil - 120,000z.:Golden Anvil - 300,000z.:I need a better anvil.:Cancel.")) {
  309. case 1:
  310. if (Zeny < 30000) {
  311. mes "[Paul Spanner]";
  312. mes "With that much of money, you cannot even buy a toy anvil!";
  313. close;
  314. }
  315. getitem 986,1; //Anvil
  316. Zeny = Zeny-30000;
  317. mes "[Paul Spanner]";
  318. mes "It is the cheapest anvil which has the most basic ability.";
  319. mes "Thank you for using my shop. If you need anything, just let me know.";
  320. close;
  321. case 2:
  322. if (Zeny < 120000) {
  323. mes "[Paul Spanner]";
  324. mes "With that much of money, you cannot even buy a toy anvil!";
  325. close;
  326. }
  327. getitem 987,1; //Oridecon_Anvil
  328. Zeny = Zeny-120000;
  329. mes "[Paul Spanner]";
  330. mes "Ah, you have an eye for anvil. A Blacksmith needs an anvil at least as good as this.";
  331. mes "Thank you for using my shop. If you need anything, just let me know.";
  332. close;
  333. case 3:
  334. if (Zeny < 300000) {
  335. mes "[Paul Spanner]";
  336. mes "With that much of money, you cannot even buy a toy anvil!";
  337. close;
  338. }
  339. getitem 988,1; //Golden_Anvil
  340. Zeny = Zeny-300000;
  341. mes "[Paul Spanner]";
  342. mes "I can tell your ambition to become a good Blacksmith just by looking at you to choose this Golden Anvil!";
  343. mes "This anvil will surely aid you in creating the best weapons.";
  344. close;
  345. case 4:
  346. mes "[Paul Spanner]";
  347. mes "I am sorry, but I do not sell better anvils than Golden Anvil.";
  348. mes "Unless you find the legendary anvil of 'Linggell', I don't think that you could find better one than Golden Anvil in any other places.";
  349. close;
  350. case 5:
  351. mes "[Paul Spanner]";
  352. mes "If you need anything, just let me know.";
  353. close;
  354. }
  355. case 2:
  356. mes "[Paul Spanner]";
  357. mes "You need various materials to process ores and to forge weapons.";
  358. mes "I have everything that you need. Take a look.";
  359. next;
  360. switch(select("Mini Furnace - 150z.:Iron Hammer - 1,000z.:Golden Hammer - 3,000z.:Oridecon Hammer - 5,000z.:Cancel.")) {
  361. case 1:
  362. .@item = 612;
  363. .@item_cost = 150;
  364. .@item_weight = 200;
  365. mes "[Paul Spanner]";
  366. mes "You definately need this furnce to process ores!";
  367. next;
  368. break;
  369. case 2:
  370. .@item = 613;
  371. .@item_cost = 1000;
  372. .@item_weight = 200;
  373. break;
  374. case 3:
  375. .@item = 614;
  376. .@item_cost = 3000;
  377. .@item_weight = 300;
  378. break;
  379. case 4:
  380. .@item = 615;
  381. .@item_cost = 5000;
  382. .@item_weight = 400;
  383. break;
  384. case 5:
  385. mes "[Paul Spanner]";
  386. mes "If you need anything, just let me know.";
  387. close;
  388. }
  389. mes "[Paul Spanner]";
  390. mes "So, how many do you need? If you want to cancel the trade, enter '0'.";
  391. next;
  392. while(1) {
  393. input .@input;
  394. if (.@input == 0) {
  395. mes "[Paul Spanner]";
  396. mes "You have canceled the trade. If you need anything, just let me know.";
  397. close;
  398. }
  399. else if ((.@input < 0) || (.@input > 500)) {
  400. mes "[Paul Spanner]";
  401. mes "You can only buy 500 or less at a time.";
  402. next;
  403. }
  404. else {
  405. break;
  406. }
  407. }
  408. .@sell = .@input * .@item_cost;
  409. if (Zeny < .@sell) {
  410. mes "[Paul Spanner]";
  411. mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
  412. close;
  413. }
  414. if (checkweight(.@item,.@input) == 0) {
  415. mes "[Paul Spanner]";
  416. mes "Hey, you look pale. Why don't you go lighten your weight first.";
  417. close;
  418. }
  419. Zeny = Zeny-.@sell;
  420. getitem .@item,.@input;
  421. mes "[Paul Spanner]";
  422. mes "Thank you for using my shop. If you need anything, just let me know.";
  423. close;
  424. case 3:
  425. mes "[Paul Spanner]";
  426. mes "I have high quality metal.";
  427. mes "So, which metal would you like to buy?";
  428. next;
  429. switch(select("Phracon - 200z.:Emveretarcon - 1,000z.:Quit.")) {
  430. case 1:
  431. .@item = 1010;
  432. .@item_price = 200;
  433. break;
  434. case 2:
  435. .@item = 1011;
  436. .@item_price = 1000;
  437. break;
  438. case 3:
  439. mes "[Paul Spanner]";
  440. mes "If you need anything, just let me know.";
  441. close;
  442. }
  443. mes "[Paul Spanner]";
  444. mes "So, how many of them do you need? If you want to cancel the trade, enter '0'.";
  445. next;
  446. while(1) {
  447. input .@input;
  448. if (.@input == 0) {
  449. mes "[Paul Spanner]";
  450. mes "The trade has been canceled. If you need anything, just let me know.";
  451. close;
  452. }
  453. else if ((.@input < 0) || (.@input > 500)) {
  454. mes "[Paul Spanner]";
  455. mes "You can buy 500 or less at a time.";
  456. next;
  457. }
  458. else {
  459. break;
  460. }
  461. }
  462. .@sell = .@input * .@item_price;
  463. if (Zeny < .@sell) {
  464. mes "[Paul Spanner]";
  465. mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
  466. close;
  467. }
  468. if (checkweight(.@item,.@input) == 0) {
  469. mes "[Paul Spanner]";
  470. mes "Hey, you look pale. Why don't you go lighten your weight first?";
  471. close;
  472. }
  473. getitem .@item,.@input;
  474. Zeny = Zeny-.@sell;
  475. mes "[Paul Spanner]";
  476. mes "Thank you for using my shop. If you need anything, just let me know.";
  477. close;
  478. case 4:
  479. mes "[Paul Spanner]";
  480. mes "I can process Oridecon and Elunium for you.";
  481. mes "You need 5 ores to process them into one Oridecon or Elunium.";
  482. mes "So, which one do you want to process?";
  483. switch(select("Oridecon:Elunium:Quit.")) {
  484. case 1:
  485. if (countitem(756) < 5) {
  486. mes "[Paul Spanner]";
  487. mes "You need 5 ores to process them into one pure Oridecon.";
  488. close;
  489. }
  490. else {
  491. delitem 756,5; //Oridecon_Stone
  492. getitem 984,1; //Oridecon
  493. mes "[Paul Spanner]";
  494. mes "There you go. Thank you for using my service.";
  495. close;
  496. }
  497. case 2:
  498. if (countitem(757) < 5) {
  499. mes "[Paul Spanner]";
  500. mes "You need 5 ores to process them into one pure Elunium.";
  501. close;
  502. }
  503. else {
  504. delitem 757,5; //Elunium_Stone
  505. getitem 985,1; //Elunium
  506. mes "[Paul Spanner]";
  507. mes "There you go. Thank you for using my service.";
  508. close;
  509. }
  510. case 3:
  511. mes "[Paul Spanner]";
  512. mes "If you need anything, just let me know.";
  513. close;
  514. }
  515. case 5:
  516. mes "[Paul Spanner]";
  517. mes "If you need anything, just let me know.";
  518. close;
  519. }
  520. }
  521. // Weapon/Armor Refiners
  522. //============================================================
  523. prt_in,63,60,0 script Hollgrehenn 4_M_03,{
  524. if( getbattleflag( "feature.refineui" ) ){
  525. mes "[Hollgrehenn]";
  526. mes "I'm a blacksmith who can refine weapons and equipment.";
  527. mes "Do you have any items that you'd like to refine?";
  528. close2;
  529. refineui();
  530. end;
  531. }else{
  532. callfunc "refinemain","Hollgrehenn",0;
  533. end;
  534. }
  535. }
  536. morocc_in,73,38,6 script Aragham 4W_M_03,{
  537. if( getbattleflag( "feature.refineui" ) ){
  538. mes "[Aragham]";
  539. mes "De~ sert~ Blacksmith~";
  540. mes "Aragham Ssaleh~ who can refine anything Ssaleh~";
  541. mes "Let me see what you'd like to refine~";
  542. close2;
  543. refineui();
  544. end;
  545. }else{
  546. callfunc "refinemain","Aragham",0;
  547. end;
  548. }
  549. }
  550. payon,144,173,5 script Antonio 4_M_ORIENT01,{
  551. if( getbattleflag( "feature.refineui" ) ){
  552. mes "[Antonio]";
  553. mes "Stop nagging and get me the equipment you want to refine.";
  554. close2;
  555. refineui();
  556. end;
  557. }else{
  558. callfunc "refinemain","Antonio",0;
  559. end;
  560. }
  561. }
  562. alberta_in,28,58,0 script Fredrik 4_M_03,{
  563. if( getbattleflag( "feature.refineui" ) ){
  564. mes "[Fredrik Hermanthorn]";
  565. mes "I am a blacksmith who can refine your weapon or equipment.";
  566. mes "Do you have anything that you'd like to refine?";
  567. close2;
  568. refineui();
  569. end;
  570. }else{
  571. callfunc "refinemain","Fredrik",0;
  572. end;
  573. }
  574. }
  575. yuno_in01,171,21,4 script Lambert 4_M_ORIENT01,{
  576. if( getbattleflag( "feature.refineui" ) ){
  577. mes "[Lambert]";
  578. mes "Wel...come... This is... the best... smithy... in Juno.";
  579. close2;
  580. refineui();
  581. end;
  582. }else{
  583. callfunc "refinemain","Lambert",0;
  584. end;
  585. }
  586. }
  587. ein_in01,24,87,5 script Manthasman 4_M_DWARF,{
  588. if( getbattleflag( "feature.refineui" ) ){
  589. mes "[Manthasman Pruhag]";
  590. mes "Hahaha, you already knew it. So you'd like to refine something?";
  591. mes "Let's try something risky today!";
  592. close2;
  593. refineui();
  594. end;
  595. }else{
  596. callfunc "refinemain","Manthasman Pruhag",0;
  597. end;
  598. }
  599. }
  600. lhz_in02,282,20,7 script Fulerr 4_M_LGTMAN,{
  601. if( getbattleflag( "feature.refineui" ) ){
  602. mes "[Fulerr]";
  603. mes "Hehe... You wanna refine?";
  604. mes "Hehe.. Consider it done..";
  605. mes "Hehe....";
  606. close2;
  607. refineui();
  608. end;
  609. }else{
  610. callfunc "refinemain","Fulerr",0;
  611. end;
  612. }
  613. }
  614. //============================================================
  615. //= Main Refiner Function
  616. //============================================================
  617. //= To allow auto safe refining/multiple refining set the
  618. //= second argument to '1' in the function call.
  619. //= If you enable this function, be sure to edit the value of
  620. //= .@safe to the max safe refine in refine.yml as well.
  621. //============================================================
  622. function script refinemain {
  623. disable_items;
  624. .@npc_name$ = getarg(0);
  625. .@features = getarg(1);
  626. mes "["+ .@npc_name$ +"]";
  627. mes "I'm the Armsmith.";
  628. mes "I can refine all kinds of weapons, armor and equipment, so let me";
  629. mes "know what you want me to refine.";
  630. next;
  631. 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;
  632. for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
  633. if(getequipisequiped(.@indices[.@i])) {
  634. .@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
  635. .@equipped = 1;
  636. }
  637. .@menu$ = .@menu$ + ":";
  638. }
  639. if (.@equipped == 0) {
  640. mes "["+ .@npc_name$ +"]";
  641. mes "I don't think I can refine any items you have...";
  642. close;
  643. }
  644. .@part = .@indices[select(.@menu$)];
  645. if(!getequipisequiped(.@part)) { //custom check
  646. mes "["+ .@npc_name$ +"]";
  647. mes "You're not wearing";
  648. mes "anything there that";
  649. mes "I can refine.";
  650. emotion ET_FRET;
  651. close;
  652. }
  653. //Check if the item is refinable...
  654. if(!getequipisenableref(.@part)) {
  655. mes "["+ .@npc_name$ +"]";
  656. mes "I don't think I can";
  657. mes "refine this item at all...";
  658. close;
  659. }
  660. //Check to see if the items is already +10
  661. if(getequiprefinerycnt(.@part) >= 10) {
  662. mes "["+ .@npc_name$ +"]";
  663. mes "I can't refine this";
  664. mes "any more. This is as";
  665. mes "refined as it gets!";
  666. close;
  667. }
  668. .@refineitemid = getequipid(.@part); // save id of the item
  669. .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
  670. setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);
  671. .@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
  672. .@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
  673. .@itemtype = getiteminfo( .@refineitemid, ITEMINFO_TYPE );
  674. if( .@itemtype == IT_ARMOR ){
  675. .@equip_lv = getequiparmorlv( .@part );
  676. switch( .@equip_lv ){
  677. case 1:
  678. .@safe = 4;
  679. break;
  680. default:
  681. // TODO:
  682. close;
  683. }
  684. // If the VIP system is enabled, the prices for non-VIP players are considerably higher.
  685. if( VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE) ){
  686. switch( .@equip_lv ){
  687. case 1:
  688. .@price = .@price * 10;
  689. break;
  690. default:
  691. // TODO:
  692. close;
  693. }
  694. }
  695. }else if( .@itemtype == IT_WEAPON ){
  696. .@equip_lv = getequipweaponlv( .@part );
  697. switch( .@equip_lv ){
  698. case 1:
  699. .@safe = 7;
  700. break;
  701. case 2:
  702. .@safe = 6;
  703. break;
  704. case 3:
  705. .@safe = 5;
  706. break;
  707. case 4:
  708. .@safe = 4;
  709. break;
  710. default:
  711. // TODO:
  712. close;
  713. }
  714. // If the VIP system is enabled, the prices for non-VIP players are considerably higher.
  715. if( VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE) ){
  716. switch( .@equip_lv ){
  717. case 1:
  718. .@price = .@price * 40;
  719. break;
  720. case 2:
  721. .@price = .@price * 50;
  722. break;
  723. case 3:
  724. .@price = .@price * 2;
  725. break;
  726. case 4:
  727. .@price = .@price * 2;
  728. break;
  729. default:
  730. // TODO:
  731. close;
  732. }
  733. }
  734. }else{
  735. .@safe = 4;
  736. }
  737. // TODO: What was this? Maybe shadow?
  738. // case 5: .@price = .@price * 10; break;
  739. if(.@features != 1) {
  740. mes "["+ .@npc_name$ +"]";
  741. mes "To refine this I need";
  742. mes "one ^003366"+getitemname(.@material)+"^000000 and";
  743. mes "a service fee of " + .@price + " Zeny.";
  744. mes "Do you really wish to continue?";
  745. next;
  746. if(select("Yes:No") == 2){
  747. mes "["+ .@npc_name$ +"]";
  748. mes "Yeah...";
  749. mes "There's no need to";
  750. mes "rush. Take your time.";
  751. close;
  752. }
  753. if(getequippercentrefinery(.@part) < 100) {
  754. mes "["+ .@npc_name$ +"]";
  755. mes "Oh no! If I continue to";
  756. mes "refine this, there's a risk it could";
  757. switch(.@material) {
  758. case 985:
  759. mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
  760. break;
  761. default:
  762. mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
  763. mes "or any added special properties.";
  764. break;
  765. }
  766. next;
  767. mes "["+getarg(0)+"]";
  768. mes "I can't make it any clearer.";
  769. mes "Once a weapon is destroyed,";
  770. mes "there's no getting it back.";
  771. mes "You really have a chance to";
  772. mes "^FF0000lose this weapon^000000 forever.";
  773. mes "Do you still want to refine?";
  774. next;
  775. if(select("Yes:No") == 2){
  776. mes "["+ .@npc_name$ +"]";
  777. mes "I completely agree...";
  778. mes "I might be a great refiner, but sometimes even I make mistakes.";
  779. close;
  780. }
  781. }
  782. if((countitem(.@material) < 1) || (Zeny < .@price)) {
  783. mes "["+ .@npc_name$ +"]";
  784. mes "You don't seem to have";
  785. mes "enough Zeny or "+getitemname(.@material)+"...";
  786. mes "Go get some more. I'll be";
  787. mes "here all day if you need me.";
  788. close;
  789. }
  790. Zeny = Zeny-.@price;
  791. delitem .@material,1;
  792. // anti-hack
  793. if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
  794. callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) {
  795. mes "["+ .@npc_name$ +"]";
  796. emotion ET_FRET;
  797. mes "Wait a second...";
  798. mes "Do you think I'm stupid?!";
  799. mes "You switched the item while I wasn't looking! Get out of here!";
  800. close;
  801. }
  802. if(getequippercentrefinery(.@part) <= rand(100)) {
  803. failedrefitem .@part;
  804. mes "["+ .@npc_name$ +"]";
  805. emotion (!rand(5))?ET_MONEY:ET_HUK;
  806. .@lose = rand(1,3);
  807. if (.@lose == 1) {
  808. mes "OH! MY GOD!";
  809. mes "Damn it! Not again!";
  810. mes "I'm terribly sorry, but you know practice does make perfect.";
  811. mes "Um, right? Heh heh...";
  812. } else if(.@lose == 2) {
  813. mes "Nooooooo!";
  814. mes "It broke!";
  815. mes "I-I'm sorry!";
  816. } else {
  817. mes "Crap!";
  818. mes "It couldn't take";
  819. mes "much more tempering!";
  820. mes "Sorry about this...";
  821. }
  822. close;
  823. }
  824. mes "["+getarg(0)+"]";
  825. successrefitem .@part;
  826. emotion ET_SMILE;
  827. .@win = rand(1,3);
  828. if (.@win == 1) {
  829. mes "Perfect!";
  830. mes "Heh heh!";
  831. mes "Once again,";
  832. mes "flawless work";
  833. mes "from the master~";
  834. } else if(.@win == 2) {
  835. mes "Success...!";
  836. mes "Yet again, my amazing";
  837. mes "talent truly dazzles";
  838. mes "and shines today.";
  839. } else {
  840. mes "Heh heh!";
  841. mes "I'm all done.";
  842. mes "No doubt, my work is";
  843. mes "to your satisfaction.";
  844. mes "Sheer, utter perfection~";
  845. }
  846. close;
  847. }
  848. // New Refining Functions ========================
  849. if (.@refinerycnt < .@safe) {
  850. mes "["+ .@npc_name$ +"]";
  851. mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
  852. next;
  853. .@menu2 = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
  854. } else
  855. .@menu2 = 2;
  856. switch(.@menu2){
  857. case 1:
  858. .@refinecnt = .@safe - .@refinerycnt;
  859. break;
  860. case 2:
  861. next;
  862. mes "["+ .@npc_name$ +"]";
  863. mes "How many times would you like me to refine your item?";
  864. next;
  865. input .@refinecnt;
  866. .@refinecheck = .@refinecnt + .@refinerycnt;
  867. if (.@refinecnt < 1 || .@refinecheck > 10) {
  868. mes "["+ .@npc_name$ +"]";
  869. mes "I can't refine this item that many times.";
  870. close;
  871. }
  872. if(.@refinecheck > .@safe) {
  873. .@refinecheck = .@refinecheck - .@safe;
  874. mes "["+ .@npc_name$ +"]";
  875. mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
  876. next;
  877. if(select("Yes...","No...") == 2){
  878. mes "["+ .@npc_name$ +"]";
  879. mes "You said so... So be it.";
  880. close;
  881. }
  882. }
  883. break;
  884. case 3:
  885. next;
  886. mes "["+ .@npc_name$ +"]";
  887. mes "You said so... So be it.";
  888. close;
  889. }
  890. .@fullprice = .@price * .@refinecnt;
  891. mes "["+ .@npc_name$ +"]";
  892. mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
  893. next;
  894. if(select("Yes","No...") == 2){
  895. mes "["+ .@npc_name$ +"]";
  896. mes "You said so... So be it.";
  897. close;
  898. }
  899. if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) {
  900. mes "["+ .@npc_name$ +"]";
  901. mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
  902. close;
  903. }
  904. Zeny = Zeny - .@fullprice;
  905. delitem .@material,.@refinecnt;
  906. while(.@refinecnt){
  907. if (getequipisequiped(.@part) == 0) {
  908. mes "["+ .@npc_name$ +"]";
  909. mes "Look here... you don't have any items on...";
  910. close;
  911. }
  912. // anti-hack
  913. if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
  914. callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt) || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) {
  915. mes "["+ .@npc_name$ +"]";
  916. mes "Clang... No, but did you imagine I could be so stupid?!";
  917. mes "You changed it...";
  918. mes "Get out before I stun you with my Hammer!!";
  919. close;
  920. }
  921. mes "Clang, clang!!!";
  922. if(.@menu2 == 2 && getequippercentrefinery(.@part) <= rand(100)) {
  923. failedrefitem .@part;
  924. emotion ET_HUK;
  925. mes "["+ .@npc_name$ +"]";
  926. mes "WAHHHH!!! I'm so sorry... I warned you this could happen...";
  927. .@refinecnt = .@refinecnt - 1;
  928. if(.@refinecnt == 0) close;
  929. mes "Here's the unused Zeny and materials back...";
  930. getitem .@material,.@refinecnt;
  931. .@fullprice = .@refinecnt * .@price;
  932. Zeny = Zeny + .@fullprice;
  933. close;
  934. }
  935. successrefitem .@part;
  936. emotion ET_BEST;
  937. .@refinecnt = .@refinecnt - 1;
  938. .@refinerycnt = getequiprefinerycnt(.@part);
  939. next;
  940. }
  941. mes "["+ .@npc_name$ +"]";
  942. mes "All finished... Come again soon.";
  943. close;
  944. }
  945. // Material Salesmen
  946. //============================================================
  947. prt_in,56,68,5 script Vurewell 86,{
  948. callfunc "phramain","Vurewell";
  949. end;
  950. }
  951. payon,145,178,3 script Begnahd 88,{
  952. callfunc "phramain","Begnahd";
  953. end;
  954. }
  955. morocc_in,63,32,6 script Sade 99,{
  956. callfunc "phramain","Sade";
  957. end;
  958. }
  959. alberta_in,13,71,3 script Kahlamanlith 86,{
  960. callfunc "phramain","Kahlamanlith";
  961. end;
  962. }
  963. yuno_in01,171,27,4 script Dilemma 88,{
  964. callfunc "phramain","Dilemma";
  965. end;
  966. }
  967. ein_in01,15,87,3 script Tirehaus 86,{
  968. callfunc "phramain","Tirehaus";
  969. end;
  970. }
  971. lhz_in02,278,24,3 script Krugg 86,{
  972. callfunc "phramain","Krugg";
  973. end;
  974. }
  975. // Material Salesmen Functions
  976. //============================================================
  977. function script phramain {
  978. if (checkweight(1201,1) == 0) {
  979. mes "- Wait a minute !! -";
  980. mes "- Currently you're carrying -";
  981. mes "- too many items with you. -";
  982. mes "- Please try again -";
  983. mes "- after you lose some weight. -";
  984. close;
  985. }
  986. .@npc_name$ = getarg(0);
  987. mes "["+ .@npc_name$ +"]";
  988. mes "I sell 2 kinds of Metal";
  989. mes "for tempering weaponry.";
  990. mes "I have ^007777Phracon^000000 for Level 1";
  991. mes "Weapons, and ^007777Emveretarcon^000000";
  992. mes "for Level 2 Weapons.";
  993. next;
  994. switch(select("Phracon - 200 Zeny:Emveretarcon - 1000 Zeny:Ask about other Metals")) {
  995. case 1:
  996. .@material = 1010;
  997. .@price = 200;
  998. break;
  999. case 2:
  1000. .@material = 1011;
  1001. .@price = 1000;
  1002. break;
  1003. case 3:
  1004. mes "["+ .@npc_name$ +"]";
  1005. mes "Other metals?";
  1006. mes "Well, you'll need special metals to upgrade higher level weapons, or any kind of armor. But you know, Oridecon and Elunium is really";
  1007. mes "hard to just find...";
  1008. close;
  1009. }
  1010. mes "["+ .@npc_name$ +"]";
  1011. mes "So how many do you wish to buy?";
  1012. mes "If you don't want any, please enter the number, '0.'";
  1013. next;
  1014. while(1) {
  1015. input .@input;
  1016. if (.@input == 0) {
  1017. mes "["+ .@npc_name$ +"]";
  1018. mes "The deal has";
  1019. mes "been cancelled.";
  1020. close;
  1021. }
  1022. else if (.@input < 0 || .@input > 500) {
  1023. mes "["+ .@npc_name$ +"]";
  1024. mes "Alright, you can";
  1025. mes "puchase up to 500.";
  1026. mes "No more than that,";
  1027. mes "got it? Good.";
  1028. next;
  1029. }
  1030. else {
  1031. break;
  1032. }
  1033. }
  1034. .@sell = .@input * .@price;
  1035. if (Zeny < .@sell) {
  1036. mes "["+ .@npc_name$ +"]";
  1037. mes "Err...";
  1038. mes "You don't have";
  1039. mes "enough Zeny to buy";
  1040. mes ""+ .@input +" of them.";
  1041. close;
  1042. }
  1043. if (checkweight(.@material,.@input) == 0) {
  1044. mes "["+ .@npc_name$ +"]";
  1045. mes "Hmm...";
  1046. mes "I can't give you anything if you don't have enough room in your inventory. Why don't you put your extra things in Kafra Storage and try again?";
  1047. close;
  1048. }
  1049. getitem .@material,.@input;
  1050. Zeny = Zeny-.@sell;
  1051. mes "["+ .@npc_name$ +"]";
  1052. mes "Here you are!";
  1053. mes "Thank you for";
  1054. mes "your patronage.";
  1055. close;
  1056. }
  1057. // Ori/Elu Refiners
  1058. //============================================================
  1059. prt_in,63,69,3 script Dietrich 84,{
  1060. callfunc "orimain","Dietrich";
  1061. end;
  1062. }
  1063. payon,137,178,5 script Hakhim 88,{
  1064. callfunc "orimain","Hakhim";
  1065. end;
  1066. }
  1067. morocc_in,72,32,6 script Abdula 99,{
  1068. callfunc "orimain","Abdula";
  1069. end;
  1070. }
  1071. alberta_in,21,63,5 script Xenophon 84,{
  1072. callfunc "orimain","Xenophon Zolotas";
  1073. end;
  1074. }
  1075. yuno_in01,164,27,4 script Delight 88,{
  1076. callfunc "orimain","Delight";
  1077. end;
  1078. }
  1079. ein_in01,18,82,6 script Matestein 84,{
  1080. callfunc "orimain","Matestein";
  1081. end;
  1082. }
  1083. lhz_in02,281,24,5 script Fruel 84,{
  1084. callfunc "orimain","Fruel";
  1085. end;
  1086. }
  1087. // Ori/Elu Functions
  1088. //============================================================
  1089. function script orimain {
  1090. if (checkweight(1201,1) == 0) {
  1091. mes "- Wait a minute !! -";
  1092. mes "- Currently you're carrying -";
  1093. mes "- too many items with you. -";
  1094. mes "- Please try again -";
  1095. mes "- after you lose some weight. -";
  1096. close;
  1097. }
  1098. .@npc_name$ = getarg(0);
  1099. mes "["+ .@npc_name$ +"]";
  1100. mes "I can purify your";
  1101. mes "Rough Oridecons or";
  1102. mes "Rough Eluniums. I'll need";
  1103. mes "5 Rough Stones to make";
  1104. mes "1 pure one for you.";
  1105. next;
  1106. switch(select("Make Oridecon:Make Elunium:Ask about Enchanted Stones")) {
  1107. case 1:
  1108. if (countitem(756) > 4) {
  1109. delitem 756,5; //Oridecon_Stone
  1110. getitem 984,1; // Oridecon
  1111. mes "["+ .@npc_name$ +"]";
  1112. mes "Here's your Oridecon.";
  1113. mes "You're welcome to come";
  1114. mes "back whenever you want.";
  1115. close;
  1116. }
  1117. else {
  1118. mes "["+ .@npc_name$ +"]";
  1119. mes "You're kidding me, right?";
  1120. mes "I just told you that I need 5 Rough Oridecons to make a pure Oridecon.";
  1121. close;
  1122. }
  1123. case 2:
  1124. if (countitem(757) > 4) {
  1125. delitem 757,5; //Elunium_Stone
  1126. getitem 985,1; // Elunium
  1127. mes "["+ .@npc_name$ +"]";
  1128. mes "Here's your Elunium.";
  1129. mes "You're welcome to come";
  1130. mes "back whenever you want.";
  1131. close;
  1132. }
  1133. else {
  1134. mes "["+ .@npc_name$ +"]";
  1135. mes "You're kidding me, right?";
  1136. mes "I just told you that I need 5 Rough Eluniums to make a pure Elunium.";
  1137. close;
  1138. }
  1139. case 3:
  1140. mes "["+ .@npc_name$ +"]";
  1141. mes "Enchanted Stones...?";
  1142. mes "I've been a stonesmith for 20 years, so I've heard a lot about them. Supposedly, there are";
  1143. mes "four different kinds.";
  1144. next;
  1145. mes "["+ .@npc_name$ +"]";
  1146. mes "Each Enchanted Stone possesses one of the following elemental properties: Earth, Wind, Water and Fire.";
  1147. next;
  1148. mes "["+ .@npc_name$ +"]";
  1149. mes "If someone combines a Enchanted Stone with a weapon while smithing, that weapon will possess the same property as the Stone.";
  1150. next;
  1151. mes "["+ .@npc_name$ +"]";
  1152. mes "Needless to say, you need to have some smithing skill to produce this kind of elemental weapon.";
  1153. close;
  1154. }
  1155. }
  1156. // Equipment Repairmen
  1157. //============================================================
  1158. alberta_in,31,65,4 script Repairman#alb 86,{
  1159. callfunc "repairmain","Repairman";
  1160. end;
  1161. }
  1162. moc_ruins,107,94,4 script Repairman#moc 99,{
  1163. callfunc "repairmain","Repairman";
  1164. end;
  1165. }
  1166. payon,143,165,4 script Repairman#pay 88,{
  1167. callfunc "repairmain","Repairman";
  1168. end;
  1169. }
  1170. prt_in,63,54,2 script Repairman#prt 86,{
  1171. callfunc "repairmain","Grendal";
  1172. end;
  1173. }
  1174. yuno_in01,175,28,3 script Repairman#juno 86,{
  1175. callfunc "repairmain","Repairman";
  1176. end;
  1177. }
  1178. geffen_in,34,166,3 script Repairman#gef 99,{
  1179. callfunc "repairmain","Repairman";
  1180. end;
  1181. }
  1182. aldeba_in,38,60,3 script Repairman#alde 86,{
  1183. callfunc "repairmain","Repairman";
  1184. end;
  1185. }
  1186. lhz_in02,284,14,3 script Repairman#lhz 86,{
  1187. callfunc "repairmain","Repairman";
  1188. end;
  1189. }
  1190. prt_gld,139,117,4 script Repairman#prt_gld 86,{
  1191. callfunc "repairmain","Repairman";
  1192. end;
  1193. }
  1194. gef_fild13,263,117,4 script Repairman#gef_fild 86,{
  1195. callfunc "repairmain","Repairman";
  1196. end;
  1197. }
  1198. pay_gld,295,183,4 script Repairman#pay_gld 86,{
  1199. callfunc "repairmain","Repairman";
  1200. end;
  1201. }
  1202. alde_gld,220,152,4 script Repairman#alde_gld 86,{
  1203. callfunc "repairmain","Repairman";
  1204. end;
  1205. }
  1206. aru_gld,189,336,4 script Repairman#aru_gld 86,{
  1207. callfunc "repairmain","Repairman";
  1208. end;
  1209. }
  1210. sch_gld,340,80,7 script Repairman#sch_gld 86,{
  1211. callfunc "repairmain","Repairman";
  1212. end;
  1213. }
  1214. // Equipment Repair Function
  1215. //============================================================
  1216. function script repairmain {
  1217. .@repairprice = 5000;
  1218. .@npc_name$ = getarg(0);
  1219. mes "["+ .@npc_name$ +"]";
  1220. mes "Hey there!";
  1221. mes "Do you want me";
  1222. mes "to repair any items?";
  1223. mes "You can count on me";
  1224. mes "for item repairs!";
  1225. next;
  1226. switch(select("Actually, I do have some items...:None at the moment.")) {
  1227. case 1:
  1228. .@checkitem = 1;
  1229. while (1) {
  1230. if (getbrokenid(.@checkitem) == 0) {
  1231. break;
  1232. }
  1233. .@checkitem = .@checkitem+1;
  1234. }
  1235. .@checkitem = .@checkitem-1;
  1236. if (!.@checkitem) {
  1237. mes "["+ .@npc_name$ +"]";
  1238. mes "Oh wow, this is incredible!";
  1239. mes "You must take very good care of your things. None of your items are damaged!";
  1240. next;
  1241. mes "["+ .@npc_name$ +"]";
  1242. mes "If everyone is like you, I'm going to be unemployed!! Haha~!";
  1243. close;
  1244. }
  1245. mes "["+ .@npc_name$ +"]";
  1246. mes "Hmm...";
  1247. mes "Let's see...";
  1248. mes "Out of all your items,";
  1249. mes "" + .@checkitem + " are damaged.";
  1250. mes "Would you like to repair?";
  1251. next;
  1252. .@totalcost = .@repairprice*.@checkitem;
  1253. mes "["+ .@npc_name$ +"]";
  1254. mes "Each repair costs " + .@repairprice + " Zeny. So to repair all your damaged items would cost " + .@totalcost + " Zeny! Would you like to repair the items?";
  1255. next;
  1256. switch(select("Yes:No")) {
  1257. case 1:
  1258. if (Zeny < .@totalcost) {
  1259. mes "["+ .@npc_name$ +"]";
  1260. mes "Whoa whoa...";
  1261. mes "Check your wallet before you receive the repair bill! I can't repair anything because you don't have enough Zeny.";
  1262. close;
  1263. }
  1264. .@checkitem2 = 1;
  1265. while (1) {
  1266. if (getbrokenid(.@checkitem2) == 0) {
  1267. break;
  1268. }
  1269. .@checkitem2 = .@checkitem2+1;
  1270. }
  1271. .@checkitem2 = .@checkitem2-1;
  1272. if (.@checkitem == .@checkitem2) {
  1273. Zeny = Zeny-.@totalcost;
  1274. while (.@checkitem) {
  1275. repair(.@checkitem);
  1276. .@checkitem = .@checkitem-1;
  1277. }
  1278. mes "["+ .@npc_name$ +"]";
  1279. mes "Okay! All done. Now, try to be a little more careful. Items have lives too you know.";
  1280. close;
  1281. }
  1282. else {
  1283. mes "["+ .@npc_name$ +"]";
  1284. mes "Mmm? Something's wrong. Wait... Equip the items you need to repair and then come back to me.";
  1285. close;
  1286. }
  1287. case 2:
  1288. mes "["+ .@npc_name$ +"]";
  1289. mes "Well, it's no skin off my nose, but it's not good to leave items damaged. You should get them repaired as soon as possible!";
  1290. close;
  1291. }
  1292. case 2:
  1293. mes "["+ .@npc_name$ +"]";
  1294. mes "Hohoho...";
  1295. mes "You don't have";
  1296. mes "any business with me";
  1297. mes "if you don't have any";
  1298. mes "items to repair.";
  1299. close;
  1300. }
  1301. }
  1302. //============================================================
  1303. // Old changelog
  1304. //============================================================
  1305. //= 1.0 by A bunch of people!
  1306. //= Syrus22 - Completely redid the script using functions... also
  1307. //= added the option for auto safe refining and multiple refining.
  1308. //= 1.1 Negative input bug fixed [Lupus]
  1309. //= 1.2 Added additional reparimen in Morocc and payon. Added
  1310. //= Christopher the blacksmith in Geffen. Edited some dialogue [kobra_k88]
  1311. //= 1.3 New Payon Locations [Darkchild]
  1312. //= Corrected zeny subtraction thx to jpnmania77.[kobra_k88]
  1313. //= 1.3a Temporary corrected an exploit. Need to check sources
  1314. //= to fully fix bug [Shinigami]
  1315. //= Fixed repairman prices [shadowlady]
  1316. //= Fixed bug that skips requirements thanks to sir_loon [massdriller]
  1317. //= Fixed itemid error thanks to -Vitamin- [massdriller]
  1318. //= 1.4 check again item in refining procedure to avoid
  1319. //= hacker that can change item [dafide18]
  1320. //= 1.5 Fixed crashing due to badly used callfunc's [Skotlex]
  1321. //= Lupus, don't rollback this important fix again! >.<
  1322. //= 1.5a Corrected an unneeded callfunc, fixed the anti-bot
  1323. //= exploit ruining the safe refine loop. [Skotlex]
  1324. //= 1.5b Fixed Spelling mistakes. [Nexon]
  1325. //= 1.6 Replaced all breaks for ends as per the new script engine [Skotlex]
  1326. //= 1.7 Added Einbroch Refiners (Custom names ^^;) and a duplicated BS Shop. [Poki#3]
  1327. //= 1.8 Added Lighthalzen Refiners (Custom names again ^^;) [Poki#3]
  1328. //= 1.8a Fixed wrong indication thanks to NeoSaro [Lupus]
  1329. //= 1.9 Rewrote repairman, removed the Steel from repair cost [DracoRPG]
  1330. //= 2.0 Fixed missed equppment presence check. Thx2 Coltaro [Lupus]
  1331. //= 2.0a Added weight checks thanks to Neouni [Playtester]
  1332. //= 2.0b Fixed the names of Lighthalzen and Einbroch refiners thanks to Maud_Dib [Kargha]
  1333. //= 2.1 Removed Duplicates [Silent]
  1334. //= 2.2 Changed name from "Emvertacon" to "Emveretarcon". [Samuray22]
  1335. //= Thanks to Barron-Monster.
  1336. //= 2.2b Changed name from "Pharacon" to "Phracon". [Samuray22]
  1337. //= Thanks to Barron-Monster.
  1338. //= 2.3 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
  1339. //= 2.4 Updated Refiner function. cleaner, and less dated. [L0ne_w0lf]
  1340. //= 2.5 Rather large update to the refiner and merchants. :D [L0ne_W0lf]
  1341. //= 2.6 Fixed a few bugs with creating pure stones. [L0ne_W0lf]
  1342. //= 2.7 Refiner function accepts additional paramater. [L0ne_W0lf]
  1343. //= 0 = No special features; 1 = new refining features
  1344. //= Updated Repairmen and function. No longer shows menu.
  1345. //= 2.7a A couple touch-ups to the repairman function. [L0ne_w0lf]
  1346. //= 2.8 Changed the nonexistent variable .@matname$ for getitemname(.@material). (bugreport:2340) [Samuray22]
  1347. //= 2.8 Added proper Blacksmith Supplier to Einroch. [L0ne_W0lf]
  1348. //= Updated dated features comment to reflect new usage.
  1349. //= 2.8a Small bugfix. (bugreport:2418) [Paradox924X]
  1350. //= 2.9 Moved Morocc repairman to Morocc Ruins. [L0ne_W0lf]
  1351. //============================================================