InfiniteSpace.txt 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. //===== rAthena Script =======================================
  2. //= Infinite Space
  3. //===== Description: =========================================
  4. //= [Walkthrough Conversion]
  5. //= Infinite Space with hard mode (Episode 16.1)
  6. //===== Changelogs: ==========================================
  7. //= 1.0 Initial release [crazyarashi]
  8. //= 1.1 Updated to match official mechanics [Everade]
  9. //= 1.2 Moved merchants to individual files [Everade]
  10. //= 1.3 Cleanup and sanity checks [Everade]
  11. //============================================================
  12. cmd_fild07,58,278,3 script Reckless Explorer#pa0829_01 4_F_GON,{
  13. mes "^FF0000Please note that, any abnormal monster handling inside the instance such as taming is not considered normal and may hinder the instance progress.^000000";
  14. next;
  15. if (BaseLevel < 100) {
  16. mes "[ Reckless Explorer ]";
  17. mes "Will you come back to me after getting a little bit stronger? How about getting to level 100 first?";
  18. close;
  19. }
  20. if (isbegin_quest(12364) != 2) {
  21. mes "[ Reckless Explorer ]";
  22. mes "Ah, no, I didn't meant to go inside. I didn't meant to violate any laws.";
  23. next;
  24. select("What are you talking about?");
  25. mes "[ Reckless Explorer ]";
  26. mes "Ha?";
  27. next;
  28. mes "[ Reckless Explorer ]";
  29. mes "Hmm, are you one of the Royal Palace's suppression squad?";
  30. next;
  31. select("I'm an ordinary adventurer.");
  32. mes "[ Reckless Explorer ]";
  33. mes "Phew~ That's a relief.";
  34. mes "I've never soon you before, so I thought you are one of the suppression squad of the palace.";
  35. next;
  36. if (select("What if I am one of the suppression squad?:What's the matter?") == 1) {
  37. mes "[ Reckless Explorer ]";
  38. mes "I'm just an ordinary woman who's out for a walk. And this is the end of my walk, and I'm going to...";
  39. close;
  40. }
  41. mes "[ Reckless Explorer ]";
  42. mes "Have you heard about the Paros Lighthouse collapse?";
  43. next;
  44. mes "[ Reckless Explorer ]";
  45. mes "^777700(She moved close to me)^000000";
  46. mes "The Paros Lighthouse here collapsed for some unknown reason some time ago, and there's a lot of stuff underneath it.";
  47. next;
  48. mes "[ Reckless Explorer ]";
  49. mes "Some of the restoration workers and guards that were sent to the palace went missing. Rumors has it that monsters are crawling down there.";
  50. next;
  51. mes "[ Reckless Explorer ]";
  52. mes "Because its depth is seemingly endless, the people here became afraid of this place and started calling it Infinite Space.";
  53. next;
  54. mes "[ Reckless Explorer ]";
  55. mes "I know some people who sneaked in and made a fortune. That's why I'm going to give it a try, are you interested?";
  56. next;
  57. if (select("I'm not interested.:Yes.") == 1) {
  58. mes "[ Reckless Explorer ]";
  59. mes "That's unfortunate. Come back whenever you change your mind. I'll welcome you anytime.";
  60. close;
  61. }
  62. mes "[ Reckless Explorer ]";
  63. mes "All right, Just one thing, I'm inexperienced and a novice adventurer. So I'll help you explore down there by guiding you from somewhere safe.";
  64. next;
  65. mes "[ Reckless Explorer ]";
  66. mes "I'm an adventure tour, and you can explore it yourself. Aren't we compatible with each other? Then, let's get started when you're ready.";
  67. setquest 12364;
  68. completequest 12364;
  69. } else {
  70. mes "[ Reckless Explorer ]";
  71. mes "Are you going in there again this time?";
  72. switch (checkquest(12365,PLAYTIME)) {
  73. case -1:
  74. break;
  75. case 0:
  76. case 1:
  77. next;
  78. mes "[ Reckless Explorer ]";
  79. mes "Oh, your whole body is shouting that it's tired. You can't go down there like this.";
  80. close;
  81. case 2:
  82. erasequest 12365;
  83. break;
  84. }
  85. }
  86. next;
  87. .@md_name$ = "Infinite Space";
  88. .@party_id = getcharid(1);
  89. if (!.@party_id) {
  90. mes "[ Reckless Explorer ]";
  91. mes "It's impossible alone. Would you like to organize a party at least one person or join another party and come back?";
  92. close;
  93. }
  94. if (select("Prepare to enter Infinite Space:Cancel") == 2)
  95. close;
  96. mes "[ Reckless Explorer ]";
  97. mes "Once the passage opens, take a breath for a while and talk to me again.";
  98. if (instance_create(.@md_name$) == -3)
  99. dispbottom "The reservation of the instance '" + .@md_name$ + "' has failed due to an active instance.";
  100. close;
  101. }
  102. cmd_fild07,54,280,5 script Temporary Entrance#pa0829_01 PORTAL,{
  103. switch (checkquest(12365,PLAYTIME)) {
  104. case -1:
  105. break;
  106. case 0:
  107. case 1:
  108. mes "The passage is not yet activated.";
  109. close;
  110. case 2:
  111. erasequest 12365;
  112. break;
  113. }
  114. .@party_id = getcharid(1);
  115. .@party_name = getpartyname(.@party_id);
  116. .@md_name$ = "Infinite Space";
  117. switch (instance_enter(.@md_name$)) {
  118. case IE_OK:
  119. setquest 12365;
  120. mapannounce "cmd_fild07", strcharinfo(0) + " of the party, "+ .@party_name$ +", is entering the " + .@md_name$ + ".", bc_map, "0x00FF99";
  121. end;
  122. default:
  123. mes "The passage is not yet activated.";
  124. close;
  125. }
  126. }
  127. 1@infi,1,1,0 script #inf_space_control HIDDEN_WARP_NPC,{
  128. end;
  129. OnInstanceInit:
  130. 'map$ = instance_mapname("1@infi");
  131. 'floor = 1;
  132. 'sanity = 0;
  133. enablenpc instance_npcname("#inf_space_mobs");
  134. enablenpc instance_npcname("#w0_0");
  135. enablenpc instance_npcname("#w0");
  136. disablenpc instance_npcname("#w50_ppl");
  137. hideonnpc instance_npcname("#w0");
  138. // Initiate Warp Portals
  139. for (.@i = 1; .@i < 50; .@i++)
  140. disablenpc instance_npcname("#w" + .@i);
  141. // Initiate Treasure Chests
  142. for (.@i = 10; .@i < 51; .@i += 10)
  143. disablenpc instance_npcname("#w" + .@i + "_t");
  144. // Initiate Floor Coordinates
  145. setarray .@xy[1],
  146. //1~10
  147. 27,18,33,25,
  148. 29,47,36,57,
  149. 24,81,34,91,
  150. 25,112,35,123,
  151. 16,152,45,164,
  152. 24,228,34,239,
  153. 26,261,35,271,
  154. 25,291,36,302,
  155. 24,324,35,335,
  156. 23,375,23,375,
  157. //11~20
  158. 108,15,118,29,
  159. 108,49,118,58,
  160. 107,80,118,91,
  161. 108,111,116,121,
  162. 99,152,123,163,
  163. 106,229,116,236,
  164. 106,259,117,271,
  165. 109,295,118,303,
  166. 107,324,118,335,
  167. 114,364,114,364,
  168. //21~30
  169. 192,15,204,25,
  170. 192,47,202,56,
  171. 193,80,204,91,
  172. 192,111,204,122,
  173. 191,152,212,162,
  174. 188,219,200,231,
  175. 190,251,199,263,
  176. 188,283,199,295,
  177. 188,315,199,327,
  178. 202,385,202,385,
  179. //31~40
  180. 274,16,285,22,
  181. 274,49,283,58,
  182. 274,80,285,91,
  183. 276,112,286,123,
  184. 268,153,294,164,
  185. 274,220,286,231,
  186. 276,252,285,263,
  187. 274,283,286,294,
  188. 275,316,286,323,
  189. 269,376,269,376,
  190. //40~50
  191. 356,20,364,27,
  192. 357,48,367,58,
  193. 357,79,368,91,
  194. 356,112,368,123,
  195. 349,152,374,164,
  196. 362,221,371,230,
  197. 360,251,372,263,
  198. 361,283,372,295,
  199. 360,315,372,325,
  200. 354,376,354,376;
  201. for (.@i = 1; .@i < getarraysize(.@xy); .@i += 4) {
  202. .@f++;
  203. setd("'xy_" + .@f + "$",.@xy[.@i] + "," + .@xy[.@i+1] + "," + .@xy[.@i+2] + "," + .@xy[.@i+3]);
  204. }
  205. end;
  206. }
  207. // Monster spawn mechanics
  208. 1@infi,1,1,0 script #inf_space_mobs HIDDEN_WARP_NPC,{
  209. end;
  210. OnSummonPoring:
  211. .@event2$ = instance_npcname(strnpcinfo(0)) + "::OnPoringKill";
  212. if (!mobcount('map$,.@event2$)) {
  213. explode(.@xy$,getd("'xy_" + 'floor + "$"),",");
  214. areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",3494,1,.@event2$;
  215. initnpctimer;
  216. }
  217. end;
  218. OnTimer20000:
  219. .@event2$ = instance_npcname(strnpcinfo(0)) + "::OnPoringKill";
  220. killmonster 'map$,.@event2$;
  221. stopnpctimer;
  222. end;
  223. OnSummon:
  224. .@event$ = instance_npcname(strnpcinfo(0)) + "::OnMobKill";
  225. switch ('floor) {
  226. case 1:
  227. setarray .@mob,3384,3385,3386;
  228. setarray .@amount,6,5,3;
  229. break;
  230. case 2:
  231. setarray .@mob,3384,3386,3387;
  232. setarray .@amount,6,3,2;
  233. break;
  234. case 3:
  235. setarray .@mob,3385,3386,3387;
  236. setarray .@amount,5,3,4;
  237. break;
  238. case 4:
  239. setarray .@mob,3386,3387,3388;
  240. setarray .@amount,3,5,3;
  241. break;
  242. case 5:
  243. setarray .@mob,3386,3387,3388,3389,3390,3391;
  244. setarray .@amount,5,3,5,2,2,1;
  245. break;
  246. case 6:
  247. setarray .@mob,3387,3388,3389;
  248. setarray .@amount,9,4,2;
  249. break;
  250. case 7:
  251. setarray .@mob,3388,3389,3390;
  252. setarray .@amount,8,7,2;
  253. break;
  254. case 8:
  255. setarray .@mob,3389,3390,3391;
  256. setarray .@amount,6,3,3;
  257. break;
  258. case 9:
  259. setarray .@mob,3390,3391,3392;
  260. setarray .@amount,7,4,6;
  261. break;
  262. case 10:
  263. setarray .@mob,3426;
  264. setarray .@amount,1;
  265. break;
  266. case 11:
  267. setarray .@mob,3391,3392,3393;
  268. setarray .@amount,5,5,4;
  269. break;
  270. case 12:
  271. setarray .@mob,3392,3393,3394;
  272. setarray .@amount,9,5,1;
  273. break;
  274. case 13:
  275. setarray .@mob,3393,3394,3395;
  276. setarray .@amount,8,3,5;
  277. break;
  278. case 14:
  279. setarray .@mob,3394,3395,3396;
  280. setarray .@amount,9,6,5;
  281. break;
  282. case 15:
  283. setarray .@mob,3393,3394,3395,3396,3397,3398,3399;
  284. setarray .@amount,4,4,7,5,3,4,3;
  285. break;
  286. case 16:
  287. setarray .@mob,3395,3396,3397;
  288. setarray .@amount,6,4,5;
  289. break;
  290. case 17:
  291. setarray .@mob,3396,3397,3398;
  292. setarray .@amount,7,4,4;
  293. break;
  294. case 18:
  295. setarray .@mob,3397,3398,3399;
  296. setarray .@amount,7,6,4;
  297. break;
  298. case 19:
  299. setarray .@mob,3398,3399,3400;
  300. setarray .@amount,9,4,3;
  301. break;
  302. case 20:
  303. setarray .@mob,3427;
  304. setarray .@amount,1;
  305. break;
  306. case 21:
  307. setarray .@mob,3399,3400,3401;
  308. setarray .@amount,7,5,3;
  309. break;
  310. case 22:
  311. setarray .@mob,3400,3401,3402;
  312. setarray .@amount,8,6,2;
  313. break;
  314. case 23:
  315. setarray .@mob,3401,3402,3403;
  316. setarray .@amount,8,7,5;
  317. break;
  318. case 24:
  319. setarray .@mob,3402,3403,3404;
  320. setarray .@amount,8,6,5;
  321. break;
  322. case 25:
  323. setarray .@mob,3402,3403,3404,3405,3406,3407,3408;
  324. setarray .@amount,3,4,5,4,3,3,2;
  325. break;
  326. case 26:
  327. setarray .@mob,3403,3404,3405;
  328. setarray .@amount,7,6,5;
  329. break;
  330. case 27:
  331. setarray .@mob,3404,3405,3406;
  332. setarray .@amount,6,5,5;
  333. break;
  334. case 28:
  335. setarray .@mob,3405,3406,3407;
  336. setarray .@amount,9,5,4;
  337. break;
  338. case 29:
  339. setarray .@mob,3406,3407,3408;
  340. setarray .@amount,7,5,2;
  341. break;
  342. case 30:
  343. setarray .@mob,3428;
  344. setarray .@amount,1;
  345. break;
  346. case 31:
  347. setarray .@mob,3407,3408,3409;
  348. setarray .@amount,8,4,4;
  349. break;
  350. case 32:
  351. setarray .@mob,3408,3409,3410;
  352. setarray .@amount,5,4,5;
  353. break;
  354. case 33:
  355. setarray .@mob,3409,3410,3411;
  356. setarray .@amount,6,5,3;
  357. break;
  358. case 34:
  359. setarray .@mob,3410,3411,3412;
  360. setarray .@amount,7,3,2;
  361. break;
  362. case 35:
  363. setarray .@mob,3409,3410,3411,3412,3413,3414;
  364. setarray .@amount,6,6,4,5,3,4;
  365. break;
  366. case 36:
  367. setarray .@mob,3411,3412,3413;
  368. setarray .@amount,8,3,3;
  369. break;
  370. case 37:
  371. setarray .@mob,3412,3413,3414;
  372. setarray .@amount,6,5,6;
  373. break;
  374. case 38:
  375. setarray .@mob,3413,3414,3415;
  376. setarray .@amount,6,4,2;
  377. break;
  378. case 39:
  379. setarray .@mob,3414,3415,3416;
  380. setarray .@amount,6,6,4;
  381. break;
  382. case 40:
  383. setarray .@mob,3429;
  384. setarray .@amount,1;
  385. break;
  386. case 41:
  387. setarray .@mob,3415,3416,3417;
  388. setarray .@amount,7,4,3;
  389. break;
  390. case 42:
  391. setarray .@mob,3416,3417,3418;
  392. setarray .@amount,8,3,5;
  393. break;
  394. case 43:
  395. setarray .@mob,3417,3418,3419;
  396. setarray .@amount,5,4,2;
  397. break;
  398. case 44:
  399. setarray .@mob,3418,3419,3420;
  400. setarray .@amount,5,7,2;
  401. break;
  402. case 45:
  403. setarray .@mob,3414,3415,3416,3417,3418,3419,3420;
  404. setarray .@amount,4,5,4,3,6,5,4;
  405. break;
  406. case 46:
  407. setarray .@mob,3412,3419;
  408. setarray .@amount,2,7;
  409. break;
  410. case 47:
  411. setarray .@mob,3413,3419,3420;
  412. setarray .@amount,4,7,6;
  413. break;
  414. case 48:
  415. setarray .@mob,3414,3419,3420;
  416. setarray .@amount,3,6,6;
  417. break;
  418. case 49:
  419. setarray .@mob,3415,3419,3420;
  420. setarray .@amount,4,5,9;
  421. break;
  422. case 50:
  423. setarray .@mob,3430;
  424. setarray .@amount,1;
  425. break;
  426. }
  427. if (rand(1,100) <= 'poring_chance)
  428. donpcevent instance_npcname(strnpcinfo(0)) + "::OnSummonPoring";
  429. explode(.@xy$,getd("'xy_" + 'floor + "$"),",");
  430. for (.@i = 0; .@i < getarraysize(.@mob); .@i++) {
  431. areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",.@mob[.@i],.@amount[.@i],.@event$;
  432. if (('floor % 10) == 0) {
  433. 'boss_id = $@mobid[0];
  434. donpcevent instance_npcname(strnpcinfo(0)) + "::OnUnitSpawn";
  435. }
  436. }
  437. if ('floor > 0 && 'floor % 10 > 0 && 'mode == 2) {
  438. if (rand(1,100) <= 10) {
  439. .@boss_id = rand(3421,3425);
  440. while ('last_boss == .@boss_id)
  441. .@boss_id = rand(3421,3425);
  442. 'last_boss = .@boss_id;
  443. areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",.@boss_id,1,.@event$;
  444. }
  445. }
  446. end;
  447. OnUnitSpawn:
  448. .@event$ = instance_npcname(strnpcinfo(0)) + "::OnUnitKill";
  449. setarray .@mob_id,3426,3427,3428,3429,3430;
  450. setarray .@spawn,3436,3437,3438,3439,3440;
  451. setarray .@amount,5,7,7,6,6;
  452. setarray .@unit_id,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440;
  453. setarray .@unit_amount,3,3,4,4,5,5,4,4,5,5;
  454. getunitdata 'boss_id,.@data;
  455. .@index = inarray(.@mob_id,.@data[UMOB_CLASS]);
  456. .@x = .@data[UMOB_X];
  457. .@y = .@data[UMOB_Y];
  458. areamonster 'map$,.@x,.@y,.@x,.@y,"--ja--",.@spawn[.@index],.@amount[.@index],.@event$;
  459. if ('mode == 2) {
  460. sleep 10000;
  461. while (.@index < getarraysize(.@unit_id)) {
  462. if (unitexists('boss_id)) {
  463. mapannounce 'map$,"The boss monster is trying to summon its allies.",0xFFFF00;
  464. getunitdata 'boss_id,.@data;
  465. .@x = .@data[UMOB_X];
  466. .@y = .@data[UMOB_Y];
  467. areamonster 'map$,.@x - 3,.@y - 3,.@x + 3,.@y + 3,"--ja--",.@unit_id[.@index],.@unit_amount[.@index],.@event$;
  468. .@index++;
  469. } else
  470. break;
  471. sleep 5000;
  472. }
  473. }
  474. OnUnitKill:
  475. end;
  476. OnMobKill:
  477. .@event$ = instance_npcname(strnpcinfo(0)) + "::OnMobKill";
  478. if (rand(1,100) <= 'poring_chance)
  479. donpcevent instance_npcname(strnpcinfo(0)) + "::OnSummonPoring";
  480. if (!mobcount('map$,.@event$)) {
  481. sleep 5000;
  482. // Boss Stage, spawn Treasure Chest
  483. if (('floor%10) == 0)
  484. enablenpc instance_npcname("#w" + 'floor + "_t");
  485. if ('floor == 50) {
  486. mapannounce 'map$,"Reckless Explorer : It seems there are no other way from here. It's dangerous, so you'd better return outside.",0xFFFF00;
  487. enablenpc instance_npcname("#w50_ppl");
  488. }
  489. if ('floor < 50) {
  490. if (('floor%10) == 0)
  491. mapannounce 'map$,"Reckless Explorer : This area is safe. Use the passage to go to the next area.",0xFFFF00;
  492. else
  493. mapannounce 'map$,"Reckless Explorer : This area is safe. Go through the passage to the next area.",0xFFFF00;
  494. // Enable warp portal to next floor
  495. enablenpc instance_npcname("#w" + 'floor);
  496. 'floor += 1;
  497. }
  498. }
  499. OnPoringKill:
  500. end;
  501. }
  502. 1@infi,42,8,1 script #w0_0 4_F_GON,{
  503. if (is_party_leader() && !'mode && 'sanity == 0) {
  504. mes "[ Reckless Explorer ]";
  505. mes "I have went in and out of this place many times and figured out a way to provoke the monsters in here. You can get more rewards if you're going to deal with heated ones.";
  506. next;
  507. mes "[ Reckless Explorer ]";
  508. mes "What do you think? Would you like to try something challenging?";
  509. next;
  510. if (select("I want to proceed normally:I want to proceed with something difficult") == 1 && 'sanity == 0) {
  511. 'mode = 1;
  512. 'poring_chance = 1;
  513. } else {
  514. 'mode = 2;
  515. 'poring_chance = 2;
  516. }
  517. mes "[ Reckless Explorer ]";
  518. mes "Good. Shall we go now?";
  519. close2;
  520. if ('sanity == 0) {
  521. 'sanity = 1;
  522. disablenpc instance_npcname(strnpcinfo(0));
  523. hideoffnpc instance_npcname("#w0");
  524. npctalk "Reckless Explorer : Woah~ It's very neat for a sunken place, don't you think?",instance_npcname("#w0");
  525. sleep 3000;
  526. npctalk "Reckless Explorer : I would believe it to be an ancient site, not a lighthouse. It's so well organized...",instance_npcname("#w0");
  527. sleep 3000;
  528. npctalk "Reckless Explorer : Oh, did you hear something?",instance_npcname("#w0");
  529. donpcevent instance_npcname("#inf_space_mobs") + "::OnSummon";
  530. sleep 3000;
  531. npctalk "Reckless Explorer : Oh, that must be the monsters haunting this place.",instance_npcname("#w0");
  532. sleep 3000;
  533. npctalk "Reckless Explorer : They look no different from the ones we saw outside, but I can feel a very strong energy.",instance_npcname("#w0");
  534. sleep 3000;
  535. npctalk "Reckless Explorer : Hm~ It looks dangerous, so I'll go back up. I'll give you directions from above.",instance_npcname("#w0");
  536. disablenpc instance_npcname("#w0");
  537. }
  538. }
  539. end;
  540. }
  541. 1@infi,42,8,1 script #w0 4_F_GON,{
  542. end;
  543. }
  544. 1@infi,366,392,4 script #w50_ppl 4_F_GON,{
  545. mes "[ Reckless Explorer ]";
  546. mes "I'll keep a separate record of this expedition. If you've been lucky, you might have gotten a decent reward from your expedition.";
  547. next;
  548. mes "[ Reckless Explorer ]";
  549. mes "So, shall we get out of here?";
  550. close2;
  551. warp "cmd_fild07",53,270;
  552. end;
  553. }
  554. 1@infi,30,369,3 script #w10_t 4_TREASURE_BOX,{
  555. if (is_party_leader()) {
  556. specialeffect EF_COIN;
  557. disablenpc instance_npcname(strnpcinfo(0));
  558. sleep 1000;
  559. if ('mode == 1)
  560. .@amount = rand(3,10); // Min/Max found in replays
  561. else
  562. .@amount = rand(6,22); // Min/Max found in replays
  563. getmapxy(.@map$,.@x,.@y,BL_NPC);
  564. for (.@i = 0; .@i < .@amount; .@i++) {
  565. switch (rand(1,4)) {
  566. case 1:
  567. .@xs = 1;
  568. .@ys = 1;
  569. break;
  570. case 2:
  571. .@xs = -1;
  572. .@ys = 1;
  573. break;
  574. case 3:
  575. .@xs = 1;
  576. .@ys = -1;
  577. break;
  578. case 4:
  579. .@xs = -1;
  580. .@ys = -1;
  581. break;
  582. }
  583. makeitem 6905,1,.@map$,.@x + .@xs,.@y + .@ys;
  584. }
  585. if ('mode == 2) {
  586. setarray .@equip_id,1994,1938,13323,13126,28703,2024,16038,21014,28105,18128;
  587. getmapxy(.@map$,.@x,.@y,BL_NPC);
  588. for (.@i = 0; .@i < getarraysize(.@equip_id); .@i++) {
  589. if (rand(1,100) <= 1) {
  590. switch (rand(1,4)) {
  591. case 1:
  592. .@xs = 1;
  593. .@ys = 1;
  594. break;
  595. case 2:
  596. .@xs = -1;
  597. .@ys = 1;
  598. break;
  599. case 3:
  600. .@xs = 1;
  601. .@ys = -1;
  602. break;
  603. case 4:
  604. .@xs = -1;
  605. .@ys = -1;
  606. break;
  607. }
  608. makeitem2 .@equip_id[.@i],1,.@map$,.@x + .@xs,.@y + .@ys,0,0,0,0,0,0,0;
  609. }
  610. }
  611. }
  612. }
  613. end;
  614. }
  615. 1@infi,112,369,3 duplicate(#w10_t) #w20_t 4_TREASURE_BOX
  616. 1@infi,194,380,3 duplicate(#w10_t) #w30_t 4_TREASURE_BOX
  617. 1@infi,280,380,3 duplicate(#w10_t) #w40_t 4_TREASURE_BOX
  618. 1@infi,366,380,3 duplicate(#w10_t) #w50_t 4_TREASURE_BOX
  619. // Aegis spawns hard mode specific treasure npcs
  620. //1@infi,112,369,3 duplicate(#w10h_t) #w20h_t 4_TREASURE_BOX
  621. //1@infi,194,380,3 duplicate(#w10h_t) #w30h_t 4_TREASURE_BOX
  622. //1@infi,280,380,3 duplicate(#w10h_t) #w40h_t 4_TREASURE_BOX
  623. //1@infi,366,380,3 duplicate(#w10h_t) #w50h_t 4_TREASURE_BOX
  624. 1@infi,30,31,0 script #w1 WARPNPC,2,2,{
  625. end;
  626. OnTouch:
  627. .@id = atoi(replacestr(strnpcinfo(2),"w",""));
  628. switch (.@id) {
  629. case 1: .@x = 30; .@y = 41; break;
  630. case 2: .@x = 30; .@y = 73; break;
  631. case 3: .@x = 30; .@y = 105; break;
  632. case 4: .@x = 30; .@y = 137; break;
  633. case 5: .@x = 30; .@y = 220; break;
  634. case 6: .@x = 30; .@y = 253; break;
  635. case 7: .@x = 30; .@y = 285; break;
  636. case 8: .@x = 30; .@y = 317; break;
  637. case 9: .@x = 30; .@y = 349; break;
  638. case 10: .@x = 112; .@y = 10; break;
  639. case 11: .@x = 112; .@y = 41; break;
  640. case 12: .@x = 112; .@y = 73; break;
  641. case 13: .@x = 112; .@y = 105; break;
  642. case 14: .@x = 112; .@y = 137; break;
  643. case 15: .@x = 112; .@y = 220; break;
  644. case 16: .@x = 112; .@y = 253; break;
  645. case 17: .@x = 112; .@y = 285; break;
  646. case 18: .@x = 112; .@y = 317; break;
  647. case 19: .@x = 112; .@y = 349; break;
  648. case 20: .@x = 198; .@y = 10; break;
  649. case 21: .@x = 198; .@y = 41; break;
  650. case 22: .@x = 198; .@y = 73; break;
  651. case 23: .@x = 198; .@y = 105; break;
  652. case 24: .@x = 198; .@y = 137; break;
  653. case 25: .@x = 198; .@y = 220; break;
  654. case 26: .@x = 198; .@y = 245; break;
  655. case 27: .@x = 198; .@y = 277; break;
  656. case 28: .@x = 198; .@y = 309; break;
  657. case 29: .@x = 198; .@y = 341; break;
  658. case 30: .@x = 280; .@y = 10; break;
  659. case 31: .@x = 280; .@y = 41; break;
  660. case 32: .@x = 280; .@y = 73; break;
  661. case 33: .@x = 280; .@y = 105; break;
  662. case 34: .@x = 280; .@y = 137; break;
  663. case 35: .@x = 280; .@y = 220; break;
  664. case 36: .@x = 280; .@y = 245; break;
  665. case 37: .@x = 280; .@y = 277; break;
  666. case 38: .@x = 280; .@y = 309; break;
  667. case 39: .@x = 280; .@y = 341; break;
  668. case 40: .@x = 362; .@y = 10; break;
  669. case 41: .@x = 362; .@y = 41; break;
  670. case 42: .@x = 362; .@y = 73; break;
  671. case 43: .@x = 362; .@y = 105; break;
  672. case 44: .@x = 362; .@y = 137; break;
  673. case 45: .@x = 362; .@y = 220; break;
  674. case 46: .@x = 362; .@y = 245; break;
  675. case 47: .@x = 362; .@y = 277; break;
  676. case 48: .@x = 362; .@y = 309; break;
  677. case 49: .@x = 362; .@y = 341; break;
  678. default: end;
  679. }
  680. warp 'map$,.@x,.@y;
  681. if (is_party_leader())
  682. sleep 100;
  683. if ('sanity < 'floor ) {
  684. donpcevent instance_npcname("#inf_space_mobs") + "::OnSummon";
  685. 'sanity += 1;
  686. }
  687. end;
  688. }
  689. 1@infi,30,63,0 duplicate(#w1) #w2 WARPNPC,2,2
  690. 1@infi,30,95,0 duplicate(#w1) #w3 WARPNPC,2,2
  691. 1@infi,30,127,0 duplicate(#w1) #w4 WARPNPC,2,2
  692. 1@infi,30,168,0 duplicate(#w1) #w5 WARPNPC,2,2
  693. 1@infi,30,243,0 duplicate(#w1) #w6 WARPNPC,2,2
  694. 1@infi,30,275,0 duplicate(#w1) #w7 WARPNPC,2,2
  695. 1@infi,30,307,0 duplicate(#w1) #w8 WARPNPC,2,2
  696. 1@infi,30,339,0 duplicate(#w1) #w9 WARPNPC,2,2
  697. 1@infi,30,380,0 duplicate(#w1) #w10 WARPNPC,2,2
  698. 1@infi,112,31,0 duplicate(#w1) #w11 WARPNPC,2,2
  699. 1@infi,112,63,0 duplicate(#w1) #w12 WARPNPC,2,2
  700. 1@infi,112,95,0 duplicate(#w1) #w13 WARPNPC,2,2
  701. 1@infi,112,127,0 duplicate(#w1) #w14 WARPNPC,2,2
  702. 1@infi,112,168,0 duplicate(#w1) #w15 WARPNPC,2,2
  703. 1@infi,112,243,0 duplicate(#w1) #w16 WARPNPC,2,2
  704. 1@infi,112,275,0 duplicate(#w1) #w17 WARPNPC,2,2
  705. 1@infi,112,307,0 duplicate(#w1) #w18 WARPNPC,2,2
  706. 1@infi,112,339,0 duplicate(#w1) #w19 WARPNPC,2,2
  707. 1@infi,112,380,0 duplicate(#w1) #w20 WARPNPC,2,2
  708. 1@infi,198,31,0 duplicate(#w1) #w21 WARPNPC,2,2
  709. 1@infi,198,63,0 duplicate(#w1) #w22 WARPNPC,2,2
  710. 1@infi,198,95,0 duplicate(#w1) #w23 WARPNPC,2,2
  711. 1@infi,198,127,0 duplicate(#w1) #w24 WARPNPC,2,2
  712. 1@infi,198,168,0 duplicate(#w1) #w25 WARPNPC,2,2
  713. 1@infi,194,235,0 duplicate(#w1) #w26 WARPNPC,2,2
  714. 1@infi,194,267,0 duplicate(#w1) #w27 WARPNPC,2,2
  715. 1@infi,194,299,0 duplicate(#w1) #w28 WARPNPC,2,2
  716. 1@infi,194,331,0 duplicate(#w1) #w29 WARPNPC,2,2
  717. 1@infi,194,392,0 duplicate(#w1) #w30 WARPNPC,2,2
  718. 1@infi,280,31,0 duplicate(#w1) #w31 WARPNPC,2,2
  719. 1@infi,280,63,0 duplicate(#w1) #w32 WARPNPC,2,2
  720. 1@infi,280,95,0 duplicate(#w1) #w33 WARPNPC,2,2
  721. 1@infi,280,127,0 duplicate(#w1) #w34 WARPNPC,2,2
  722. 1@infi,280,168,0 duplicate(#w1) #w35 WARPNPC,2,2
  723. 1@infi,280,235,0 duplicate(#w1) #w36 WARPNPC,2,2
  724. 1@infi,280,267,0 duplicate(#w1) #w37 WARPNPC,2,2
  725. 1@infi,280,299,0 duplicate(#w1) #w38 WARPNPC,2,2
  726. 1@infi,280,331,0 duplicate(#w1) #w39 WARPNPC,2,2
  727. 1@infi,280,392,0 duplicate(#w1) #w40 WARPNPC,2,2
  728. 1@infi,362,31,0 duplicate(#w1) #w41 WARPNPC,2,2
  729. 1@infi,362,63,0 duplicate(#w1) #w42 WARPNPC,2,2
  730. 1@infi,362,95,0 duplicate(#w1) #w43 WARPNPC,2,2
  731. 1@infi,362,127,0 duplicate(#w1) #w44 WARPNPC,2,2
  732. 1@infi,362,168,0 duplicate(#w1) #w45 WARPNPC,2,2
  733. 1@infi,366,235,0 duplicate(#w1) #w46 WARPNPC,2,2
  734. 1@infi,366,267,0 duplicate(#w1) #w47 WARPNPC,2,2
  735. 1@infi,366,299,0 duplicate(#w1) #w48 WARPNPC,2,2
  736. 1@infi,366,331,0 duplicate(#w1) #w49 WARPNPC,2,2