socket_enchant2.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. //===== rAthena Script =======================================
  2. //= Episode 12 Socket Enchant NPC
  3. //===== By: ==================================================
  4. //= Gepard
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= rAthena SVN
  9. //===== Description: =========================================
  10. //= [Aegis Conversion]
  11. //= Adds slots to selected weapons and armor.
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version.
  14. //= 1.1 Duplicates now spawn from floating NPCs. [L0ne_W0lf]
  15. //============================================================
  16. - script Leablem#dummy::SocketEnchant2 -1,{
  17. if (checkweight(1201,1) == 0)
  18. {
  19. mes "- Wait a minute !! -";
  20. mes "- Currently you're carrying -";
  21. mes "- too many items with you. -";
  22. mes "- Please try again -";
  23. mes "- after you lose some weight. -";
  24. close;
  25. }
  26. mes "[Leablem]";
  27. mes "Good day. My name is Leablem,";
  28. mes "and I'm a technician that specializes in";
  29. mes "adding slots to weapons and armors.";
  30. mes "It can be very hard sometimes, but I like";
  31. mes "what I do, and take pride in it.";
  32. next;
  33. mes "[Leablem]";
  34. mes "I've learned most of the things from my brother, Seyablem,";
  35. mes "but I think I still have a lot to learn.";
  36. mes "So please understand my slotting services are limited,";
  37. mes "unlike my brother Seyablem.";
  38. next;
  39. mes "[Leablem]";
  40. mes "My brother wasn't so happy to teach me";
  41. mes "his skills because he was worried that his skills";
  42. mes "wouldn't be unique anymore. He did, however, his best";
  43. mes "to teach me.";
  44. next;
  45. mes "[Leablem]";
  46. mes "Thanks to him, I've learned lots of things.";
  47. mes "I'm not very confident";
  48. mes "in trying many different things,";
  49. mes "but I'll do what";
  50. mes "I can do for now.";
  51. next;
  52. mes "[Leablem]";
  53. mes "In fact, there's one thing";
  54. mes "that my brother doesn't want me to do.";
  55. mes "I don't want to upset him, so...let's just skip that part.";
  56. mes "I'll say no more about it!";
  57. next;
  58. mes "[Leablem]";
  59. mes "Anyways, do you have any equipment";
  60. mes "which you'd like to add to the slots?";
  61. mes "My service charge, the materials,";
  62. mes "and the success chance all depend on";
  63. mes "the specific item I'm working on.";
  64. next;
  65. switch(select("Weapon:Armor:About that thing you skipped:More information:Quit"))
  66. {
  67. case 1:
  68. mes "[Leablem]";
  69. mes "Weapon, you said? Sure, no problem.";
  70. mes "Weapons are divided into 4 different class";
  71. mes "depending on the work difficulty.";
  72. mes "C class is the easiest one, and S class is the hardest one.";
  73. mes "Which class would you like to try?";
  74. next;
  75. switch(select("C:B:A:S"))
  76. {
  77. case 1:
  78. mes "[Leablem]";
  79. mes "C class, I see.";
  80. mes "So, what kind of weapon do you have?";
  81. next;
  82. switch(select("Book of Mother Earth:Book of Billows:Book of Gust of Wind:Book of the Blazing Sun"))
  83. {
  84. case 1: callfunc "Func_Socket2",1554,1569,40,66,200,1010,10;
  85. case 2: callfunc "Func_Socket2",1553,1568,40,66,200,1010,10;
  86. case 3: callfunc "Func_Socket2",1556,1571,40,66,200,1010,10;
  87. case 4: callfunc "Func_Socket2",1555,1570,40,66,200,1010,10;
  88. }
  89. case 2:
  90. mes "[Leablem]";
  91. mes "You have chosen average B class.";
  92. mes "So, what kind of weapon do you have?";
  93. next;
  94. switch(select("Orcish Axe:Scimiter:Spike"))
  95. {
  96. case 1: callfunc "Func_Socket2",1304,1309,40,66,200,984,1;
  97. case 2: callfunc "Func_Socket2",1113,1114,40,66,200,984,1;
  98. case 3: callfunc "Func_Socket2",1523,1538,40,61,300,984,1;
  99. }
  100. case 3:
  101. mes "[Leablem]";
  102. mes "A class? You seem to want little too much. But, no problem.";
  103. mes "So, what kind of weapon do you have?";
  104. next;
  105. switch(select("Dragon Killer:Katar of Quaking:Katar of Raging Blaze:Katar of Frozen Icicle:Katar of Piercing Wind:Golden Mace:Oriental Lute:Queen's Whip:Spectral Spear:Gae Bolg:Schweizersabel"))
  106. {
  107. case 1: callfunc "Func_Socket2",13001,13030,40,61,500,984,2;
  108. case 2: callfunc "Func_Socket2", 1257, 1276,40,66,500,984,2;
  109. case 3: callfunc "Func_Socket2", 1258, 1277,40,66,500,984,2;
  110. case 4: callfunc "Func_Socket2", 1256, 1275,40,66,500,984,2;
  111. case 5: callfunc "Func_Socket2", 1259, 1278,40,66,500,984,2;
  112. case 6: callfunc "Func_Socket2", 1524, 1539,40,61,500,984,2;
  113. case 7: callfunc "Func_Socket2", 1918, 1922,40,61,500,984,2;
  114. case 8: callfunc "Func_Socket2", 1970, 1976,40,61,500,984,2;
  115. case 9: callfunc "Func_Socket2", 1477, 1479,40,56,500,984,2;
  116. case 10: callfunc "Func_Socket2", 1474, 1480,40,56,500,984,2;
  117. case 11: callfunc "Func_Socket2", 1167, 1178,40,61,500,984,2;
  118. }
  119. case 4:
  120. mes "[Leablem]";
  121. mes "Huh, S Class?! Oh my god, are you serious?*Tremble*";
  122. mes "So...which S class weapon would you like to make a slot?!";
  123. next;
  124. switch(select("Zephyrus:Mailbreaker:Dragon Slayer:Swordbreaker:Assasin Dagger:Grand Cross:Executioner"))
  125. {
  126. case 1: callfunc "Func_Socket2",1468, 1481,40,51,1000,984,5,999,10;
  127. case 2: callfunc "Func_Socket2",1225,13032,40,51,1000,984,5,999,10;
  128. case 3: callfunc "Func_Socket2",1166, 1180,40,51,1000,984,5,999,10;
  129. case 4: callfunc "Func_Socket2",1224,13031,40,51,1000,984,5,999,10;
  130. case 5: callfunc "Func_Socket2",1232,13033,40,51,1000,984,5,999,10;
  131. case 6: callfunc "Func_Socket2",1528, 1540,40,51,1000,984,5,999,10;
  132. case 7: callfunc "Func_Socket2",1169, 1179,40,51,1000,984,5,999,10;
  133. }
  134. }
  135. case 2:
  136. mes "[Leablem]";
  137. mes "Armor, you said? Sure, no problem.";
  138. mes "Weapons are divided into 4 different class";
  139. mes "depending on the work difficulty.";
  140. mes "C class is the easiest one, and S class is the hardest one.";
  141. mes "Which class would you like to try?";
  142. next;
  143. switch(select("C:B:A:S"))
  144. {
  145. case 1:
  146. mes "[Leablem]";
  147. mes "C class, I see.";
  148. mes "So, what kind of armor do you have?";
  149. next;
  150. switch(select("Sunflower:Ph.D Hat:Big Ribbon:Boys Cap"))
  151. {
  152. case 1: callfunc "Func_Socket2",2253,5351,40,66,100,999,3;
  153. case 2: callfunc "Func_Socket2",5012,5347,40,66,100,999,3;
  154. case 3: callfunc "Func_Socket2",2244,5348,40,66,100,999,5;
  155. case 4: callfunc "Func_Socket2",5016,5349,40,66,100,999,5;
  156. }
  157. case 2:
  158. mes "[Leablem]";
  159. mes "You have chosen average B class.";
  160. mes "So, what kind of armor do you have?";
  161. next;
  162. switch(select("Skull Ring:High Heels"))
  163. {
  164. case 1: callfunc "Func_Socket2",2609,2715,40,61,300,999,5;
  165. case 2: callfunc "Func_Socket2",2409,2432,40,61,300,999,5;
  166. }
  167. case 3:
  168. mes "[Leablem]";
  169. mes "A class? You seem to want little too much. But, no problem.";
  170. mes "So, what kind of armor do you have?";
  171. next;
  172. switch(select("Pirate Bandana:Black Leather Boots"))
  173. {
  174. case 1: callfunc "Func_Socket2",2287,5350,50,61,500,985,1; // 50,61 - it's not a typo
  175. case 2: callfunc "Func_Socket2",2425,2434,40,51,500,985,1;
  176. }
  177. case 4:
  178. mes "[Leablem]";
  179. mes "Huh, S Class?! Oh my god, are you serious?*Tremble*";
  180. mes "So...which S class armor would you like to make a slot?!";
  181. next;
  182. switch(select("Mage Coat:Holy Robe:Sacred Mission:Undershirt:Pantie"))
  183. {
  184. case 1: callfunc "Func_Socket2",2334,2372,40,51,1000,985,1; // Mage Coat has 10% success chance
  185. case 2: callfunc "Func_Socket2",2327,2373,45,51,1000,985,1; // the rest has 5%
  186. case 3: callfunc "Func_Socket2",2111,2128,45,51,1000,985,1;
  187. case 4: callfunc "Func_Socket2",2522,2523,45,51,1000,985,1;
  188. case 5: callfunc "Func_Socket2",2339,2371,45,51,1000,985,1;
  189. }
  190. }
  191. case 3:
  192. mes "[Leablem]";
  193. mes "Oh, it's nothing special, but he thinks";
  194. mes "it's not something for humans to mess with. ";
  195. mes "I don't want to upset my brother,";
  196. mes "so I'd better forget about it.";
  197. next;
  198. mes "[Leablem]";
  199. mes "...That service itself has a very high success chance,";
  200. mes "but requires a lot of materials and a high-rate service charge. ";
  201. mes "I highly doubt that anyone would actually want to use";
  202. mes "the service, even if I did open it.";
  203. next;
  204. mes "[Leablem]";
  205. mes "...Ummm...";
  206. next;
  207. mes "[Leablem]";
  208. mes ".............";
  209. next;
  210. mes "[Leablem]";
  211. mes ".............";
  212. next;
  213. mes "[Leablem]";
  214. mes "You seem interested in using that service.";
  215. mes "If you want, I can at least tell you about it. ";
  216. mes "But you must promise to keep this a secret.";
  217. mes "If my brother finds out what I'm about to tell you,";
  218. mes "he's gonna give me a beating!";
  219. next;
  220. mes "[Leablem]";
  221. mes "This special service has a 90% success chance,";
  222. mes "but requires 2 Gold and 2 hundred million zeny:";
  223. mes "I can add slots to the Hat of the Sun God.";
  224. next;
  225. mes "[Leablem]";
  226. mes "My brother said that, even since ancient times, it's forbidden to modify that hat. ";
  227. mes "But I believe humans are too curious not to";
  228. mes "experiment, especially when it's forbidden.";
  229. mes "I just don't want my brother to yell at me. That's all.";
  230. next;
  231. switch(select("Use the Service","Quit"))
  232. {
  233. case 1:
  234. mes "[Leablem]";
  235. mes ".................";
  236. next;
  237. mes "[Leablem]";
  238. mes ".................";
  239. next;
  240. mes "[Leablem]";
  241. mes "...Wh... What? No!";
  242. mes "Giving me that dirty look";
  243. mes "won't make me do it!";
  244. mes "No, I said no! No is no! No!";
  245. next;
  246. mes "[Leablem]";
  247. mes "No, I won't! No!";
  248. next;
  249. mes "[Leablem]";
  250. mes "I can't do it...";
  251. next;
  252. mes "[Leablem]";
  253. mes "I can't do... It...";
  254. next;
  255. mes "[Leablem]";
  256. mes ".................";
  257. next;
  258. mes "[Leablem]";
  259. mes "Umm...";
  260. next;
  261. mes "[Leablem]";
  262. mes "You're so persistent. Okay, I'll make you an exception.";
  263. mes "Just don't tell anyone,";
  264. mes "especially my brother. Do you promise?";
  265. next;
  266. mes "[Leablem]";
  267. mes "Okay then, please bring me";
  268. mes "^FF00002 Gold, 2 hundred million zeny -- the service charge --,";
  269. mes "^FF0000and a Hat of the Sun God.";
  270. mes "^FF0000You know your chance of success is 90% with this, don't you?^000000";
  271. mes "We don't have time to waste,";
  272. mes "so let's get down to business right away.";
  273. next;
  274. if ((Zeny > 199999999) && (countitem(969) > 1) && (countitem(5022) > 0))
  275. {
  276. mes "[Leablem]";
  277. mes "Shall we start now?";
  278. mes "Pray to your gods for good luck.";
  279. next;
  280. set .@a, rand(1,100);
  281. if ((.@a > 4) && (.@a < 95))
  282. {
  283. specialeffect EF_LORD;
  284. mes "[Leablem]";
  285. mes "Excellent! Wow, I guess the 90% success chance is true!";
  286. mes "Look, the slot was added in the perfect place.";
  287. mes "Congratulations.";
  288. delitem 5022,1; //Helm_Of_Sun
  289. delitem 969,2; //Gold
  290. set Zeny, Zeny - 200000000;
  291. getitem 5353,1; //Helm_Of_Sun_
  292. next;
  293. mes "[Leablem]";
  294. mes "This is the first and last time I will do this for you.";
  295. mes "Don't ever tell anyone";
  296. mes "about this. Okay?";
  297. close;
  298. }
  299. else
  300. {
  301. specialeffect EF_SUI_EXPLOSION;
  302. mes "[Leablem]";
  303. mes "Wah! Oh my god, we failed!";
  304. mes "My god, I guess we had the worst kind of luck...";
  305. mes "What should we do? ...This is why";
  306. mes "I didn't want to do in the first place!";
  307. delitem 5022,1; //Helm_Of_Sun
  308. delitem 969,2; //Gold
  309. set Zeny, Zeny - 200000000;
  310. next;
  311. mes "[Leablem]";
  312. mes "No, don't ever ask me to do such a risky thing again!";
  313. mes "Bah~";
  314. close;
  315. }
  316. }
  317. else
  318. {
  319. mes "[Leablem]";
  320. mes "Umm...";
  321. next;
  322. mes "[Leablem]";
  323. mes "You don't have enough materials.";
  324. mes "Man, why did you even ask me to try?";
  325. mes "I'm not going to do this again for you,";
  326. mes "even if you bring enough materials. Bah~";
  327. close;
  328. }
  329. case 2:
  330. mes "[Leablem]";
  331. mes "Don't ever tell anyone";
  332. mes "about what I told you. Okay?";
  333. close;
  334. }
  335. case 4:
  336. mes "[Leablem]";
  337. mes "Do you want to know more information?";
  338. mes "Well, I don't think there's something";
  339. mes "that you specifically need to know.";
  340. mes "But I can at least give you a tip.";
  341. next;
  342. mes "[Leablem]";
  343. mes "The slot technicians in each town";
  344. mes "provide different slotting success chances";
  345. mes "depending on your equipment's upgrade level.";
  346. mes "I don't know if that's true,";
  347. mes "but I can see the difference in each town.";
  348. next;
  349. mes "[Leablem]";
  350. mes "For instance, a slot technician in one town";
  351. mes "provides a higher success chance to";
  352. mes "equipment items at higher upgrade levels,";
  353. mes "while a technician in another town has higher";
  354. mes "success at lower upgrade levels.";
  355. next;
  356. mes "[Leablem]";
  357. mes "When you fail to add a slot, the equipment";
  358. mes "will become broken and disappear.";
  359. mes "I try my best to succeed, but";
  360. mes "slotting is complicated work.";
  361. next;
  362. mes "[Leablem]";
  363. mes "Oh, there's an important thing that you need to be careful about.";
  364. mes "^FF0000Try not to carry two identical equipment items";
  365. mes "^FF0000with you when you add slots.";
  366. mes "^FF0000Otherwise, slots may be added to one of the randomly chosen items,";
  367. mes "^FF0000and in the worst case, you may lose an item that is more valuable to you.^000000";
  368. next;
  369. mes "[Leablem]";
  370. mes "I hope this information will be helpful to you.";
  371. mes "Thanks.";
  372. close;
  373. case 5:
  374. mes "[Leablem]";
  375. mes "Alright, then.";
  376. close;
  377. }
  378. }
  379. payon,236,199,3 duplicate(SocketEnchant2) Leablem#pay 86
  380. lighthalzen,96,137,3 duplicate(SocketEnchant2) Leablem#lhz 86
  381. prt_in,22,60,6 duplicate(SocketEnchant2) Leablem#prt 86
  382. moc_ruins,154,86,3 duplicate(SocketEnchant2) Leablem#moc 86
  383. function script Func_Socket2 {
  384. mes "[Leablem]";
  385. if(getarg(7,0) != 0 && getarg(8,0) != 0)
  386. {
  387. mes getitemname(getarg(0)) + "... Okay, then you need to bring me";
  388. mes "^FF0000" + (getarg(4) >= 1000 ? (getarg(4)/1000 + ",000") : getarg(4)) + ",000 zeny as service charge,";
  389. mes "^FF0000" + getarg(6) + "ea " + getitemname(getarg(5)) + " and " + getarg(8) + "ea " + getitemname(getarg(7)) + ".";
  390. mes "^FF0000Of course, you need a " + getitemname(getarg(0)) + ".^000000";
  391. }
  392. else
  393. {
  394. mes getitemname(getarg(0)) + "? Okay, then you need to bring me";
  395. mes "^FF0000" + (getarg(4) >= 1000 ? (getarg(4)/1000 + ",000") : getarg(4)) + ",000 zeny as service charge and " + getarg(6) + " " + getitemname(getarg(5)) + (getarg(6) > 1 && getarg(5) != 999 ? "s":"") + " as the requirement.";
  396. mes "^FF0000Of course, don't forget to bring me a " + getitemname(getarg(0)) + ".";
  397. mes "^FF0000You should have all items.^000000";
  398. }
  399. next;
  400. mes "[Leablem]";
  401. mes "Did you already bring all of them?";
  402. mes "For your information, if you fail to create a slot,";
  403. mes "you will lose all the item requirement as well as the target " + (getiteminfo(getarg(0),5)&2 ? "weapon" : "armor") + "."; // EQP_HAND_R = 2, it's a weapon, otherwise armor
  404. mes "Also remember, if the " + (getiteminfo(getarg(0),5)&2 ? "weapon" : "armor") + " has been upgraded, and has been inserted with a card,";
  405. mes "you will lose them even if you succeed in creating a slot.";
  406. next;
  407. switch(select("Ask for slot creation.:Try next time."))
  408. {
  409. case 1:
  410. if ((Zeny >= getarg(4)*1000) && (countitem(getarg(5)) >= getarg(6)) && (countitem(getarg(7,512)) >= getarg(8,0)) && (countitem(getarg(0)) > 0)) // if there's no getarg(7) and getarg(8) provided, check itemcount against 0 (we still need a valid item ID though)
  411. {
  412. mes "[Leablem]";
  413. mes "Alright then, let the work begin!";
  414. mes "You'd better pray for a successful result.";
  415. next;
  416. set .@a, rand(1,100);
  417. if ((.@a > getarg(2)) && (.@a < getarg(3)))
  418. {
  419. specialeffect EF_LORD;
  420. mes "[Leablem]";
  421. mes "Great, it seems to be successful.";
  422. mes "It looks pretty well done. Congratulations!";
  423. delitem getarg(0),1;
  424. delitem getarg(5),getarg(6);
  425. if (getarg(7,0) != 0 && getarg(8,0) != 0)
  426. delitem getarg(7),getarg(8);
  427. set Zeny, Zeny - getarg(4)*1000;
  428. getitem getarg(1),1;
  429. next;
  430. mes "[Leablem]";
  431. mes "See you again, buddy!";
  432. close;
  433. }
  434. else
  435. {
  436. specialeffect EF_SUI_EXPLOSION;
  437. mes "[Leablem]";
  438. mes "Wah! ...I am so sorry, it failed.";
  439. mes "However, I am completely innocent.";
  440. mes "This is your luck, and it is destined by god, okay?";
  441. mes "Don't be so disappointed,";
  442. mes "and try next time.";
  443. delitem getarg(0),1;
  444. delitem getarg(5),getarg(6);
  445. if (getarg(7,0) != 0 && getarg(8,0) != 0)
  446. delitem getarg(7),getarg(8);
  447. set Zeny, Zeny - getarg(4)*1000;
  448. next;
  449. mes "[Leablem]";
  450. mes "See you again, buddy!";
  451. close;
  452. }
  453. }
  454. else
  455. {
  456. mes "[Leablem]";
  457. mes "Are you stupid or what? You didn't bring all of the required items!";
  458. mes "Go bring them quick!";
  459. close;
  460. }
  461. case 2:
  462. mes "[Leablem]";
  463. mes "See you next time.";
  464. close;
  465. }
  466. }