2012_headgears.txt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. //===== rAthena Script =======================================
  2. //= 2012 Headgear Quests
  3. //===== By: ==================================================
  4. //= Euphy, -SkittleNugget-
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= [Official Conversion]
  11. //= Enhance gears by synthesizing them with Energy Crystals.
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version. [Euphy]
  14. //= Script is a little messy, could use some cleaning.
  15. //============================================================
  16. // Main NPC :: 2012_hat_quest
  17. //============================================================
  18. moc_para01,41,169,3 script Reno#2012hat 64,{
  19. // iRO has (very) minor differences in dialogue from the original script.
  20. // To use iRO's version, uncomment the line below.
  21. //set .@features_iRO,1;
  22. //custom translation - all checks below
  23. if (checkweight(1301,1) == 0 || MaxWeight - Weight < 800) {
  24. mes "- Carrying too many items, cannot proceed. -";
  25. close;
  26. }
  27. setarray .@type$[0],"lower","intermediate","advanced","highest";
  28. setarray .@crystal$[0],"Rough","Purified","High";
  29. // playtime checks
  30. setarray .@quests_playtime[0],5161,5169,5174,5225,5226,5227;
  31. for (set .@i,0; .@i<6; set .@i,.@i+1) {
  32. if (checkquest(.@quests_playtime[.@i],PLAYTIME) == 2) {
  33. erasequest .@quests_playtime[.@i];
  34. mes "[Reno]";
  35. if (.@i < 3) // hunting quest wait time
  36. mes "The waiting time for a "+.@type$[.@i]+" collection quest has expired. You can now take another request.";
  37. else // buff wait time
  38. mes "The waiting time for storing "+.@crystal$[.@i]+" Energy Crystals has expired. You can now store them again.";
  39. close;
  40. }
  41. }
  42. // hunting quest checks
  43. callsub L_CheckHunting,5161,5162,7,.@type$[0],6623,10; //Rough_Energy_Crystal
  44. callsub L_CheckHunting,5169,5170,4,.@type$[1],6624,10; //Purified_Energy_Crystal
  45. callsub L_CheckHunting,5174,5175,4,.@type$[2],6625,5; //High_Purity_Energy_Xtal
  46. callsub L_CheckHunting,5174,5179,4,.@type$[3],6625,10; //High_Purity_Energy_Xtal
  47. // buff checks
  48. set .@energy_buf00, getstatus(SC_QUEST_BUFF1) + getstatus(SC_QUEST_BUFF2) + getstatus(SC_QUEST_BUFF3);
  49. if (!.@energy_buf00) {
  50. for (set .@i,0; .@i<3; set .@i,.@i+1) {
  51. if (isbegin_quest(.@i + 5222)) {
  52. set .@item, 6623 + .@i;
  53. set .@amount, 2 + rand(3);
  54. mes "[Reno]";
  55. mes getitemname(.@item)+" storage is now complete.";
  56. next;
  57. setquest 5225 + .@i;
  58. erasequest 5222 + .@i;
  59. getitem .@item,.@amount;
  60. mes "[Reno]";
  61. mes "^0000FF"+.@amount+" "+getitemname(.@item)+"s^000000 were extracted.";
  62. close;
  63. }
  64. }
  65. }
  66. mes "[Reno]";
  67. mes "Hi? I am Reno from the Energy Crystal Research Association, or ECRA.";
  68. next;
  69. switch(select("ECRA?:Quest to get Energy Crystals:Energy Crystal Buffs:Compress Energy Crystals:Exchange Crystals for Headgear:Random Gear for Crystals" + ((.@features_iRO)?":See Equipment List":""))) {
  70. case 1:
  71. mes "[Reno]";
  72. mes "ECRA is the institute that researches '^0000FFEnergy Crystals^000000' that shall be used as an alternative energy source in the Rune Midgart Kingdom, which suffers from a shortage of energy.";
  73. next;
  74. select("The reason for doing this?");
  75. mes "[Reno]";
  76. mes "I would like to explain that we are not trying to make an excuse to get away from facing problem before I explain the reason. Never! So please let me finish.";
  77. next;
  78. mes "[Reno]";
  79. mes "The Research Team has sent me the results they found.";
  80. next;
  81. mes "[Reno]";
  82. mes "Energy Crystals turned out to be ^0000FFgenerated inside the bodies of some monsters^000000, and according to the research, stronger monsters generate higher-class energy crystals in their bodies.";
  83. next;
  84. mes "[Reno]";
  85. mes "The Research Team decided to collect Energy Crystals by giving requests to adventurers, with appropriate rewards. That enables us to collect better and be more ^FF0000efficient^000000.";
  86. next;
  87. mes "[Reno]";
  88. mes "Energy Crystals, accumulated through hunting monsters by my request, shall be used for my research. ^0000FFSome of them are planned to be returned to adventurers.^000000";
  89. next;
  90. mes "[Reno]";
  91. mes "Adventurers can use collected Energy Crystals for ^FF0000upgrading equipments^000000 through me.";
  92. next;
  93. mes "[Reno]";
  94. mes "If it works well, it seems to be good for both ECRA and adventurers.";
  95. close;
  96. case 2:
  97. mes "[Reno]";
  98. mes "The hunting quests are ranked by monster level and difficulty. The ranges are lower, intermediate, high quests and can only be taken once per day.";
  99. next;
  100. setarray .@quest_status[0],
  101. isbegin_quest(5162) + isbegin_quest(5163) + isbegin_quest(5164) + isbegin_quest(5165) + isbegin_quest(5166) + isbegin_quest(5167) + isbegin_quest(5168),
  102. isbegin_quest(5170) + isbegin_quest(5171) + isbegin_quest(5172) + isbegin_quest(5173),
  103. isbegin_quest(5175) + isbegin_quest(5176) + isbegin_quest(5177) + isbegin_quest(5178) + isbegin_quest(5179) + isbegin_quest(5180) + isbegin_quest(5181) + isbegin_quest(5182);
  104. setarray .@quest_index[0],5161,5169,5174;
  105. set .@select, select("Lower level hunting [61-80]:Intermediate level hunting [80-99]:High level hunting [90 and up]:Cancel my current quest.") - 1;
  106. if (.@select < 3) {
  107. setarray .@min_level[0],60,80,90,100;
  108. if (BaseLevel < .@min_level[.@select]) {
  109. mes "[Reno]";
  110. mes "I am sorry but the request for the "+.@type$[.@select]+" collection is only available for those level "+.@min_level[.@select]+" and higher. You do not seem to be capable of carrying out this request.";
  111. close;
  112. }
  113. if (.@quest_status[.@select]) {
  114. mes "[Reno]";
  115. mes "You seem to be under the other request of "+.@type$[.@select]+" collection. If the quest seems to be too hard... how about you ^FF0000give up on the request^000000?";
  116. close;
  117. }
  118. set .@playtime, checkquest(.@quest_index[.@select],PLAYTIME);
  119. if (.@playtime == 0 || .@playtime == 1) {
  120. mes "[Reno]";
  121. mes "Currently waiting for the "+.@type$[.@select]+" collection commission. Tasks in each collection can only be completed once per day."; //custom translation
  122. close;
  123. }
  124. mes "[Reno]";
  125. mes "You selected to hunt a monster from the "+.@type$[.@select]+" collection. After hunting these monsters you will receive "+((.@features_iRO)?"10 ":"")+"^0000FF"+.@crystal$[.@select]+" Energy Crystals^000000 when you return to me.";
  126. next;
  127. mes "[Reno]";
  128. mes "Please select the monster that you think you can easily hunt from the list.";
  129. next;
  130. switch (.@select) {
  131. case 0:
  132. set .@quest, select(
  133. "[Lower class] Requiem",
  134. "[Lower class] Bathory",
  135. "[Lower class] Spring Rabbit",
  136. "[Lower class] Sleeper",
  137. "[Lower class] Evil Druid",
  138. "[Lower class] Ground Petite",
  139. "[Lower class] Clock"
  140. );
  141. break;
  142. case 1:
  143. set .@quest, select(
  144. "[Intermediate class] Siroma",
  145. "[Intermediate class] Dark Priest",
  146. "[Intermediate class] Stapo",
  147. "[Intermediate class] Solider"
  148. );
  149. break;
  150. case 2:
  151. set .@quest, select(
  152. "[Advanced] Desert Wolf",
  153. "[Advanced] Medusa",
  154. "[Advanced] Pinguicula",
  155. "[Advanced] Majoruros",
  156. "[Highest] Raydric",
  157. "[Highest] Naga",
  158. "[Highest] Ancient Mummy",
  159. "[Highest] Ancient Mimic"
  160. );
  161. if (.@quest > 4 && BaseLevel < .@min_level[3]) {
  162. mes "[Reno]";
  163. mes "I am sorry but the request for the most advanced collection is only available for those level "+.@min_level[3]+" and higher. You do not seem to be capable of carrying out this request.";
  164. close;
  165. }
  166. break;
  167. }
  168. setquest .@quest_index[.@select] + .@quest;
  169. mes "[Reno]";
  170. mes "The request for "+.@type$[.@select]+" collection monsters has been issued. Please check the details on the issued document.";
  171. close;
  172. } else {
  173. setarray .@quest_count[0],7,4,8;
  174. for (set .@i,0; .@i<3; set .@i,.@i+1) {
  175. if (.@quest_status[.@i]) {
  176. mes "[Reno]";
  177. mes "You are currently under the request of the "+.@type$[.@i]+" collection. If you give up now, all your history will be lost. Do you really want to give up?";
  178. next;
  179. set .@erase_quest, select("Yes:No");
  180. switch (.@erase_quest) {
  181. case 1:
  182. for (set .@quest,.@quest_index[.@i]+1; .@quest<=.@quest_index[.@i]+.@quest_count[.@i]; set.@quest,.@quest+1) {
  183. if (isbegin_quest(.@quest))
  184. erasequest .@quest;
  185. }
  186. break;
  187. case 2:
  188. break;
  189. }
  190. }
  191. }
  192. switch (.@erase_quest) {
  193. case 0:
  194. mes "[Reno]";
  195. mes "You are not under any request.";
  196. close;
  197. case 1:
  198. mes "[Reno]";
  199. mes "The written request for you has been withdrawn.";
  200. close;
  201. case 2:
  202. mes "[Reno]";
  203. mes "Please keep up on it.";
  204. close;
  205. }
  206. }
  207. case 3:
  208. mes "[Reno]";
  209. mes "Do you want to accumulate Energy Crystals inside of your body to receive a buff?";
  210. next;
  211. set .@select, select("Accumulating Energy Crystals?:Accumulate Rough Energy Crystal:Accumulate Purified Energy Crystal:Accumulate High Energy Crystal");
  212. switch (.@select) {
  213. case 1:
  214. mes "[Reno]";
  215. mes "Energy Crystals are accumulated in your body when you hunt the monsters we ask you to.";
  216. next;
  217. mes "[Reno]";
  218. mes "Our research shows that some methods enable humans to accumulate the energy crystals inside of the body in the form of a buff.";
  219. next;
  220. mes "[Reno]";
  221. mes "If you spend about 3 hours, you will be able to gain a small amount of Energy Crystals. So do you want to receive the buff?";
  222. close;
  223. case 2:
  224. set .@playtime, checkquest(5225,PLAYTIME);
  225. set .@quest,5222;
  226. set .@min_level,60;
  227. set .@rate,1;
  228. set .@buff, SC_QUEST_BUFF1;
  229. break;
  230. case 3:
  231. set .@playtime, checkquest(5226,PLAYTIME);
  232. set .@quest,5223;
  233. set .@min_level,80;
  234. set .@rate,2;
  235. set .@buff, SC_QUEST_BUFF2;
  236. break;
  237. case 4:
  238. set .@playtime, checkquest(5227,PLAYTIME);
  239. set .@quest,5224;
  240. set .@min_level,90;
  241. set .@rate,3;
  242. set .@buff, SC_QUEST_BUFF3;
  243. break;
  244. }
  245. if (.@playtime == 0 || .@playtime == 1) {
  246. mes "[Reno]";
  247. mes "Were you successful? While storing other Energy Crystals will not have much effect on your body, storing the same one may cause you harm."; //custom translation
  248. close;
  249. }
  250. if (BaseLevel < .@min_level) {
  251. mes "[Reno]";
  252. mes "With a body like that, you can't accumulate "+.@crystal$[.@select-2]+" Energy Crystals. You must be level "+.@min_level+" or your body will be harmed in the process."; //custom translation
  253. close;
  254. }
  255. if (.@energy_buf00) {
  256. mes "[Reno]";
  257. mes "Accumulating Energy Crystal has already begun. I am sorry but it is impossible to accumulate two different types of Energy Crystals at a time.";
  258. close;
  259. }
  260. if (isbegin_quest(.@quest) > 0) {
  261. erasequest .@quest;
  262. mes "[Reno]";
  263. mes "An error has occurred. Please forgive me for the inconvenience."; //custom translation
  264. close;
  265. }
  266. mes "[Reno]";
  267. mes "It takes 3 hours for your body to accumulate 2 to 4 "+.@crystal$[.@select-2]+" Energy Crystals. Do you want to start?";
  268. next;
  269. if(select("Cancel:Start") == 1) {
  270. mes "[Reno]";
  271. mes "I recommend that you try to ccumulate Energy Crystal when you have time.";
  272. close;
  273. }
  274. mes "[Reno]";
  275. mes "You might feel a slight tingle.";
  276. next;
  277. specialeffect2 EF_BASH3D;
  278. percentheal .@rate * -5,0;
  279. //consumeitem ??; //Keep_Connection_[.@rate]
  280. sc_start .@buff,10800000,.@rate; // Atk/Matk + 5*rate (+5, +10, +15)
  281. setquest .@quest;
  282. mes "[Reno]";
  283. mes "- Puck -";
  284. next;
  285. mes "[Reno]";
  286. mes "Everything seems to be in order. Let's start accumulating "+.@crystal$[.@select-2]+" Energy Crystals. Remember to come back to me after 3 hours to get the "+.@crystal$[.@select-2]+" Energy Crystals.";
  287. close;
  288. case 4:
  289. mes "[Reno]";
  290. mes "Do you want to compress the Energy Crystals?";
  291. next;
  292. switch(select("What does compressing do?:Compress Rough to Purified Crystal:Compress Purified to High Crystal")) {
  293. case 1:
  294. mes "[Reno]";
  295. mes "Are you curious about Energy Crystal compression? I can compress lower level Energy Crystals into higher ones.";
  296. next;
  297. mes "[Reno]";
  298. mes "Here is what I can make.";
  299. mes "^FF000010 Rough Energy Crystals^000000 = ^FF00001 Purified Energy Crystal^000000";
  300. mes "^FF00005 Purified Energy Crystals^000000 = ^FF00001 High Energy Crystal^000000";
  301. next;
  302. mes "[Reno]";
  303. mes "If you need higher grade Energy Crystals, this is a good way to get them since the lower ones are easier to get.";
  304. close;
  305. case 2:
  306. set .@crystal,6623; //Rough_Energy_Crystal
  307. set .@crystal_,6624; //Purified_Energy_Crystal
  308. set .@rate,10;
  309. break;
  310. case 3:
  311. set .@crystal,6624; //Purified_Energy_Crystal
  312. set .@crystal_,6625; //High_Purity_Energy_Xtal
  313. set .@rate,5;
  314. break;
  315. }
  316. set .@crystal_count, countitem(.@crystal);
  317. set .@crystal_get, .@crystal_count / .@rate;
  318. mes "[Reno]";
  319. mes sprintf("^FF0000%d %s^000000 = ^FF00001 %s^000000",.@rate,getitemname(.@crystal),getitemname(.@crystal_));
  320. next;
  321. mes "[Reno]";
  322. mes sprintf("%d %ss will be compressed to %d %ss.",.@crystal_count,getitemname(.@crystal),.@crystal_get,getitemname(.@crystal_));
  323. mes "Do you want to compress?";
  324. next;
  325. if(select("Compress:Stop") == 2) {
  326. mes "[Reno]";
  327. mes "Okay, please contact if you need me in the future.";
  328. close;
  329. }
  330. while(1) {
  331. if (.@crystal_count >= .@rate) { //custom translation
  332. delitem .@crystal,.@rate;
  333. getitem .@crystal_,1;
  334. set .@crystal_count, countitem(.@crystal);
  335. set .@crystal_get, .@crystal_count / .@rate;
  336. mes "[Reno]";
  337. mes "The compression was very successful.";
  338. mes "There are "+.@crystal_count+" Energy Crystals left, which can compress into "+.@crystal_get+" Energy Crystals. Do you want to continue?";
  339. next;
  340. if(select("Compress:Stop") == 2)
  341. break;
  342. } else {
  343. mes "[Reno]";
  344. mes "You don't have enough "+getitemname(.@crystal)+"s.";
  345. next;
  346. break;
  347. }
  348. }
  349. mes "[Reno]";
  350. mes "Compression completed.";
  351. close;
  352. case 5:
  353. disable_items;
  354. mes "[Reno]";
  355. mes "Do you want to exchange Energy Crystals for equipment? Please select the type of Energy Crystal that you wish to exchange.";
  356. next;
  357. setarray .@crystals[0], countitem(6623), countitem(6624), countitem(6625);
  358. switch(select("See Equipment List:["+.@crystals[0]+"] Rough Energy Crystal:["+.@crystals[1]+"] Purified Energy Crystal:["+.@crystals[2]+"] High Energy Crystal")) {
  359. case 1:
  360. mes "[Reno]";
  361. mes "This is the brochure regarding the equipment upgrade that our Energy Crystal research association provides. Please take a look around.";
  362. close2;
  363. readbook 11060,1; //Energy_Xtal_Combi_Book
  364. end;
  365. // Variable descriptions
  366. // .@crystal : Energy Crystal used
  367. // .@materials[] : equipment to upgrade
  368. // .@showslot[] : display slots with equipment name (-1 to disable)
  369. // .@costs[] : amount of Energy Crystals needed
  370. // .@rewards[] : upgraded equipment
  371. case 2:
  372. set .@crystal,6623; //Rough_Energy_Crystal
  373. setarray .@materials[0], 5027, 5045, 5069, 5003, 2214, 5167, 5168, 5043;
  374. setarray .@showslot[0], -1, -1, -1, -1, -1, 1, 1, -1;
  375. setarray .@costs[0], 100, 100, 100, 100, 100, 100, 100, 100;
  376. setarray .@rewards[0], 18760,18761,18762,18763,18764,18769,18770,18771;
  377. break;
  378. case 3:
  379. set .@crystal,6624; //Purified_Energy_Crystal
  380. setarray .@materials[0], 2296, 5014, 5096, 2292,2615, 2355,2116, 2420, 2521, 5125;
  381. setarray .@showslot[0], -1, -1, -1, -1, -1, 1, 1, 1, 1, 1;
  382. setarray .@costs[0], 200, 200, 200, 200, 200, 100, 100, 100, 100, 100;
  383. setarray .@rewards[0], 18772,18773,18774,18775,2956,15068,2183,22015,20710,18776;
  384. break;
  385. case 4:
  386. set .@crystal,6625; //High_Purity_Energy_Xtal
  387. setarray .@materials[0], 5019, 5162, 5025, 5022, 5353, 2423,2678,2679, 2355,2116, 2420, 2521, 5125;
  388. setarray .@showslot[0], -1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1;
  389. setarray .@costs[0], 300, 300, 300, 1000, 100, 300, 300, 300, 20, 20, 20, 20, 20;
  390. setarray .@rewards[0], 18765,18768,18766,18767,18767,22014,2957,2958,15068,2183,22015,20710,18776;
  391. break;
  392. }
  393. mes "[Reno]";
  394. mes "Please select the equipment to exchange for "+getitemname(.@crystal)+"s.";
  395. next;
  396. set .@crystal_count, countitem(.@crystal);
  397. set .@menu$,"";
  398. for (set .@i,0; .@i<getarraysize(.@materials); set .@i,.@i+1) {
  399. set .@item_name$, getitemname(.@materials[.@i]) + ((.@showslot[.@i] > -1)?"["+.@showslot[.@i]+"]":"");
  400. set .@menu$, .@menu$ + sprintf("%s (%d/%d):",.@item_name$,.@crystal_count,.@costs[.@i]);
  401. }
  402. set .@index, select(.@menu$) - 1;
  403. set .@material, .@materials[.@index];
  404. set .@item_name$, getitemname(.@material) + ((.@showslot[.@index] > -1)?"["+.@showslot[.@index]+"]":"");
  405. set .@cost, .@costs[.@index];
  406. set .@reward, .@rewards[.@index];
  407. //custom translations
  408. if (.@material == 2615) { // Special case: Safety Ring
  409. if (countitem(2615) < 1 || countitem(2621) < 1 || countitem(2622) < 1 || countitem(2624) < 1 ||
  410. countitem(2625) < 1 || countitem(2623) < 1 || countitem(2626) < 1 || countitem(.@crystal) < .@cost) {
  411. mes "[Reno]";
  412. mes "The materials to make a Safety Ring[1] are insufficient. Please check your inventory.";
  413. close;
  414. }
  415. mes "[Reno]";
  416. mes "Before upgrading your Safety Ring, please listen to these ^FF0000precautions^000000.";
  417. next;
  418. mes "[Reno]";
  419. mes "^FF0000In addition to the Safety Ring, all refinements and cards of the required materials will also disappear.^000000";
  420. next;
  421. } else {
  422. if (countitem(.@material) < 1 || countitem(.@crystal) < .@cost) {
  423. mes "[Reno]";
  424. mes "The materials are insufficient. Please check your materials.";
  425. close;
  426. }
  427. mes "[Reno]";
  428. mes "Before upgrading your equipment, please listen to these ^FF0000precautions^000000.";
  429. next;
  430. mes "[Reno]";
  431. mes "^FF0000When using Energy Crystals to upgrade equipment, all previous refinements, enchantments, and cards will be lost.^000000";
  432. next;
  433. }
  434. mes "[Reno]";
  435. mes "Are you familiar with the ^FF0000precautions^000000?";
  436. next;
  437. if(select("I am.:No.") == 2) {
  438. mes "[Reno]";
  439. mes "Okay. Next time, then.";
  440. close;
  441. }
  442. mes "[Reno]";
  443. mes "Then let's begin to upgrade "+.@item_name$+".";
  444. next;
  445. specialeffect2 EF_REPAIRWEAPON;
  446. progressbar "ffff00",2;
  447. delitem .@material,1;
  448. if (.@material == 2615) {
  449. delitem 2621,1; //Ring_
  450. delitem 2622,1; //Earring_
  451. delitem 2624,1; //Glove_
  452. delitem 2625,1; //Brooch_
  453. delitem 2623,1; //Necklace_
  454. delitem 2626,1; //Rosary_
  455. }
  456. delitem .@crystal,.@cost;
  457. getitem .@reward,1;
  458. mes "[Reno]";
  459. mes "The upgrade was successful. Your Energy Crystals will help our research greatly.";
  460. close;
  461. case 6:
  462. mes "[Reno]";
  463. mes "Do you want to donate Energy Crystals to get a random new headgear?";
  464. next;
  465. switch(select("Donate Energy Crystals?:Donate 300 Rough Energy Crystals.:Donate 600 Purified Energy Crystals.:Donate 900 High Energy Crystals.")) {
  466. case 1:
  467. mes "[Reno]";
  468. mes "We are collecting Energy Crystals so that we can research more combinations of headgears for adventurers.";
  469. next;
  470. mes "[Reno]";
  471. mes "Thanks to the support of adventurers we can use these Energy Crystals to further our research.";
  472. next;
  473. mes "[Reno]";
  474. mes "So we receive a minimum of 300 Rough Energy Crystals, 600 Purified Energy Crystals, and 900 High Energy Crystals.";
  475. if (!.@features_iRO) {
  476. next;
  477. mes "[Reno]";
  478. mes "You may feel that this is a burden, but for the sake of our research, please continue."; //custom translation
  479. close;
  480. }
  481. mes "For the donation, I'll give you a random new headgear.";
  482. next;
  483. mes "[Reno]";
  484. mes "300 Rough Energy Crystals";
  485. mes "- New Mage Hat";
  486. mes "- New Magician Hat";
  487. mes "- New Kitsune Mask";
  488. mes "- New Joker Jester";
  489. mes "- New Bunny Band";
  490. mes "- New Munak Hat";
  491. mes "- New Bongun Hat";
  492. mes "- New Phantom Opera Mask";
  493. next;
  494. mes "[Reno]";
  495. mes "600 Purified Energy Crystals";
  496. mes "- Good Binoculars";
  497. mes "- Good Fin Helm";
  498. mes "- Good Assassin Mask";
  499. mes "- Good Welding Mask";
  500. mes "- Good Safety Ring";
  501. mes "- Good Angelic Protection";
  502. mes "- Good Angelic Guard";
  503. mes "- Good Angelic Cardigan";
  504. mes "- Good Angel's Reincarnation";
  505. next;
  506. mes "[Reno]";
  507. mes "900 High Energy Crystals";
  508. mes "- Enhanced Corsair";
  509. mes "- Enhanced Bone Helm";
  510. mes "- Enhanced Helm of Angel";
  511. mes "- Enhanced Variant Shoes";
  512. mes "- Enhanced Ring of Flame Lord";
  513. mes "- Enhanced Ring of Resonance";
  514. close;
  515. case 2:
  516. if (countitem(6623) < 300) {
  517. mes "[Reno]";
  518. mes "Thank for your support, but we need 300 Rough Energy Crystals.";
  519. close;
  520. }
  521. delitem 6623,300; //Rough_Energy_Crystal
  522. set .@r, rand(1,17);
  523. if (.@r <= 2) getitem 18760,1; //Remodel_Wizardry_Hat
  524. else if (.@r <= 4) getitem 18761,1; //Remodel_Magician_Hat
  525. else if (.@r <= 6) getitem 18762,1; //Remodel_Mask_Of_Fox
  526. else if (.@r <= 8) getitem 18763,1; //Remodel_Joker_Jester
  527. else if (.@r <= 10) getitem 18764,1; //Remodel_Bunny_Band
  528. else if (.@r <= 13) getitem 18769,1; //Remodel_Munak_Turban
  529. else if (.@r <= 16) getitem 18770,1; //Remodel_Bongun_Hat
  530. else getitem 18771,1; //Remodel_Opera_Mask
  531. break;
  532. case 3:
  533. if (countitem(6624) < 600) {
  534. mes "[Reno]";
  535. mes "Thank for your support, but we need 600 Purified Energy Crystals.";
  536. close;
  537. }
  538. delitem 6624,600; //Purified_Energy_Crystal
  539. set .@r, rand(1,18);
  540. if (.@r <= 3) getitem 18772,1; //Improved_Binoculars
  541. else if (.@r <= 6) getitem 18773,1; //Improved_Fin_Helm
  542. else if (.@r <= 9) getitem 18774,1; //Improved_Assassin_Mask
  543. else if (.@r <= 12) getitem 18775,1; //Improved_Welding_Mask
  544. else if (.@r <= 13) getitem 2956,1; //Safety_Ring_
  545. else if (.@r <= 14) getitem 15068,1; //Im_Angel's_Protection
  546. else if (.@r <= 15) getitem 2183,1; //Impr_Angel's_Safeguard
  547. else if (.@r <= 16) getitem 22015,1; //Impr_Angel's_Arrival
  548. else if (.@r <= 17) getitem 20710,1; //Impr_Angel's_Warmth
  549. else getitem 18776,1; //Improved_Kiss_Of_Angel
  550. break;
  551. case 4:
  552. if (countitem(6625) < 900) {
  553. mes "[Reno]";
  554. mes "Thank for your support, but we need 900 High Energy Crystals.";
  555. close;
  556. }
  557. delitem 6625,900; //High_Purity_Energy_Xtal
  558. set .@r, rand(1,33);
  559. if (.@r <= 10) getitem 18765,1; //Enhanced_Corsair
  560. else if (.@r <= 20) getitem 18768,1; //Enhanced_Bone_Helm
  561. else if (.@r <= 25) getitem 18766,1; //Enhanced_Helm_Of_Angel
  562. else if (.@r <= 30) getitem 22014,1; //Enhanced_Variant_Shoes
  563. else if (.@r <= 31) getitem 2957,1; //Good_Ring_Of_Flame_Lord
  564. else getitem 2958,1; //Good_Ring_Of_Resonance
  565. break;
  566. }
  567. mes "[Reno]";
  568. mes "Thank you very much. The Energy Crystals you donated will be greatly helpful for our research. This is your reward for your donation."; //custom translation
  569. close;
  570. case 7: // iRO only
  571. mes "[Reno]";
  572. mes "This is the brochure regarding the equipment upgrade that our Energy Crystal research association provides. Please take a look around.";
  573. close2;
  574. readbook 11060,1; //Energy_Xtal_Combi_Book
  575. end;
  576. }
  577. //callsub L_CheckHunting,<quest index>,<start quest>,<number of quests>,"<type>",<reward id>,<reward amount>;
  578. L_CheckHunting:
  579. for (set .@quest,getarg(0)+1; .@quest<getarg(1)+getarg(2); set .@quest,.@quest+1) {
  580. if (checkquest(.@quest,HUNTING) == 2) {
  581. mes "[Reno]";
  582. mes "Finished "+getarg(3)+" collection hunting quest.";
  583. next;
  584. setquest getarg(0);
  585. erasequest .@quest;
  586. getitem getarg(4),getarg(5);
  587. mes "You receive "+getarg(5)+" "+getitemname(getarg(4))+"s as the "+getarg(3)+" collection reward.";
  588. close;
  589. }
  590. }
  591. return;
  592. }