TempleOfDemonGod.txt 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296
  1. //===== rAthena Script =======================================
  2. //= Temple of Demon God
  3. //===== Description: =========================================
  4. //= [Official Conversion]
  5. //= Temple of Demon God Instance (part of episode 14.3)
  6. //===== Changelogs: ==========================================
  7. //= 1.0 First version. [Capuche]
  8. //============================================================
  9. moro_cav,41,73,4 script Guardian Nidhogg#epeom01 4_F_NYDHOG,{
  10. if (checkquest(7605,PLAYTIME) == 2)
  11. erasequest 7605;
  12. if (getcharid(1) < 1) {
  13. mes "[Nidhogg]";
  14. mes "This place is too dangerous for you to explore alone.";
  15. mes "Please form a party and come with your comrades.";
  16. cutin "ep14_nyd01.bmp",2;
  17. close3;
  18. }
  19. if (is_party_leader() == false) {
  20. mes "[Nidhogg]";
  21. mes "Only party leaders can control access to the Temple of the Demon God.";
  22. mes "It's to ensure the safety of the entire Expedition. Please let your leader talk to me instead.";
  23. cutin "ep14_nyd01.bmp",2;
  24. close3;
  25. }
  26. switch( checkquest(7593,HUNTING) ) {
  27. case -1:
  28. mes "[Nidhogg]";
  29. mes "I'm sorry, but you can't enter this place without approval from the Commander.";
  30. mes "You must be on the quest to subjugate the Demon God to enter this place.";
  31. cutin "ep14_nyd01.bmp",2;
  32. next;
  33. mes "[Nidhogg]";
  34. mes "Please go to Commander Hiva Agip and receive the Demon God Subjugation quest.";
  35. close3;
  36. case 0:
  37. case 1:
  38. mes "[Nidhogg]";
  39. mes "I've been waiting for you, hero-in-waiting. ";
  40. mes "Let me guide you to the depth of the temple where Morroc lies in wait.";
  41. cutin "ep14_nyd03.bmp",2;
  42. next;
  43. mes "[Nidhogg]";
  44. mes "This tree is the spitting image of Yggdrasil.";
  45. mes "I just hope Morroc is not intent on what I fear most.";
  46. mes "Through this tree the door is opened.";
  47. next;
  48. mes "[Nidhogg]";
  49. mes "I can sense that";
  50. mes "this tree is generating mana at certain intervals as if it's breathing.";
  51. mes "I'm going to catch a moment between its breaths to open up a path for you. Are you ready?";
  52. cutin "ep14_nyd04.bmp",2;
  53. next;
  54. if (select( "Enter now.", "Do not enter." ) == 2) {
  55. mes "[Nidhogg]";
  56. mes "Okay.";
  57. mes "I understand if you need time.";
  58. mes "Take your time. I can wait as long as you want me to.";
  59. cutin "ep14_nyd04.bmp",2;
  60. close3;
  61. }
  62. if (instance_create("Temple of the Demon God") < 1) { // todo, custom text
  63. mes "Party Name: " + getpartyname(.@party_id);
  64. mes "Party Leader: " + strcharinfo(0);
  65. mes "^0000ff" + .@md_name$ + " ^000000 - Reservation Failed.";
  66. close;
  67. }
  68. if (isbegin_quest(7596) == 1)
  69. erasequest 7596;
  70. mes "[Nidhogg]";
  71. mes "Just wait a while, and the entrance will open.";
  72. mes "Enter through the tree.";
  73. mes "Don't be scared, even though it's not an ordinary tree.";
  74. cutin "ep14_nyd04.bmp",2;
  75. close3;
  76. case 2: // todo, custom text
  77. mes "[Nidhogg]";
  78. mes "You have eliminated the God of Despair!?";
  79. mes "I can only say that his ambition was too big...";
  80. mes "Always talk about creating a new world and becoming a god...";
  81. cutin "ep14_nyd03.bmp",2;
  82. next;
  83. mes "[Nidhogg]";
  84. mes "But seriously, he didn't create anything at all!";
  85. mes "Abandon the body that used to be a demon, and the appearance after rebirth is just imitating the god...";
  86. next;
  87. mes "[Nidhogg]";
  88. mes "The result is just what a human looks like,";
  89. mes "He can't escape the so-called god frame,";
  90. mes "...you can only say that you are eating bad luck!";
  91. cutin "ep14_nyd02.bmp",2;
  92. next;
  93. cutin "ep14_nyd04.bmp",2;
  94. mes "[Nidhogg]";
  95. mes "I will give you approval for the quest, and you can report to the commander.";
  96. mes "Thank you!";
  97. setquest 7597;
  98. erasequest 7593;
  99. for ( .@quest = 7601; .@quest < 7605; .@quest++ ) {
  100. if (isbegin_quest(.@quest))
  101. erasequest .@quest;
  102. }
  103. if (isbegin_quest(7596))
  104. erasequest 7596;
  105. close3;
  106. }
  107. }
  108. moro_cav,45,75,0 script Yggdrasil Lookalike#eom_gate CLEAR_NPC,{
  109. switch( checkquest(7593,HUNTING) ) {
  110. case -1:
  111. mes "[Nidhogg]";
  112. mes "I'm sorry, but you can't enter this place without approval from the Commander.";
  113. mes "You must be on the quest to subjugate the Demon God to enter this place.";
  114. cutin "ep14_nyd01.bmp",2;
  115. next;
  116. mes "[Nidhogg]";
  117. mes "Please go to Commander Hiva Agip and receive the 'Demon God Subjugation' quest.";
  118. close3;
  119. case 0:
  120. case 1:
  121. mes "You touched the tree and felt a strange flow of mana.";
  122. mes "Perhaps the flow of mana will guide you to the depth of the temple.";
  123. next;
  124. if (select( "Enter.", "Quit." ) == 2) {
  125. mes "[Nidhogg]";
  126. mes "Okay.";
  127. mes "I understand if you need time.";
  128. mes "Take your time. I can wait as long as you want me to.";
  129. cutin "ep14_nyd04.bmp",2;
  130. close3;
  131. }
  132. switch( instance_enter("Temple of the Demon God") ) {
  133. case IE_NOMEMBER:
  134. mes "[Nidhogg]";
  135. mes "This place is too dangerous for you to explore alone.";
  136. mes "Please form a party and come with your comrades.";
  137. cutin "ep14_nyd01.bmp",2;
  138. close3;
  139. case IE_NOINSTANCE:
  140. mes "[Nidhogg]";
  141. mes "No entry permission has been issued under the name of your party.";
  142. mes "Please let your party leader submit an entry request, and I'll open the gate to the temple.";
  143. cutin "ep14_nyd01.bmp",2;
  144. next;
  145. mes "[Nidhogg]";
  146. mes "You are to comply with the rules set by the Expedition.";
  147. mes "It's for everyone's safety.";
  148. close3;
  149. case IE_OTHER: // todo, custom text
  150. mes "[Nidhogg]";
  151. mes "Um...how could this happen... the flow of magic power becomes unstable,";
  152. mes "It hurts my brain, this is the gap I finally made...";
  153. mes "may not be able to enter at the moment...";
  154. cutin "ep14_nyd01.bmp",2;
  155. close3;
  156. case IE_OK:
  157. mapannounce "moro_cav", "" + strcharinfo(0) + " of the party " + getpartyname( getcharid(1) ) + ", is entering Temple of the Demon God.",bc_map;
  158. // warp "1@eom",101,16;
  159. end;
  160. }
  161. case 2: // todo, custom text
  162. mes "[Nidhogg]";
  163. mes "You have eliminated the God of Despair!?";
  164. mes "I can only say that his ambition was too big...";
  165. mes "Always talk about creating a new world and becoming a god...";
  166. cutin "ep14_nyd01.bmp",2;
  167. next;
  168. mes "[Nidhogg]";
  169. mes "But seriously, he didn't create anything at all!";
  170. mes "Abandon the body that used to be a demon, and the appearance after rebirth is just imitating the god...";
  171. cutin "ep14_nyd02.bmp",2;
  172. next;
  173. mes "[Nidhogg]";
  174. mes "The result is just what a human looks like,";
  175. mes "He can't escape the so-called god frame,";
  176. mes "...you can only say that you are eating bad luck!";
  177. cutin "ep14_nyd03.bmp",2;
  178. next;
  179. cutin "ep14_nyd04.bmp",2;
  180. mes "[Nidhogg]";
  181. mes "I will give you approval for the quest, and you can report to the commander.";
  182. mes "Thank you!";
  183. setquest 7597;
  184. erasequest 7593;
  185. for ( .@quest = 7601; .@quest < 7605; .@quest++ ) {
  186. if (isbegin_quest(.@quest))
  187. erasequest .@quest;
  188. }
  189. if (isbegin_quest(7596))
  190. erasequest 7596;
  191. close3;
  192. }
  193. }
  194. 1@eom,1,1,0 script #demon_god_variables -1,{
  195. end;
  196. OnVariableReset:
  197. 'boss_id = 0;
  198. 'boss_hp = 0;
  199. 'bossx = 'bossy = 0;
  200. 'boss_phase = 0;
  201. 'icestunami = false;
  202. 'spawn = false;
  203. 'miniboss_id[0] = 'miniboss_id[1] = 0;
  204. 'combo_is_allowed = false;
  205. 'flowing_lava_deactivate[0] = 'flowing_lava_deactivate[1] = false;
  206. end;
  207. OnMyMobDead:
  208. if (!playerattached()) // shouldn't happen
  209. end;
  210. .@mob_id = killedrid;
  211. sleep 5000;
  212. monster 'map_eom$,0,0,"--ja--", .@mob_id,1, instance_npcname("#demon_god_variables") + "::OnMyMobDead";
  213. end;
  214. OnInstanceInit:
  215. donpcevent instance_npcname("#demon_god_variables") + "::OnVariableReset";
  216. 'map_eom$ = instance_mapname("1@eom");
  217. 'step = 0;
  218. 'inject_soul = 0;
  219. // Entrance
  220. disablenpc instance_npcname("#door_mobmaster");
  221. disablenpc instance_npcname("Empty Soul Globe#ahat01");
  222. disablenpc instance_npcname("Empty Soul Globe#shnaim01");
  223. disablenpc instance_npcname("Filled Soul Globe#ahat02");
  224. disablenpc instance_npcname("Filled Soul Globe#shnaim02");
  225. disablenpc instance_npcname("#gate_to_center");
  226. // Center to Ice
  227. disablenpc instance_npcname("Strange Boy#mockid01");
  228. disablenpc instance_npcname("#gate_to_ice");
  229. disablenpc instance_npcname("Loki#eomloki01");
  230. disablenpc instance_npcname("Nidhogg#eomnyd01");
  231. disablenpc instance_npcname("Brinaranea#brinpc01");
  232. disablenpc instance_npcname("#ice_hpcheck");
  233. disablenpc instance_npcname("Nidhogg#eomnyd02");
  234. disablenpc instance_npcname("#ice_to_center");
  235. // Center to Fire
  236. disablenpc instance_npcname("Morroc#mockid02");
  237. disablenpc instance_npcname("#gate_to_fire");
  238. disablenpc instance_npcname("#fire_event01");
  239. disablenpc instance_npcname("#skollmaster");
  240. disablenpc instance_npcname("#loco_call");
  241. disablenpc instance_npcname("#fire_combo");
  242. disablenpc instance_npcname("Flowing Lava#lavapond01");
  243. disablenpc instance_npcname("Flowing Lava#lavapond02");
  244. disablenpc instance_npcname("Hardened Lava#lavaseal01");
  245. disablenpc instance_npcname("Hardened Lava#lavaseal02");
  246. disablenpc instance_npcname("#lavazone11");
  247. disablenpc instance_npcname("#lavazone12");
  248. disablenpc instance_npcname("#lavazone21");
  249. disablenpc instance_npcname("#lavazone22");
  250. disablenpc instance_npcname("Nidhogg#eomnyd03");
  251. disablenpc instance_npcname("#fire_to_center");
  252. // Center to Last
  253. disablenpc instance_npcname("#gate_to_last");
  254. disablenpc instance_npcname("Strange Young Man#mocadt01");
  255. disablenpc instance_npcname("#moc_master");
  256. disablenpc instance_npcname("#despair_god_main");
  257. disablenpc instance_npcname("#mk_hpcheck");
  258. disablenpc instance_npcname("#moc_origin");
  259. disablenpc instance_npcname("#morocc_god");
  260. disablenpc instance_npcname("#despair_main");
  261. disablenpc instance_npcname("Nidhogg#eomnyd04");
  262. // mimic permanent spawn
  263. .@event$ = instance_npcname("#demon_god_variables") + "::OnMyMobDead";
  264. monster 'map_eom$,0,0,"--ja--", 3101,3, .@event$; // MM_MANA_WHITE
  265. monster 'map_eom$,0,0,"--ja--", 3102,3, .@event$; // MM_MANA_RED
  266. monster 'map_eom$,0,0,"--ja--", 3103,3, .@event$; // MM_MANA_YELLOW
  267. end;
  268. }
  269. 1@eom,101,43,3 script Demon God's Apostle Aha#ahat 4_HUMAN_GERUTOO,{
  270. cutin "ep13_ahat_" + (Sex ? "f" : "m") + ".bmp",2; // note: cutin f for male, m for female
  271. // if (is_party_leader() == false || checkquest(7593,HUNTING) != 1 || isbegin_quest(7596) != 0) { // quest to 'var for reload
  272. if (is_party_leader() == false || checkquest(7593,HUNTING) != 1 || 'step != 0) {
  273. mes "[Ahat]";
  274. mes "Welcome";
  275. mes "to the Temple of the Demon God.";
  276. mes "It's my honor to be your host today.";
  277. close3;
  278. }
  279. .@ahat$ = instance_npcname("Demon God's Apostle Aha#ahat");
  280. mes "[Ahat]";
  281. mes "So, you've come.";
  282. mes "Gosh, you're so persistent.";
  283. mes "Hah hah, are you surprised to see me here?";
  284. npctalk "Ahat: So, you've come.", .@ahat$;
  285. next;
  286. mes "[Ahat]";
  287. mes "Didn't you expect this at all?";
  288. mes "Why don't I introduce myself officially?";
  289. mes "I'm Ahat, the first servant of the Demon God.";
  290. npctalk "Ahat: Why don't I introduce myself officially? I'm Ahat, the first servant of the Demon God.", .@ahat$;
  291. next;
  292. mes "[Ahat]";
  293. mes "Well, well, maybe I forfeit my life today.";
  294. mes "Don't look at me like that. Everything is as planned.";
  295. npctalk "Ahat: Well, well, maybe I forfeit my life today. Don't look at me like that. Everything is as planned.", .@ahat$;
  296. next;
  297. mes "[Ahat]";
  298. mes "My master wishes for Shnaim and I to put you to the test.";
  299. mes "To see if you deserve to be our guests.";
  300. npctalk "Ahat: My master wishes for Shnaim and I to put you to the test. To see if you deserve to be our guests.", .@ahat$;
  301. next;
  302. mes "[Ahat]";
  303. mes "If you think you've come this far on your own,";
  304. mes "you're mistaken.";
  305. npctalk "Ahat: If you think you've come this far on your own, you're mistaken.", .@ahat$;
  306. next;
  307. mes "[Ahat]";
  308. mes "Everything is as the Master has planned.";
  309. mes "For now, let's see if you can open this door.";
  310. npctalk "Ahat: Everything is as the Master has planned. For now, let's see if you can open this door.", .@ahat$;
  311. if (isbegin_quest(7596) == 0)
  312. setquest 7596;
  313. if ('step != 0)
  314. close3;
  315. 'step = 1;
  316. close2;
  317. cutin "",255;
  318. setpcblock PCBLOCK_NPC, true;
  319. sleep2 1000;
  320. setpcblock PCBLOCK_NPC, false;
  321. disablenpc .@ahat$;
  322. warpparty 'map_eom$,101,16,getcharid(1),'map_eom$,2,2;
  323. donpcevent instance_npcname("#door_mobmaster") + "::OnStart";
  324. end;
  325. }
  326. 1@eom,1,1,0 script #door_mobmaster CLEAR_NPC,{
  327. end;
  328. OnStart:
  329. 'apostle = 10;
  330. enablenpc instance_npcname("#door_mobmaster");
  331. .@label$ = instance_npcname("#door_mobmaster") + "::OnMyMobDead";
  332. monster 'map_eom$,102,30, "Demon God's Apostle Ahat",3105,1, .@label$; // MM_GB_MOROCC_1
  333. setunitdata $@mobid[0], UMOB_HP, 5000000;
  334. monster 'map_eom$, 98,30, "Demon God Fragment",1918,1, .@label$;
  335. monster 'map_eom$,100,30, "Demon God Fragment",1918,1, .@label$;
  336. monster 'map_eom$,104,30, "Demon God Fragment",1918,1, .@label$;
  337. monster 'map_eom$,106,30, "Demon God Fragment",1918,1, .@label$;
  338. sleep 2000;
  339. mapannounce 'map_eom$, "Eliminate the Demon God's Apostles, Ahat and Shnaim, and collect their souls.", bc_map, 0x00ff00;
  340. monster 'map_eom$,102,40, "Demon God's Apostle Shnaim",3106,1, .@label$; // MM_GB_MOROCC_4
  341. setunitdata $@mobid[0], UMOB_HP, 5000000;
  342. monster 'map_eom$, 98,40, "Demon God Fragment",1921,1, .@label$;
  343. monster 'map_eom$,100,40, "Demon God Fragment",1921,1, .@label$;
  344. monster 'map_eom$,104,40, "Demon God Fragment",1921,1, .@label$;
  345. monster 'map_eom$,106,40, "Demon God Fragment",1921,1, .@label$;
  346. sleep 3000;
  347. mapannounce 'map_eom$, "The Apostles' souls are the key to opening the Temple of the Demon God.", bc_map, 0x00ff00;
  348. end;
  349. OnMyMobDead:
  350. 'apostle -= 1;
  351. if ('apostle == 0) {
  352. 'step = 2;
  353. disablenpc instance_npcname("#door_mobmaster");
  354. enablenpc instance_npcname("Empty Soul Globe#shnaim01");
  355. enablenpc instance_npcname("Empty Soul Globe#ahat01");
  356. mapannounce 'map_eom$, "Activated the Soul Globes used to open the Temple of the Demon God.", bc_map, 0x00ff00;
  357. }
  358. end;
  359. }
  360. 1@eom,104,56,0 script Empty Soul Globe#ahat01 CLEAR_NPC,{
  361. if ('step == 2) {
  362. if (strnpcinfo(2) == "ahat01")
  363. callsub( S_Globe, 1, "Ahat", 6713, "ahat02" );
  364. else
  365. callsub( S_Globe, 2, "Shnaim", 6714, "shnaim02" );
  366. }
  367. end;
  368. S_Globe:
  369. .@bit = getarg(0);
  370. .@item_id = getarg(2);
  371. .@visible_npc_name$ = getarg(1);
  372. .@hidden_npc_name$ = getarg(3);
  373. disable_items;
  374. if (is_party_leader() == false || isbegin_quest(7596) != 1 || 'step != 2) {
  375. mes "Only party leaders can perform this event.";
  376. close;
  377. }
  378. if (countitem(.@item_id) < 1) {
  379. mes "If you want to activate the soul globes, you need Shnaim's soul.";
  380. close;
  381. }
  382. mes "Inject " + .@visible_npc_name$ + "'s soul into the empty soul globe.";
  383. next;
  384. specialeffect EF_SPHERE;
  385. progressbar "000000",10;
  386. if (!('inject_soul & .@bit) && countitem(.@item_id) > 0) {
  387. 'inject_soul |= .@bit;
  388. delitem .@item_id,1;
  389. specialeffect EF_ENTRY;
  390. disablenpc instance_npcname( strnpcinfo(0) );
  391. enablenpc instance_npcname("Filled Soul Globe#" + .@hidden_npc_name$);
  392. specialeffect EF_ENTRY,AREA, instance_npcname("Filled Soul Globe#" + .@hidden_npc_name$);
  393. specialeffect EF_LEVEL99_3,AREA, instance_npcname("Filled Soul Globe#" + .@hidden_npc_name$);
  394. mes "Successfully activated " + .@visible_npc_name$ + "'s soul globe.";
  395. if ('inject_soul == 3 && 'step == 2) {
  396. 'step = 3;
  397. if (isbegin_quest(7596) == 1)
  398. erasequest 7596;// Qualifications of the Guests
  399. enablenpc instance_npcname("#gate_to_center");
  400. enablenpc instance_npcname("Strange Boy#mockid01");
  401. specialeffect EF_MAPPILLAR,AREA, instance_npcname("#gate_to_center");
  402. specialeffect EF_LEVEL99_3,AREA, instance_npcname("#gate_to_center");
  403. }
  404. }
  405. close;
  406. }
  407. 1@eom,98,56,0 duplicate(Empty Soul Globe#ahat01) Empty Soul Globe#shnaim01 CLEAR_NPC
  408. 1@eom,104,56,0 duplicate(dummy_npc) Filled Soul Globe#ahat02 CLEAR_NPC
  409. 1@eom,98,56,0 duplicate(dummy_npc) Filled Soul Globe#shnaim02 CLEAR_NPC
  410. 1@eom,101,58,0 script #gate_to_center WARPNPC,1,1,{
  411. end;
  412. OnTouch_:
  413. if (isbegin_quest(7596) == 1)
  414. erasequest 7596;
  415. warp 'map_eom$,98,115;
  416. end;
  417. }
  418. 1@eom,100,122,3 script Strange Boy#mockid01 4_F_MOCBOY,{
  419. if ('step != 3)
  420. end;
  421. if (is_party_leader() == false || checkquest(7593,HUNTING) != 1) {
  422. mes "[Boy]";
  423. mes "You insignificant creature.";
  424. mes "How dare you lay a hand on a god-in-waiting?!";
  425. close;
  426. }
  427. cutin "morocc_kid.bmp",2;
  428. mes "[Boy]";
  429. mes "First, let me applaud you for coming this far.";
  430. mes "You've been a good pawn.";
  431. next;
  432. select("What are you talking about?");
  433. unittalk getcharid(3), "" + strcharinfo(0) + " : What are you talking about?";
  434. mes "[Boy]";
  435. mes "I've been waiting for this day.";
  436. mes "To get out of that corner of the demon world and rule the entire universe.";
  437. npctalk "Boy: I've been waiting for this day. To get out of that corner of the demon world and rule the entire universe.";
  438. sleep2 2000;
  439. next;
  440. mes "[Boy]";
  441. mes "To achieve that, I realized I must abandon my old body.";
  442. mes "So I died--well, I let you kill me.";
  443. npctalk "Boy: To achieve that, I realized I must abandon my old body. So I died--well, I let you kill me.";
  444. sleep2 2000;
  445. next;
  446. mes "[Boy]";
  447. mes "Death is an inevitable step to take before rebirth.";
  448. mes "So I'm reborn--again, you brought me back.";
  449. npctalk "Boy: Death is an inevitable step to take before rebirth. So I've been reborn--again, you've brought me back.";
  450. sleep2 2000;
  451. next;
  452. mes "[Boy]";
  453. mes "All this has been arranged so that I could be reborn as God.";
  454. npctalk "Boy: All this has been arranged so that I could be reborn as God.";
  455. sleep2 2000;
  456. next;
  457. mes "[Morroc]";
  458. mes "That's right, you foolish humans!";
  459. mes "I died once, so that I could circle around the world and embrace it in my arms.";
  460. mes "I've been reborn to engulf this world.";
  461. npctalk "Morocc: I died once, so that I could circle around the world and embrace it in my arms. I've been reborn to engulf this world.";
  462. sleep2 2000;
  463. next;
  464. mes "[Morroc]";
  465. mes "I'll create a new world and become its Creator.";
  466. mes "Let me ask you, the first creatures that have stepped into my newborn land.";
  467. npctalk "Morocc: I'll create a new world and become its Creator. Let me ask you, the first creatures that have stepped into my newborn land.";
  468. sleep2 2000;
  469. next;
  470. mes "[Morroc]";
  471. mes "How'd you like to follow me and watch the birth of a new world?";
  472. npctalk "Morocc: How'd you like to follow me and watch the birth of a new world?";
  473. close2;
  474. setpcblock PCBLOCK_NPC, true;
  475. cutin "",255;
  476. sleep2 1000;
  477. .@loki$ = instance_npcname("Loki#eomloki01");
  478. .@nidhogg$ = instance_npcname("Nidhogg#eomnyd01");
  479. enablenpc .@loki$;
  480. enablenpc .@nidhogg$;
  481. npctalk "Loki: Enough with your nonsense. Just say you like destroying things.", .@loki$;
  482. sleep2 5000;
  483. npctalk "Loki: Create a new world and become its Creator? If this is the new world you're talking about, then I'm disappointed.", .@loki$;
  484. sleep2 5000;
  485. npctalk "Loki: Even if you burn your body, your power is not as potent as that of Ymir of the Genesis.", .@loki$;
  486. sleep2 5000;
  487. npctalk "Loki: Just the fact that you had to steal Yggdrasil shows your lack of creativity.", .@loki$;
  488. sleep2 5000;
  489. npctalk "Loki: Take a good look at yourself. You're delusional if you think you look like a creator of any kind.", .@loki$;
  490. sleep2 5000;
  491. npctalk "Nidhogg: I second that. You're unnecessary to this world. You don't belong here.", .@nidhogg$;
  492. sleep2 4000;
  493. npctalk "Nidhogg: Even Yggdrasil denies your existence!", .@nidhogg$;
  494. sleep2 4000;
  495. npctalk "Nidhogg: As the Guardian of Yggdrasil, I have to remove you from this world.", .@nidhogg$;
  496. sleep2 2000;
  497. npctalk "Morroc: Pah!";
  498. sleep2 2000;
  499. npctalk "Morroc: Mortal, you must have a death wish to come at me like this.";
  500. sleep2 3000;
  501. npctalk "Morroc: I'll take your flesh and blood as housewarming gifts for my new world.";
  502. sleep2 3000;
  503. npctalk "Morroc: Have you beheld the darkness of the Genesis?";
  504. sleep2 3000;
  505. npctalk "Morroc: Have you beheld frost, the beginning of life?";
  506. sleep2 6000;
  507. npctalk "Morroc: Behold the Frost of Audhumla I brought back to life, into this world.";
  508. sleep2 3000;
  509. specialeffect EF_ENTRY;
  510. if ('step == 3) {
  511. 'step = 4;
  512. disablenpc instance_npcname("Strange Boy#mockid01");
  513. donpcevent instance_npcname("#gate_to_ice") + "::OnEnable";
  514. enablenpc instance_npcname("Nidhogg#eomnyd01");
  515. enablenpc instance_npcname("Brinaranea#brinpc01");
  516. npctalk "Loki: Are you running?", .@loki$;
  517. sleep2 2000;
  518. disablenpc .@loki$;
  519. }
  520. setpcblock PCBLOCK_NPC, false;
  521. end;
  522. }
  523. 1@eom,91,120,0 script #gate_to_ice WARPNPC,1,1,{
  524. end;
  525. OnEnable:
  526. .@gate_to_ice = instance_npcname("#gate_to_ice");
  527. enablenpc instance_npcname("#gate_to_ice");
  528. specialeffect EF_ICECRASH;
  529. sleep 1000;
  530. specialeffect EF_MAPPILLAR;
  531. end;
  532. OnTouch_:
  533. if (isbegin_quest(7601) == 0 && isbegin_quest(7602) == 0)
  534. setquest 7601;
  535. warp 'map_eom$,61,88;
  536. end;
  537. }
  538. 1@eom,95,122,5 script Loki#eomloki01 4_M_ROKI2,{
  539. mes "[Loki]";
  540. mes "You're helpless.";
  541. mes "And disgusting.";
  542. close;
  543. }
  544. 1@eom,94,120,5 script Nidhogg#eomnyd01 4_F_NYDHOG,2,2,{
  545. if ('step < 4 || is_party_leader() == false)
  546. end;
  547. if (getmercinfo(0) > 0) {
  548. mes "[Nidhogg]";
  549. mes "You're with a mercenary.";
  550. mes "Could you dismiss your current mercenary and hire me instead?";
  551. close;
  552. }
  553. switch( checkquest(7605,PLAYTIME) ) {
  554. case -1:
  555. break;
  556. case 0:
  557. case 1:
  558. mes "[Nidhogg]";
  559. mes "I already assisted you once.";
  560. mes "Please be careful!";
  561. close;
  562. case 2:
  563. erasequest 7605;
  564. break;
  565. }
  566. setnpcdisplay instance_npcname("Nidhogg#eomnyd01"), 3087;
  567. mes "[Nidhogg]";
  568. mes "" + strcharinfo(0) + ",";
  569. mes "allow me to aid you in this battle.";
  570. npctalk "Nidhogg: Allow me to aid you in this battle.";
  571. specialeffect EF_SPHERE;
  572. next;
  573. mes "[Nidhogg]";
  574. mes "My duty as the guardian isn't over yet.";
  575. npctalk "Nidhogg: My duty as the guardian isn't over yet.";
  576. next;
  577. mercenary_create 3087,1800000;// M_NYDHOG
  578. mes "^4d4dffGuardian Nidhogg has joined your party.^000000";
  579. setquest 7605;// Guardian's Blessing
  580. disablenpc instance_npcname("Nidhogg#eomnyd01");
  581. close;
  582. OnTouch:
  583. if ('step >= 4 && is_party_leader())
  584. npctalk "Nidhogg: Wait!";
  585. end;
  586. }
  587. // Center -> Ice
  588. 1@eom,48,88,0 script Cold Mana Crystalline#eom01 4_ENERGY_BLUE,{
  589. getitem 22566,1;// Frost_Crystal
  590. specialeffect EF_LEVEL99_4;
  591. disablenpc instance_npcname( strnpcinfo(0) );
  592. end;
  593. }
  594. 1@eom,51,103,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom02 4_ENERGY_BLUE
  595. 1@eom,24,109,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom03 4_ENERGY_BLUE
  596. 1@eom,26,128,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom04 4_ENERGY_BLUE
  597. 1@eom,40,140,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom05 4_ENERGY_BLUE
  598. 1@eom,38,139,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom06 4_ENERGY_BLUE
  599. 1@eom,51,149,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom07 4_ENERGY_BLUE
  600. 1@eom,49,148,0 duplicate(Cold Mana Crystalline#eom01) Cold Mana Crystalline#eom08 4_ENERGY_BLUE
  601. 1@eom,61,88,0 script #icemob01 HIDDEN_WARP_NPC,2,1,{
  602. end;
  603. OnTouch_:
  604. if ('step >= 4) {
  605. disablenpc instance_npcname("#icemob01");
  606. areamonster 'map_eom$,40,93,48,101, "Frost Spider",3088,4; // MM_BRINARANEA_BABY
  607. }
  608. end;
  609. }
  610. 1@eom,22,116,3 script Frost Spider#icemob02 3088,3,3,{
  611. end;
  612. OnTouch_:
  613. if ('step >= 4) {
  614. disablenpc instance_npcname("Frost Spider#icemob02");
  615. monster 'map_eom$,22,116, "Frost Spider",3088,1; // MM_BRINARANEA_BABY
  616. areamonster 'map_eom$,22,113,28,119, "Frost Spider",3088,3;
  617. }
  618. end;
  619. }
  620. 1@eom,53,134,3 script Frost Spider#icemob03 3088,3,3,{
  621. end;
  622. OnTouch_:
  623. if ('step >= 4) {
  624. disablenpc instance_npcname("Frost Spider#icemob03");
  625. monster 'map_eom$,53,134, "Frost Spider",3088,1; // MM_BRINARANEA_BABY
  626. areamonster 'map_eom$,47,133,53,139, "Frost Spider",3088,3;
  627. }
  628. end;
  629. }
  630. 1@eom,38,129,3 script Brinaranea#brinpc01 3091,10,10,{
  631. end;
  632. OnTouch_:
  633. if ('step == 4) {
  634. 'step = 5;
  635. npctalk "Brinaranea: Ooh, food walks into my lair.";
  636. initnpctimer;
  637. }
  638. end;
  639. OnTimer3000:
  640. npctalk "Brinaranea: My children will have a feast tonight. Ho ho ho!";
  641. disablenpc instance_npcname("Brinaranea#brinpc01");
  642. donpcevent instance_npcname("#ice_hpcheck") + "::OnSpawn";
  643. end;
  644. OnTimer5000:
  645. stopnpctimer;
  646. unittalk 'boss_id, "Time to cook! *Giggle*";
  647. donpcevent instance_npcname("#ice_combo") + "::OnStart";
  648. donpcevent instance_npcname("#ice_hpcheck") + "::OnStart";
  649. end;
  650. }
  651. 1@eom,2,3,0 script #ice_hpcheck CLEAR_NPC,{
  652. end;
  653. OnSpawn:
  654. enablenpc instance_npcname("#ice_hpcheck");
  655. monster 'map_eom$,38,123, "Brinaranea",3091,1, instance_npcname("#ice_hpcheck") + "::OnMyMobDead"; // MM_BRINARANEA
  656. 'boss_id = $@mobid[0];
  657. getunitdata 'boss_id, .@data;
  658. 'boss_hp = .@data[UMOB_MAXHP];
  659. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  660. end;
  661. OnStart:
  662. initnpctimer;
  663. end;
  664. OnTimer3000:
  665. getunitdata 'boss_id, .@data;
  666. .@hp = .@data[UMOB_HP];
  667. if ('boss_hp < .@hp) {
  668. 'boss_hp = .@hp;
  669. initnpctimer;
  670. end;
  671. }
  672. if (('boss_hp - .@hp) > 2000000) {
  673. 'boss_hp = .@hp;
  674. donpcevent instance_npcname("#super_heal") + "::OnStart";
  675. initnpctimer;
  676. end;
  677. }
  678. 'boss_hp = .@hp;
  679. if (.@hp > 69500000 && .@hp < 70000000) {
  680. unittalk 'boss_id, "Come out, my children. An exquisite feast has delivered itself to us!";
  681. donpcevent instance_npcname("#ice_hpcheck") + "::OnCallBaby";
  682. }
  683. else if (.@hp > 59500000 && .@hp < 60000000) {
  684. unittalk 'boss_id, "Children, it's time for dinner!";
  685. donpcevent instance_npcname("#ice_hpcheck") + "::OnCallBaby";
  686. }
  687. else if (.@hp > 49500000 && .@hp < 50000000) {
  688. unittalk 'boss_id, "Have all of you fed yet? Come out now!";
  689. donpcevent instance_npcname("#ice_hpcheck") + "::OnCallBaby";
  690. }
  691. else if (.@hp < 22200000 && 'icestunami == false)
  692. donpcevent instance_npcname("#icestunami") + "::OnStart";
  693. initnpctimer;
  694. end;
  695. OnMyMobDead:
  696. donpcevent instance_npcname("#ice_hpcheck") + "::OnEnd";
  697. disablenpc instance_npcname("Brinaranea#brinpc01");
  698. stopnpctimer instance_npcname("#ice_combo");
  699. stopnpctimer instance_npcname("#brinaranea_event_1");
  700. stopnpctimer instance_npcname("#brinaranea_event_2");
  701. stopnpctimer instance_npcname("#brinaranea_event_3");
  702. stopnpctimer instance_npcname("#brinaranea_event_4");
  703. stopnpctimer instance_npcname("Brinaranea#brinpc01");
  704. stopnpctimer instance_npcname("#super_heal");
  705. // stopnpctimer instance_npcname("#icestunami");
  706. enablenpc instance_npcname("Nidhogg#eomnyd02");
  707. enablenpc instance_npcname("#ice_to_center");
  708. enablenpc instance_npcname("Morroc#mockid02");
  709. mapannounce 'map_eom$, "Nidhogg: Brinaranea's influence has dissipated, and a new warp gate has appeared.", bc_map, 0x00ff00;
  710. 'step = 6;
  711. donpcevent instance_npcname("#demon_god_variables") + "::OnVariableReset";
  712. end;
  713. OnEnd:
  714. stopnpctimer;
  715. disablenpc instance_npcname("#ice_hpcheck");
  716. killmonster 'map_eom$, instance_npcname("#ice_hpcheck") + "::OnMyMobDead";
  717. end;
  718. OnCallBaby:
  719. sleep 500;
  720. if ('boss_id == 0)
  721. end;
  722. getunitdata 'boss_id, .@data;
  723. 'boss_hp = .@data[UMOB_HP];
  724. killmonster 'map_eom$, instance_npcname("#ice_hpcheck") + "::OnMyMobDead";
  725. monster 'map_eom$,38,123, "Brinaranea",3091,1, instance_npcname("#ice_hpcheck") + "::OnMyMobDead"; // MM_BRINARANEA
  726. 'boss_id = $@mobid[0];
  727. setunitdata 'boss_id, UMOB_HP, 'boss_hp;
  728. if ('spawn == true)
  729. end;
  730. 'spawn = true;
  731. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  732. sleep 1000;
  733. if ('boss_id == 0)
  734. end;
  735. getunitdata 'boss_id, .@data;
  736. areamonster 'map_eom$,(.@data[UMOB_X]-5),(.@data[UMOB_Y]-5),(.@data[UMOB_X]+5),(.@data[UMOB_Y]+5), " ",3088,5; // MM_BRINARANEA_BABY
  737. sleep 15000;
  738. 'spawn = false;
  739. end;
  740. OnTest_hp:
  741. if ('boss_id && mobcount( 'map_eom$, instance_npcname("#ice_hpcheck") + "::OnMyMobDead" ) > 0)
  742. setunitdata 'boss_id, UMOB_HP, 2000000;
  743. end;
  744. }
  745. 1@eom,2,6,0 script #ice_combo CLEAR_NPC,{
  746. end;
  747. OnStart:
  748. initnpctimer;
  749. end;
  750. OnTimer10000:
  751. donpcevent instance_npcname("#brinaranea_event_" + rand(1,4)) + "::OnStart";
  752. stopnpctimer;
  753. end;
  754. }
  755. 1@eom,1,1,0 script #brinaranea_event_1 -1,{
  756. end;
  757. OnStart:
  758. initnpctimer;
  759. unittalk 'boss_id, "A show time!";
  760. end;
  761. OnTimer1000:
  762. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  763. end;
  764. OnTimer2500:
  765. getunitdata 'boss_id, .@data;
  766. 'bossx = .@data[UMOB_X];
  767. 'bossy = .@data[UMOB_Y];
  768. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-3),('bossy+3),-50;
  769. end;
  770. OnTimer4000:
  771. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+3),('bossy+3),-50;
  772. end;
  773. OnTimer5500:
  774. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+3),('bossy-3),-50;
  775. end;
  776. OnTimer7000:
  777. stopnpctimer;
  778. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-3),('bossy-3),-50;
  779. donpcevent instance_npcname("#ice_combo") + "::OnStart";
  780. end;
  781. }
  782. 1@eom,1,1,0 script #brinaranea_event_2 -1,{
  783. end;
  784. OnStart:
  785. initnpctimer;
  786. unittalk 'boss_id, "Ooh, game. It looks delicious!";
  787. end;
  788. OnTimer2000:
  789. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  790. end;
  791. OnTimer4000:
  792. stopnpctimer;
  793. getunitdata 'boss_id, .@data;
  794. if (.@data[UMOB_TARGETID] > 0)
  795. if (getunittype(.@data[UMOB_TARGETID]) == BL_PC)
  796. unitskilluseid 'boss_id,"WZ_JUPITEL",28, .@data[UMOB_TARGETID], -50;
  797. donpcevent instance_npcname("#ice_combo") + "::OnStart";
  798. end;
  799. }
  800. 1@eom,1,1,0 script #brinaranea_event_3 -1,{
  801. end;
  802. OnStart:
  803. initnpctimer;
  804. unittalk 'boss_id, "Wanna play?";
  805. end;
  806. OnTimer1000:
  807. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  808. end;
  809. OnTimer2500:
  810. getunitdata 'boss_id, .@data;
  811. 'bossx = .@data[UMOB_X];
  812. 'bossy = .@data[UMOB_Y];
  813. unitskillusepos 'boss_id,"WZ_VERMILION",5,'bossx,'bossy,-50;
  814. end;
  815. OnTimer3500:
  816. callsub( S_Skill,3 );
  817. end;
  818. OnTimer4500:
  819. callsub( S_Skill,4 );
  820. end;
  821. OnTimer5500:
  822. callsub( S_Skill,5 );
  823. end;
  824. OnTimer6500:
  825. callsub( S_Skill,6 );
  826. end;
  827. OnTimer7500:
  828. callsub( S_Skill,7 );
  829. stopnpctimer;
  830. donpcevent instance_npcname("#ice_combo") + "::OnStart";
  831. end;
  832. S_Skill:
  833. .@d = getarg(0);
  834. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20, ('bossx - .@d), ('bossy + .@d),-50;
  835. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20, ('bossx + .@d), ('bossy + .@d),-50;
  836. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20, ('bossx + .@d), ('bossy - .@d),-50;
  837. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20, ('bossx - .@d), ('bossy - .@d),-50;
  838. return;
  839. }
  840. 1@eom,1,1,0 script #brinaranea_event_4 -1,{
  841. end;
  842. OnStart:
  843. initnpctimer;
  844. unittalk 'boss_id, "Hah hah...";
  845. end;
  846. OnTimer1000:
  847. unitskilluseid 'boss_id,"AL_HEAL",11;
  848. end;
  849. OnTimer2000:
  850. unitskilluseid 'boss_id,"AL_HEAL",11;
  851. end;
  852. OnTimer3000:
  853. stopnpctimer;
  854. unitskilluseid 'boss_id,"AL_HEAL",11;
  855. getunitdata 'boss_id, .@data;
  856. 'boss_hp = .@data[UMOB_HP];
  857. donpcevent instance_npcname("#ice_combo") + "::OnStart";
  858. end;
  859. }
  860. 1@eom,1,1,0 script #super_heal -1,{
  861. end;
  862. OnStart:
  863. initnpctimer;
  864. unittalk 'boss_id, "You're annoying! Don't mess with the Frost of Audhumla!";
  865. unitskilluseid 'boss_id, "NPC_ALLHEAL",1;
  866. getunitdata 'boss_id, .@data;
  867. 'boss_hp = .@data[UMOB_HP];
  868. end;
  869. OnTimer2000:
  870. stopnpctimer;
  871. mapannounce 'map_eom$, "Nidhogg: No... She's regenerated herself perfectly.", bc_map, 0x00ff00;
  872. end;
  873. }
  874. 1@eom,2,4,0 script #icestunami CLEAR_NPC,{
  875. end;
  876. OnStart:
  877. 'icestunami = true;
  878. initnpctimer;
  879. unittalk 'boss_id, "You hellhounds, can you take this too?";
  880. getunitdata 'boss_id, .@data;
  881. 'x_icemine = .@data[UMOB_X];
  882. 'y_icemine = .@data[UMOB_Y];
  883. callsub( S_Spawn,6 );
  884. OnTimer2000: callsub( S_Spawn,3 );
  885. OnTimer4000: callsub( S_Spawn,0 );
  886. OnTimer6000: callsub( S_Spawn,-3 );
  887. OnTimer8000: callsub( S_Spawn,-6 );
  888. OnTimer13000:
  889. killmonster 'map_eom$, instance_npcname("#icestunami") + "::OnMobDead";
  890. end;
  891. OnTimer23000:
  892. 'icestunami = false;
  893. 'x_icemine = 0;
  894. 'y_icemine = 0;
  895. stopnpctimer;
  896. end;
  897. S_Spawn:
  898. .@y = 'y_icemine + getarg(0);
  899. .@label$ = instance_npcname("#icestunami") + "::OnMobDead";
  900. monster 'map_eom$,('x_icemine-6),.@y," ",2943,1, .@label$;// MM_ICE_MINE
  901. monster 'map_eom$,('x_icemine-3),.@y," ",2943,1, .@label$;
  902. monster 'map_eom$, ('x_icemine),.@y," ",2943,1, .@label$;
  903. monster 'map_eom$,('x_icemine+3),.@y," ",2943,1, .@label$;
  904. monster 'map_eom$,('x_icemine+6),.@y," ",2943,1, .@label$;
  905. end;
  906. OnMobDead:
  907. end;
  908. }
  909. 1@eom,59,147,3 script Nidhogg#eomnyd02 4_F_NYDHOG,{
  910. if ('step < 6)
  911. end;
  912. if (isbegin_quest(7602) == 0 && checkquest(7601,HUNTING) == 2) {
  913. mes "[Nidhogg]";
  914. mes "That was a tough battle.";
  915. mes "This may not be good enough, but I hope it'll help your growth.";
  916. next;
  917. mes "^4d4dffGuardian Nidhogg has rewarded you with a large amount of EXP for defeating Brinaranea.^000000";
  918. erasequest 7601;// Temple of the Demon God Phase 1
  919. setquest 7602;// Temple of the Demon God Phase 1 Completed
  920. getexp 1000000,500000;
  921. close;
  922. }
  923. mes "[Nidhogg]";
  924. mes "Can this dreadful place compete with the Frost of the Genesis?";
  925. mes "I can't say.";
  926. mes "He's created nothing on his own. How did he convince himself to think that he could be a creator?";
  927. close;
  928. }
  929. 1@eom,67,149,0 script #ice_to_center WARPNPC,1,1,{
  930. end;
  931. OnTouch_:
  932. if (isbegin_quest(7602) == 0 && checkquest(7601,HUNTING) == 2) {
  933. mes "[Nidhogg]";
  934. mes "That was a tough battle.";
  935. mes "This may not be good enough, but I hope it'll help your growth.";
  936. next;
  937. mes "^4d4dffGuardian Nidhogg has rewarded you with a large amount of EXP for defeating Brinaranea.^000000";
  938. setquest 7602;
  939. erasequest 7601;
  940. getexp 1000000,500000;
  941. close;
  942. }
  943. warp 'map_eom$,98,115;
  944. end;
  945. }
  946. // Center to Fire
  947. 1@eom,100,122,3 script Morroc#mockid02 4_F_MOCBOY,{
  948. if ('step != 6 || is_party_leader() == false || checkquest(7593,HUNTING) != 1)
  949. end;
  950. cutin "morocc_kid.bmp",2;
  951. mes "[Morroc]";
  952. mes "You're good.";
  953. mes "Can you take on the wolf that swallowed the sun?";
  954. npctalk "Morroc: You're good. Can you taken on the wolf that swallowed the sun?";
  955. next;
  956. mes "[Morroc]";
  957. mes "If you can't handle him, then you can't handle a god now, can you?";
  958. npctalk "Morroc: If you can't handle him, then you can't handle a god now, can you?";
  959. next;
  960. mes "[Morroc]";
  961. mes "I'll watch you. Mwa hah hah!";
  962. npctalk "Morroc: I'll watch you. Mwa hah hah!";
  963. close2;
  964. cutin "",255;
  965. if ('step == 6) {
  966. 'step = 7;
  967. setpcblock PCBLOCK_NPC, true;
  968. enablenpc instance_npcname("#fire_event01");
  969. donpcevent instance_npcname("#gate_to_fire") + "::OnEnable";
  970. sleep2 2000;
  971. setpcblock PCBLOCK_NPC, false;
  972. specialeffect EF_ENTRY;
  973. cloakonnpc instance_npcname("Morroc#mockid02"); // cloakonnpc to properly display the previous effect
  974. }
  975. end;
  976. }
  977. 1@eom,104,120,0 script #gate_to_fire WARPNPC,1,1,{
  978. end;
  979. OnTouch_:
  980. if (isbegin_quest(7603) == 0 && isbegin_quest(7604) == 0)
  981. setquest 7603;
  982. warp 'map_eom$,132,93;
  983. end;
  984. OnEnable:
  985. enablenpc instance_npcname("#gate_to_fire");
  986. specialeffect EF_METEORSTORM;
  987. sleep 1000;
  988. specialeffect EF_MAPPILLAR;
  989. end;
  990. }
  991. 1@eom,132,93,0 script #fire_event01 HIDDEN_WARP_NPC,1,1,{
  992. end;
  993. OnTouch_:
  994. disablenpc instance_npcname("#fire_event01");
  995. sleep 1000;
  996. mapannounce 'map_eom$, "Grr...", bc_map, 0xff0000;
  997. sleep 3000;
  998. mapannounce 'map_eom$, "I smell human... Grr...", bc_map, 0xff0000;
  999. monster 'map_eom$,139,101, "Frenzied Kasa",3089,1; // MM_LOCO_KASA
  1000. sleep 1000;
  1001. monster 'map_eom$,142, 98, "Frenzied Kasa",3089,1;
  1002. sleep 1000;
  1003. monster 'map_eom$,144, 92, "Frenzied Kasa",3089,1;
  1004. sleep 3000;
  1005. monster 'map_eom$,145,104, "Frenzied Kasa",3089,1;
  1006. sleep 1000;
  1007. monster 'map_eom$,148, 98, "Frenzied Kasa",3089,1;
  1008. sleep 1000;
  1009. monster 'map_eom$,150, 93, "Frenzied Kasa",3089,1;
  1010. sleep 3000;
  1011. monster 'map_eom$,151,106, "Frenzied Kasa",3089,1;
  1012. sleep 1000;
  1013. monster 'map_eom$,153,100, "Frenzied Kasa",3089,1;
  1014. sleep 1000;
  1015. monster 'map_eom$,156, 95, "Frenzied Kasa",3089,1;
  1016. mapannounce 'map_eom$, "...BURN!", bc_map, 0xff0000;
  1017. donpcevent instance_npcname("#skollmaster") + "::OnStart";
  1018. end;
  1019. }
  1020. 1@eom,3,1,0 script #skollmaster CLEAR_NPC,{
  1021. end;
  1022. OnStart:
  1023. enablenpc instance_npcname("#skollmaster");
  1024. enablenpc instance_npcname("Flowing Lava#lavapond01");
  1025. enablenpc instance_npcname("Flowing Lava#lavapond02");
  1026. enablenpc instance_npcname("#lavazone11");
  1027. enablenpc instance_npcname("#lavazone12");
  1028. enablenpc instance_npcname("#lavazone21");
  1029. enablenpc instance_npcname("#lavazone22");
  1030. 'flowing_lava_deactivate[0] = 'flowing_lava_deactivate[1] = false;
  1031. monster 'map_eom$,148,98, "Muspellskoll",3092,1, instance_npcname("#skollmaster") + "::OnMobDead"; // MM_MUSPELLSKOLL
  1032. 'boss_id = $@mobid[0];
  1033. getunitdata 'boss_id, .@data;
  1034. 'boss_hp = .@data[UMOB_MAXHP];
  1035. sleep 1000;
  1036. if ('boss_id)
  1037. unittalk 'boss_id, "You're the ones... Grr... Good, I'll crush your bones! Grr...";
  1038. sleep 4000;
  1039. if ('boss_id)
  1040. donpcevent instance_npcname("#skollmaster") + "::OnLava_heal";
  1041. end;
  1042. OnLava_heal:
  1043. 'lava_heal = true;
  1044. donpcevent instance_npcname("#fire_combo") + "::OnEnd";
  1045. stopnpctimer instance_npcname("#fire_hpcheck");
  1046. callsub S_Event, 0, 156,117;
  1047. initnpctimer;
  1048. end;
  1049. OnTimer2000:
  1050. callsub S_Event, 1, 180,129;
  1051. end;
  1052. OnTimer4000:
  1053. callsub S_ReSpawn, 168,121;
  1054. unitskilluseid 'boss_id, "CR_REFLECTSHIELD",1;
  1055. unittalk 'boss_id, "Let's do this again. Come on!";
  1056. donpcevent instance_npcname("#loco_call") + "::OnSpawn";
  1057. end;
  1058. OnTimer6000:
  1059. stopnpctimer;
  1060. 'lava_heal = false;
  1061. donpcevent instance_npcname("#fire_hpcheck") + "::OnStart";
  1062. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1063. end;
  1064. S_ReSpawn:
  1065. getunitdata 'boss_id, .@data;
  1066. 'boss_hp = .@data[UMOB_HP];
  1067. killmonster 'map_eom$, instance_npcname("#skollmaster") + "::OnMobDead";
  1068. monster 'map_eom$,getarg(0),getarg(1), "Muspellskoll",3092,1, instance_npcname("#skollmaster") + "::OnMobDead"; // MM_MUSPELLSKOLL
  1069. 'boss_id = $@mobid[0];
  1070. setunitdata 'boss_id, UMOB_HP, 'boss_hp;
  1071. return;
  1072. S_Event:
  1073. callsub S_ReSpawn, getarg(1),getarg(2);
  1074. if ('flowing_lava_deactivate[ getarg(0) ] == false) {
  1075. for ( .@i = 0; .@i < 8; .@i++ ) {
  1076. unitskilluseid 'boss_id, "AL_HEAL",11;
  1077. sleep 100;
  1078. if ('boss_id == 0)
  1079. end;
  1080. }
  1081. unitskilluseid 'boss_id, "AL_HEAL",11;
  1082. }
  1083. mapannounce 'map_eom$, "Nidhogg: Muspellskoll is trying to regenerate itself using the lava!", bc_map, 0x00ff00;
  1084. getunitdata 'boss_id, .@data;
  1085. 'boss_hp = .@data[UMOB_HP];
  1086. donpcevent instance_npcname("#loco_call") + "::OnSpawn";
  1087. return;
  1088. OnMobDead:
  1089. stopnpctimer instance_npcname("#fire_hpcheck");
  1090. stopnpctimer instance_npcname("#muspellskoll_event_1");
  1091. stopnpctimer instance_npcname("#muspellskoll_event_2");
  1092. stopnpctimer instance_npcname("#muspellskoll_event_3");
  1093. donpcevent instance_npcname("#fire_combo") + "::OnEnd";
  1094. donpcevent instance_npcname("#loco_call") + "::OnEnd";
  1095. killmonster 'map_eom$, instance_npcname("#skollmaster") + "::OnMobDead";
  1096. mapannounce 'map_eom$, "Nidhogg: Muspellskoll's influence has dissipated, and a new warp gate has appeared.", bc_map, 0x00ff00;
  1097. enablenpc instance_npcname("Nidhogg#eomnyd03");
  1098. enablenpc instance_npcname("#fire_to_center");
  1099. enablenpc instance_npcname("Strange Young Man#mocadt01");
  1100. 'step = 8;
  1101. donpcevent instance_npcname("#demon_god_variables") + "::OnVariableReset";
  1102. end;
  1103. OnTest_hp:
  1104. if ('boss_id && mobcount( 'map_eom$, instance_npcname("#skollmaster") + "::OnMobDead" ) > 0)
  1105. setunitdata 'boss_id, UMOB_HP, 2000000;
  1106. end;
  1107. }
  1108. 1@eom,3,7,0 script #fire_hpcheck CLEAR_NPC,{
  1109. end;
  1110. OnStart:
  1111. initnpctimer;
  1112. end;
  1113. OnTimer3000:
  1114. getunitdata 'boss_id, .@data;
  1115. .@hp = .@data[UMOB_HP];
  1116. if ('boss_hp < .@hp) {
  1117. initnpctimer;
  1118. end;
  1119. }
  1120. if (('boss_hp - .@hp) > 1000000) {
  1121. 'boss_hp = .@hp;
  1122. donpcevent instance_npcname("#fire_hpcheck") + "::OnHeal"; // the event can stack and the boss can stay in this state until it demise
  1123. initnpctimer;
  1124. end;
  1125. }
  1126. 'boss_hp = .@hp;
  1127. if ('lava_heal == false) {
  1128. if (.@hp > 29500000 && .@hp < 30000000 || .@hp > 35500000 && .@hp < 36000000 || .@hp > 39500000 && .@hp < 40000000 || .@hp > 44500000 && .@hp < 45000000) {
  1129. unittalk 'boss_id, "I'm not going down without a fight!";
  1130. donpcevent instance_npcname("#skollmaster") + "::OnLava_heal";
  1131. }
  1132. }
  1133. initnpctimer;
  1134. end;
  1135. OnHeal:
  1136. if ('fire_combo)
  1137. donpcevent instance_npcname("#fire_combo") + "::OnEnd";
  1138. unittalk 'boss_id, "Do I look easy to you? I'll burn you to ashes!";
  1139. sleep 2000;
  1140. if ('boss_id == 0)
  1141. end;
  1142. getunitdata 'boss_id, .@data;
  1143. unitskillusepos 'boss_id,"WZ_METEOR",11,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1144. sleep 1000;
  1145. if ('boss_id == 0)
  1146. end;
  1147. for ( .@i = 0; .@i < 18; .@i++ ) {
  1148. unitskilluseid 'boss_id, "AL_HEAL",11;
  1149. sleep 200;
  1150. if ('boss_id == 0)
  1151. end;
  1152. }
  1153. getunitdata 'boss_id, .@data;
  1154. unitskillusepos 'boss_id,"WZ_METEOR",11,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1155. for ( .@i = 0; .@i < 18; .@i++ ) {
  1156. unitskilluseid 'boss_id, "AL_HEAL",11;
  1157. sleep 200;
  1158. if ('boss_id == 0)
  1159. end;
  1160. }
  1161. getunitdata 'boss_id, .@data;
  1162. 'boss_hp = .@data[UMOB_HP];
  1163. if (!'fire_combo)
  1164. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1165. end;
  1166. }
  1167. 1@eom,3,5,0 script #loco_call CLEAR_NPC,{
  1168. end;
  1169. OnSpawn:
  1170. enablenpc instance_npcname("#loco_call");
  1171. initnpctimer;
  1172. getunitdata 'boss_id, .@data;
  1173. 'x_loco = .@data[UMOB_X];
  1174. 'y_loco = .@data[UMOB_Y];
  1175. end;
  1176. OnTimer1000:
  1177. .@label$ = instance_npcname("#loco_call") + "::OnMobDead";
  1178. if (mobcount( 'map_eom$, .@label$ ) < 6)
  1179. areamonster 'map_eom$,('x_loco-5),('y_loco-5),('x_loco+5),('y_loco+5)," ",3089,3, .@label$; // MM_LOCO_KASA
  1180. end;
  1181. OnTimer16000:
  1182. stopnpctimer;
  1183. disablenpc instance_npcname("#loco_call");
  1184. end;
  1185. OnMobDead:
  1186. end;
  1187. OnEnd:
  1188. stopnpctimer;
  1189. disablenpc instance_npcname("#loco_call");
  1190. end;
  1191. }
  1192. 1@eom,1,1,0 script #muspellskoll_event_1 -1,{
  1193. end;
  1194. OnEvent:
  1195. initnpctimer;
  1196. unittalk 'boss_id, "Crash and burn!";
  1197. end;
  1198. OnTimer1000:
  1199. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1200. end;
  1201. OnTimer3000:
  1202. stopnpctimer;
  1203. unitskilluseid 'boss_id, "WZ_SIGHTRASHER",10;
  1204. if ('fire_combo)
  1205. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1206. end;
  1207. }
  1208. 1@eom,1,1,0 script #muspellskoll_event_2 -1,{
  1209. end;
  1210. OnEvent:
  1211. initnpctimer;
  1212. unittalk 'boss_id, "Grr...";
  1213. end;
  1214. OnTimer1000:
  1215. getunitdata 'boss_id, .@data;
  1216. 'bossx = .@data[UMOB_X];
  1217. 'bossy = .@data[UMOB_Y];
  1218. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1219. end;
  1220. OnTimer3000:
  1221. unitskillusepos 'boss_id,"WZ_FIREPILLAR",1,('bossx-3),('bossy+3),-50;
  1222. end;
  1223. OnTimer5000:
  1224. unitskillusepos 'boss_id,"WZ_FIREPILLAR",1,('bossx+3),('bossy+3),-50;
  1225. end;
  1226. OnTimer7000:
  1227. unitskillusepos 'boss_id,"WZ_FIREPILLAR",1,('bossx-3),('bossy-3),-50;
  1228. end;
  1229. OnTimer9000:
  1230. unitskillusepos 'boss_id,"WZ_FIREPILLAR",1,('bossx+3),('bossy-3),-50;
  1231. end;
  1232. OnTimer19000:
  1233. stopnpctimer;
  1234. if ('fire_combo)
  1235. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1236. end;
  1237. }
  1238. 1@eom,1,1,0 script #muspellskoll_event_3 -1,{
  1239. end;
  1240. OnEvent:
  1241. initnpctimer;
  1242. unittalk 'boss_id, "My fire will swallow you whole!";
  1243. end;
  1244. OnTimer1000:
  1245. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1246. end;
  1247. OnTimer2000:
  1248. donpcevent instance_npcname("#flamecross") + "::OnStart";
  1249. end;
  1250. OnTimer7000:
  1251. getunitdata 'boss_id, .@data;
  1252. 'bossx = .@data[UMOB_X];
  1253. 'bossy = .@data[UMOB_Y];
  1254. unitskillusepos 'boss_id,"WZ_METEOR",5,('bossx),('bossy+5),-50;
  1255. end;
  1256. OnTimer9000:
  1257. unitskillusepos 'boss_id,"WZ_METEOR",5,('bossx),('bossy-5),-50;
  1258. end;
  1259. OnTimer11000:
  1260. unitskillusepos 'boss_id,"WZ_METEOR",5,('bossx),('bossy+10),-50;
  1261. end;
  1262. OnTimer13000:
  1263. stopnpctimer;
  1264. unitskillusepos 'boss_id,"WZ_METEOR",5,'bossx,('bossy-10),-50;
  1265. if ('fire_combo)
  1266. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1267. end;
  1268. }
  1269. 1@eom,3,3,0 script #fire_combo CLEAR_NPC,{
  1270. end;
  1271. OnEvent:
  1272. initnpctimer;
  1273. 'fire_combo = true;
  1274. end;
  1275. OnTimer10000:
  1276. stopnpctimer;
  1277. .@r = rand(1,4);
  1278. if (.@r == 1)
  1279. donpcevent instance_npcname("#muspellskoll_event_1") + "::OnEvent";
  1280. else if (.@r == 2)
  1281. donpcevent instance_npcname("#muspellskoll_event_2") + "::OnEvent";
  1282. else if (.@r == 3)
  1283. donpcevent instance_npcname("#muspellskoll_event_3") + "::OnEvent";
  1284. else
  1285. donpcevent instance_npcname("#flamecross") + "::OnSpawn";
  1286. end;
  1287. OnEnd:
  1288. stopnpctimer;
  1289. 'fire_combo = false;
  1290. disablenpc instance_npcname("#fire_combo");
  1291. end;
  1292. }
  1293. 1@eom,3,8,0 script #flamecross CLEAR_NPC,{
  1294. end;
  1295. OnStart:
  1296. getunitdata 'boss_id, .@data;
  1297. .@x = .@data[UMOB_X];
  1298. .@y = .@data[UMOB_Y];
  1299. callsub( S_Spawn,.@x,.@y,3 );
  1300. sleep 300;
  1301. callsub( S_Spawn,.@x,.@y,6 );
  1302. sleep 300;
  1303. callsub( S_Spawn,.@x,.@y,9 );
  1304. sleep 300;
  1305. callsub( S_Spawn,.@x,.@y,13 );
  1306. sleep 5000;
  1307. killmonster 'map_eom$, instance_npcname("#flamecross") + "::OnMobDead";
  1308. end;
  1309. S_Spawn:
  1310. if (!'boss_id) {
  1311. killmonster 'map_eom$, instance_npcname("#flamecross") + "::OnMobDead";
  1312. end;
  1313. }
  1314. .@x = getarg(0);
  1315. .@y = getarg(1);
  1316. .@dxy = getarg(2);
  1317. .@label$ = instance_npcname("#flamecross") + "::OnMobDead";
  1318. monster 'map_eom$,(.@x+.@dxy),(.@y+.@dxy)," ",2960,1, .@label$;// MM_FLAMECROSS
  1319. monster 'map_eom$,(.@x-.@dxy),(.@y-.@dxy)," ",2960,1, .@label$;
  1320. monster 'map_eom$,(.@x+.@dxy),(.@y-.@dxy)," ",2960,1, .@label$;
  1321. monster 'map_eom$,(.@x-.@dxy),(.@y+.@dxy)," ",2960,1, .@label$;
  1322. return;
  1323. OnSpawn:
  1324. getunitdata 'boss_id, .@data;
  1325. .@label$ = instance_npcname("#flamecross") + "::OnMobDead"; // same OnMobDead than OnStart?
  1326. if (mobcount( 'map_eom$, .@label$ ) < 2)
  1327. areamonster 'map_eom$,(.@data[UMOB_X]-1),(.@data[UMOB_Y]-1),(.@data[UMOB_X]+1),(.@data[UMOB_Y]+1)," ",3090,2, .@label$; // MM_LOCO_SALAMANDER
  1328. if ('fire_combo)
  1329. donpcevent instance_npcname("#fire_combo") + "::OnEvent";
  1330. end;
  1331. OnMobDead:
  1332. end;
  1333. }
  1334. 1@eom,154,119,0 script Flowing Lava#lavapond01 CLEAR_NPC,{ // todo, custom text
  1335. if (countitem(22566) < 1)
  1336. end;
  1337. mes "It can be used to block the flow of lava using a Frost Crystal.";
  1338. next;
  1339. if (select( "Use a Frost Crystal", "Do not use a Frost Crystal" ) == 2)
  1340. end;
  1341. if ('flowing_lava_deactivate[0] == true)
  1342. end;
  1343. 'flowing_lava_deactivate[0] = true;
  1344. delitem 22566,1;// Frost_Crystal
  1345. disablenpc instance_npcname("Flowing Lava#lavapond01");
  1346. donpcevent instance_npcname("Hardened Lava#lavaseal01") + "::OnEnable";
  1347. initnpctimer;
  1348. end;
  1349. OnTimer300:
  1350. donpcevent instance_npcname("Hardened Lava#lavaseal01") + "::OnEffect";
  1351. end;
  1352. OnTimer120000:
  1353. 'flowing_lava_deactivate[0] = false;
  1354. donpcevent instance_npcname("Hardened Lava#lavaseal01") + "::OnDisable";
  1355. enablenpc instance_npcname("Flowing Lava#lavapond01");
  1356. mapannounce 'map_eom$, "Nidhogg: The Frost has melted. The lava is flowing again!", bc_map, 0x00ff00;
  1357. stopnpctimer;
  1358. end;
  1359. }
  1360. 1@eom,182,129,0 script Flowing Lava#lavapond02 CLEAR_NPC,{ // todo, custom text
  1361. if (countitem(22566) < 1)
  1362. end;
  1363. mes "It can be used to block the flow of lava using a Frost Crystal.";
  1364. next;
  1365. if (select( "Use a Frost Crystal", "Do not use a Frost Crystal" ) == 2)
  1366. end;
  1367. if ('flowing_lava_deactivate[1] == true)
  1368. end;
  1369. 'flowing_lava_deactivate[1] = true;
  1370. delitem 22566,1;// Frost_Crystal
  1371. disablenpc instance_npcname("Flowing Lava#lavapond02");
  1372. donpcevent instance_npcname("Hardened Lava#lavaseal02") + "::OnEnable";
  1373. initnpctimer;
  1374. end;
  1375. OnTimer300:
  1376. donpcevent instance_npcname("Hardened Lava#lavaseal02") + "::OnEffect";
  1377. end;
  1378. OnTimer120000:
  1379. 'flowing_lava_deactivate[1] = false;
  1380. donpcevent instance_npcname("Hardened Lava#lavaseal02") + "::OnDisable";
  1381. enablenpc instance_npcname("Flowing Lava#lavapond02");
  1382. mapannounce 'map_eom$, "Nidhogg: The Frost has melted. The lava is flowing again!", bc_map, 0x00ff00;
  1383. stopnpctimer;
  1384. end;
  1385. }
  1386. 1@eom,154,119,0 script Hardened Lava#lavaseal01 CLEAR_NPC,{
  1387. end;
  1388. OnEnable:
  1389. enablenpc instance_npcname("Hardened Lava#lavaseal01");
  1390. disablenpc instance_npcname("#lavazone11");
  1391. disablenpc instance_npcname("#lavazone12");
  1392. end;
  1393. OnDisable:
  1394. stopnpctimer;
  1395. disablenpc instance_npcname("Hardened Lava#lavaseal01");
  1396. enablenpc instance_npcname("#lavazone11");
  1397. enablenpc instance_npcname("#lavazone12");
  1398. end;
  1399. OnEffect:
  1400. initnpctimer;
  1401. specialeffect EF_LIGHTNINGLOADER;
  1402. end;
  1403. OnTimer3000:
  1404. initnpctimer;
  1405. end;
  1406. }
  1407. 1@eom,182,129,0 script Hardened Lava#lavaseal02 CLEAR_NPC,{
  1408. end;
  1409. OnEnable:
  1410. enablenpc instance_npcname("Hardened Lava#lavaseal02");
  1411. disablenpc instance_npcname("#lavazone21");
  1412. disablenpc instance_npcname("#lavazone22");
  1413. end;
  1414. OnDisable:
  1415. stopnpctimer;
  1416. disablenpc instance_npcname("Hardened Lava#lavaseal02");
  1417. enablenpc instance_npcname("#lavazone21");
  1418. enablenpc instance_npcname("#lavazone22");
  1419. end;
  1420. OnEffect:
  1421. initnpctimer;
  1422. specialeffect EF_LIGHTNINGLOADER;
  1423. end;
  1424. OnTimer3000:
  1425. initnpctimer;
  1426. end;
  1427. }
  1428. 1@eom,161,122,0 script #lavazone11 HIDDEN_WARP_NPC,10,10,{
  1429. end;
  1430. OnTouch:
  1431. percentheal -3,0;
  1432. specialeffect2 EF_SPRINKLESAND;
  1433. end;
  1434. }
  1435. 1@eom,161,102,0 duplicate(#lavazone11) #lavazone12 HIDDEN_WARP_NPC,10,10
  1436. 1@eom,163,150,0 duplicate(#lavazone11) #lavazone21 HIDDEN_WARP_NPC,10,10
  1437. 1@eom,163,150,0 duplicate(#lavazone11) #lavazone22 HIDDEN_WARP_NPC,10,10
  1438. 1@eom,151,155,3 script Nidhogg#eomnyd03 4_F_NYDHOG,{
  1439. if (checkquest(7603,HUNTING) == 2 && isbegin_quest(7604) == 0) {
  1440. mes "[Nidhogg]";
  1441. mes "Good job, again.";
  1442. mes "This may not be good enough, but I hope it'll help your growth.";
  1443. next;
  1444. mes "^4d4dffGuardian Nidhogg has rewarded you with a large amount of EXP for defeating Muspellskoll.^000000";
  1445. erasequest 7603;// Temple of the Demon God Phase 2
  1446. setquest 7604;// Temple of the Demon God Phase 2 Completed
  1447. getexp 1000000,500000;
  1448. close;
  1449. }
  1450. mes "[Nidhogg]";
  1451. mes "Skoll... Skoll and Haati...";
  1452. mes "Everything in here is a mere copy of that in the outside world.";
  1453. mes "He's not a creator.";
  1454. close;
  1455. }
  1456. 1@eom,147,156,0 script #fire_to_center WARPNPC,1,1,{
  1457. end;
  1458. OnTouch_:
  1459. if (checkquest(7603,HUNTING) == 2 && isbegin_quest(7604) == 0) {
  1460. mes "[Nidhogg]";
  1461. mes "Good job, again.";
  1462. mes "This may not be good enough, but I hope it'll help your growth.";
  1463. next;
  1464. mes "^4d4dffGuardian Nidhogg has rewarded you with a large amount of EXP for defeating Muspellskoll.^000000";
  1465. setquest 7604;
  1466. erasequest 7603;
  1467. getexp 1000000,500000;
  1468. close;
  1469. }
  1470. warp 'map_eom$,98,115;
  1471. end;
  1472. }
  1473. // Center to Last
  1474. 1@eom,98,123,5 script Strange Young Man#mocadt01 3097,5,5,{ // MM_MOROCC_ADT
  1475. end;
  1476. OnTouch_:
  1477. if ('step == 8 && is_party_leader()) {
  1478. 'step = 9;
  1479. initnpctimer;
  1480. }
  1481. end;
  1482. OnTimer1000:
  1483. npctalk "You exceed my expectations.";
  1484. end;
  1485. OnTimer4000:
  1486. npctalk "I'll accept your challenge.";
  1487. end;
  1488. OnTimer7000:
  1489. npctalk "I shall drench the land with your flowing blood and nourish it with your torn flesh.";
  1490. end;
  1491. OnTimer8000:
  1492. specialeffect EF_BEGINSPELL5;
  1493. enablenpc instance_npcname("#gate_to_last");
  1494. enablenpc instance_npcname("#moc_master");
  1495. specialeffect EF_READYPORTAL2,AREA, instance_npcname("#gate_to_last");
  1496. end;
  1497. OnTimer10000:
  1498. npctalk "I'll show you the true depths of despair.";
  1499. end;
  1500. OnTimer12000:
  1501. stopnpctimer;
  1502. specialeffect EF_ENTRY;
  1503. disablenpc instance_npcname("Strange Young Man#mocadt01");
  1504. end;
  1505. }
  1506. 1@eom,98,127,0 warp #gate_to_last 1,1,1@eom,102,186
  1507. 1@eom,101,194,3 script #moc_master 3096,10,10,{
  1508. end;
  1509. OnTouch_:
  1510. if ('step != 9)
  1511. end;
  1512. 'step = 10;
  1513. npctalk "Morroc: You're already here, so let's not waste our time on talking.";
  1514. initnpctimer;
  1515. end;
  1516. OnTimer2000:
  1517. stopnpctimer;
  1518. npctalk "Morroc: Come on, mortals!";
  1519. disablenpc instance_npcname("#moc_master");
  1520. donpcevent instance_npcname("#despair_god_main") + "::OnStart";
  1521. end;
  1522. }
  1523. 1@eom,1,1,0 script #despair_god_main -1,{
  1524. end;
  1525. OnStart:
  1526. enablenpc instance_npcname("#despair_god_main");
  1527. 'boss_phase = 1;
  1528. monster 'map_eom$,101,194, "Demigod",3096,1, instance_npcname("#despair_god_main") + "::OnMobDead"; // MM_MOROCC_KID
  1529. 'boss_id = $@mobid[0];
  1530. getunitdata 'boss_id, .@data;
  1531. 'boss_hp = .@data[UMOB_MAXHP];
  1532. unitskillusepos 'boss_id,"WZ_METEOR",11,101,194,-50;
  1533. enablenpc instance_npcname("#mk_trap");
  1534. donpcevent instance_npcname("#mk_hpcheck") + "::OnStart";
  1535. donpcevent instance_npcname("#mk_combo") + "::OnEvent";
  1536. end;
  1537. OnPhase02:
  1538. if ('boss_phase != 1)
  1539. end;
  1540. 'boss_phase = 2;
  1541. stopnpctimer instance_npcname("#demigod_event_1");
  1542. stopnpctimer instance_npcname("#demigod_event_2");
  1543. stopnpctimer instance_npcname("#demigod_event_3");
  1544. stopnpctimer instance_npcname("#mk_hpcheck");
  1545. stopnpctimer instance_npcname("#mk_combo");
  1546. unittalk 'boss_id, "You'll have to do better than this!";
  1547. sleep 2000;
  1548. if ('boss_id == 0)
  1549. end;
  1550. getunitdata 'boss_id, .@data;
  1551. 'boss_hp = .@data[UMOB_HP];
  1552. killmonster 'map_eom$, instance_npcname("#despair_god_main") + "::OnMobDead";
  1553. monster 'map_eom$,101,207, "Demigod",3096,1, instance_npcname("#despair_god_main") + "::OnMobDead"; // MM_MOROCC_KID
  1554. 'boss_id = $@mobid[0];
  1555. setunitdata 'boss_id, UMOB_HP, 'boss_hp;
  1556. setunitdata 'boss_id, UMOB_MODE, (MD_MVP|MD_STATUSIMMUNE|MD_KNOCKBACKIMMUNE|MD_MVP|MD_DETECTOR); // todo: MD_SKILL_IMMUNE ?
  1557. sleep 2000;
  1558. if ('boss_id == 0)
  1559. end;
  1560. donpcevent instance_npcname("#moc_origin") + "::OnEnable";
  1561. end;
  1562. OnPhase03:
  1563. if ('boss_phase != 2)
  1564. end;
  1565. 'boss_phase = 3;
  1566. getunitdata 'boss_id, .@data;
  1567. .@hp = .@data[UMOB_HP] + ('boss_hp - .@data[UMOB_HP]) * 10;
  1568. 'boss_hp = min(80000000,.@hp);
  1569. killmonster 'map_eom$, instance_npcname("#despair_god_main") + "::OnMobDead";
  1570. monster 'map_eom$,101,194, "Demigod",3096,1, instance_npcname("#despair_god_main") + "::OnMobDead"; // MM_MOROCC_KID
  1571. 'boss_id = $@mobid[0];
  1572. setunitdata 'boss_id, UMOB_HP, 'boss_hp;
  1573. unittalk 'boss_id, "Stop being so persistent!";
  1574. sleep 2000;
  1575. if ('boss_id == 0)
  1576. end;
  1577. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1578. sleep 1000;
  1579. if ('boss_id == 0)
  1580. end;
  1581. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1582. sleep 1000;
  1583. if ('boss_id == 0)
  1584. end;
  1585. unitskilluseid 'boss_id, "MG_FIREBALL",1;
  1586. donpcevent instance_npcname("#mk_hpcheck") + "::OnStart";
  1587. donpcevent instance_npcname("#mk_combo") + "::OnEvent";
  1588. end;
  1589. OnTest_hp:
  1590. if ('boss_id && mobcount( 'map_eom$, instance_npcname("#despair_god_main") + "::OnMobDead" ) > 0)
  1591. setunitdata 'boss_id, UMOB_HP, 2000000;
  1592. end;
  1593. OnMobDead:
  1594. disablenpc instance_npcname("#despair_god_main");
  1595. killmonster 'map_eom$, instance_npcname("#despair_god_main") + "::OnMobDead";
  1596. stopnpctimer instance_npcname("#mk_combo");
  1597. stopnpctimer instance_npcname("#demigod_event_1");
  1598. stopnpctimer instance_npcname("#demigod_event_2");
  1599. stopnpctimer instance_npcname("#demigod_event_3");
  1600. stopnpctimer instance_npcname("#moc_meddling");
  1601. stopnpctimer instance_npcname("#mk_hpcheck");
  1602. donpcevent instance_npcname("#moc_origin") + "::OnEnd";
  1603. donpcevent instance_npcname("#demon_god_variables") + "::OnVariableReset";
  1604. donpcevent instance_npcname("#morocc_god") + "::OnStart";
  1605. end;
  1606. }
  1607. 1@eom,4,2,0 script #mk_combo CLEAR_NPC,{
  1608. end;
  1609. OnEvent:
  1610. initnpctimer;
  1611. 'combo_is_allowed = true;
  1612. end;
  1613. OnStart:
  1614. initnpctimer;
  1615. end;
  1616. OnTimer10000:
  1617. donpcevent instance_npcname("#demigod_event_" + rand(1,3)) + "::OnEvent";
  1618. stopnpctimer;
  1619. end;
  1620. OnEnd:
  1621. stopnpctimer;
  1622. 'combo_is_allowed = false;
  1623. end;
  1624. }
  1625. 1@eom,4,1,0 script #mk_hpcheck CLEAR_NPC,{
  1626. end;
  1627. OnStart:
  1628. initnpctimer;
  1629. end;
  1630. OnTimer6000:
  1631. getunitdata 'boss_id, .@data;
  1632. .@hp = .@data[UMOB_HP];
  1633. if ('boss_hp < .@hp) {
  1634. initnpctimer;
  1635. end;
  1636. }
  1637. .@hp_a = 'boss_hp - .@hp;
  1638. if (.@hp_a > 1000000) {
  1639. if (.@hp_a > 200000) {
  1640. .@hp_b = .@hp + (.@hp_a - 200000) * 3;
  1641. .@hp_b = min(80000000, .@hp_b);
  1642. setunitdata 'boss_id, UMOB_HP, .@hp_b;
  1643. mapannounce 'map_eom$, "Nidhogg: Wow, his regenerative power is unheard of! Don't let him regenerate again!", bc_map, 0x00ff00;
  1644. }
  1645. unitskilluseid 'boss_id, "AL_HEAL",11;
  1646. getunitdata 'boss_id, .@data;
  1647. 'boss_hp = .@data[UMOB_HP];
  1648. initnpctimer;
  1649. end;
  1650. }
  1651. 'boss_hp = .@hp;
  1652. switch( 'boss_phase ) { // process by phase instead of (officially) hp, just in case
  1653. case 1:
  1654. if (.@hp < 40000000)
  1655. donpcevent instance_npcname("#despair_god_main") + "::OnPhase02";
  1656. break;
  1657. case 2:
  1658. break;
  1659. case 3:
  1660. if (.@hp > 100000 && .@hp < 30000000)
  1661. donpcevent instance_npcname("#mk_trap") + "::OnTrap";
  1662. break;
  1663. }
  1664. initnpctimer;
  1665. end;
  1666. }
  1667. 1@eom,1,1,0 script #demigod_event_1 -1,{
  1668. end;
  1669. OnEvent:
  1670. initnpctimer;
  1671. unittalk 'boss_id, "Mwah hah, dodge this if you can!";
  1672. end;
  1673. OnTimer2000:
  1674. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1675. end;
  1676. OnTimer3000:
  1677. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1678. end;
  1679. OnTimer5000:
  1680. getunitdata 'boss_id, .@data;
  1681. unitskillusepos 'boss_id,"WZ_VERMILION",21,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1682. end;
  1683. OnTimer7000:
  1684. stopnpctimer;
  1685. unitskilluseid 'boss_id, "CR_REFLECTSHIELD",1;
  1686. if ('combo_is_allowed)
  1687. donpcevent instance_npcname("#mk_combo") + "::OnEvent";
  1688. end;
  1689. }
  1690. 1@eom,1,1,0 script #demigod_event_2 -1,{
  1691. end;
  1692. OnEvent:
  1693. initnpctimer;
  1694. unittalk 'boss_id, "A rhapsody for weak souls...";
  1695. end;
  1696. OnTimer2000:
  1697. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1698. end;
  1699. OnTimer3000:
  1700. getunitdata 'boss_id, .@data;
  1701. 'bossx = .@data[UMOB_X];
  1702. 'bossy = .@data[UMOB_Y];
  1703. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-2),'bossy,-50;
  1704. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+2),'bossy,-50;
  1705. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+2),-50;
  1706. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-2),-50;
  1707. end;
  1708. OnTimer4000:
  1709. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-6),'bossy,-50;
  1710. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+6),'bossy,-50;
  1711. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+6),-50;
  1712. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-6),-50;
  1713. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-4),('bossy+4),-50;
  1714. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-4),('bossy-4),-50;
  1715. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+4),('bossy+4),-50;
  1716. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+4),('bossy-4),-50;
  1717. end;
  1718. OnTimer5000:
  1719. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-10),'bossy,-50;
  1720. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+10),'bossy,-50;
  1721. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+10),-50;
  1722. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-10),-50;
  1723. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-8),('bossy+8),-50;
  1724. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-8),('bossy-8),-50;
  1725. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+8),('bossy+8),-50;
  1726. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+8),('bossy-8),-50;
  1727. end;
  1728. OnTimer6000:
  1729. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-16),'bossy,-50;
  1730. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+16),'bossy,-50;
  1731. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+16),-50;
  1732. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-16),-50;
  1733. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-12),('bossy+12),-50;
  1734. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-12),('bossy-12),-50;
  1735. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+12),('bossy+12),-50;
  1736. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+12),('bossy-12),-50;
  1737. end;
  1738. OnTimer7000:
  1739. stopnpctimer;
  1740. if ('combo_is_allowed)
  1741. donpcevent instance_npcname("#mk_combo") + "::OnEvent";
  1742. end;
  1743. }
  1744. 1@eom,1,1,0 script #demigod_event_3 -1,{
  1745. end;
  1746. OnEvent:
  1747. initnpctimer;
  1748. unittalk 'boss_id, "For whom the fugue is played? For whom the requiem is played?";
  1749. end;
  1750. OnTimer2000:
  1751. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1752. end;
  1753. OnTimer3000:
  1754. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1755. end;
  1756. OnTimer5000:
  1757. getunitdata 'boss_id, .@data;
  1758. unitskillusepos 'boss_id,"WZ_METEOR",5,(.@data[UMOB_X]-5),.@data[UMOB_Y],-50;
  1759. unitskillusepos 'boss_id,"WZ_METEOR",5,(.@data[UMOB_X]+5),.@data[UMOB_Y],-50;
  1760. unitskillusepos 'boss_id,"WZ_METEOR",5,.@data[UMOB_X],(.@data[UMOB_Y]+5),-50;
  1761. unitskillusepos 'boss_id,"WZ_METEOR",5,.@data[UMOB_X],(.@data[UMOB_Y]-5),-50;
  1762. end;
  1763. OnTimer9000:
  1764. unittalk 'boss_id, "Burn to ashes!";
  1765. end;
  1766. OnTimer11000:
  1767. getunitdata 'boss_id, .@data;
  1768. unitskillusepos 'boss_id,"WZ_VERMILION",21,.@data[UMOB_X],.@data[UMOB_Y],-50; // assuming position on (0,0) is self
  1769. end;
  1770. OnTimer13000:
  1771. stopnpctimer;
  1772. if ('combo_is_allowed)
  1773. donpcevent instance_npcname("#mk_combo") + "::OnEvent";
  1774. end;
  1775. }
  1776. 1@eom,4,3,0 script #moc_origin CLEAR_NPC,{
  1777. end;
  1778. OnEnable:
  1779. enablenpc instance_npcname("#moc_origin");
  1780. monster 'map_eom$,114,198, "Morroc of the Genesis", 3098,1, instance_npcname("#moc_origin") + "::OnMobDead1"; // MM_MOROCC_ORIGIN
  1781. 'miniboss_id[0] = $@mobid[0];
  1782. 'miniboss_id[1] = 0;
  1783. initnpctimer;
  1784. end;
  1785. OnTimer1000:
  1786. donpcevent instance_npcname("#moc_origin") + "::OnOriginheal";
  1787. if ('miniboss_id[0] < 1)
  1788. end;
  1789. getunitdata 'miniboss_id[0], .@data;
  1790. if (.@data[UMOB_HP] < 2200000) {
  1791. if ('miniboss_id[1] == 0) {
  1792. monster 'map_eom$,86,199, "Morroc of the Sabbath", 3099,1, instance_npcname("#moc_origin") + "::OnMobDead2"; // MM_MOROCC_REST
  1793. 'miniboss_id[1] = $@mobid[0];
  1794. }
  1795. }
  1796. end;
  1797. OnTimer2000:
  1798. initnpctimer;
  1799. end;
  1800. OnOriginheal:
  1801. for ( .@i = 0; .@i < 11; .@i++ ) {
  1802. unitskilluseid 'boss_id, "AL_HEAL",11;
  1803. sleep 200;
  1804. if ('boss_id == 0)
  1805. end;
  1806. }
  1807. end;
  1808. OnMobDead1:
  1809. 'miniboss_id[0] = 0;
  1810. callsub S_Dead;
  1811. OnMobDead2:
  1812. 'miniboss_id[1] = 0;
  1813. callsub S_Dead;
  1814. S_Dead:
  1815. if ('miniboss_id[1] == 0 && 'miniboss_id[0] > 0) { // todo, custom text
  1816. unittalk 'miniboss_id[0], "---!!!";
  1817. setunitdata 'miniboss_id[0], UMOB_HP, 3000000;
  1818. stopnpctimer instance_npcname("#moc_meddling");
  1819. }
  1820. else if ('miniboss_id[1] == 0 && 'miniboss_id[0] == 0) {
  1821. donpcevent instance_npcname("#moc_origin") + "::OnEnd";
  1822. stopnpctimer instance_npcname("#moc_meddling");
  1823. donpcevent instance_npcname("#despair_god_main") + "::OnPhase03";
  1824. }
  1825. else {
  1826. unittalk 'miniboss_id[1], "I'll put you to rest. It's my mercy!!!"; // todo, custom text
  1827. setunitdata 'miniboss_id[1], UMOB_HP, 1000000;
  1828. donpcevent instance_npcname("#moc_meddling") + "::OnStart";
  1829. }
  1830. end;
  1831. OnEnd:
  1832. stopnpctimer;
  1833. disablenpc instance_npcname("#moc_origin");
  1834. killmonster 'map_eom$, instance_npcname("#moc_origin") + "::OnMobDead1";
  1835. killmonster 'map_eom$, instance_npcname("#moc_origin") + "::OnMobDead2";
  1836. end;
  1837. }
  1838. 1@eom,1,1,0 script #moc_meddling -1,{
  1839. end;
  1840. OnStart:
  1841. initnpctimer;
  1842. getunitdata 'miniboss_id[1], .@data;
  1843. if (.@data[UMOB_HP] > 100000)
  1844. unitskillusepos 'miniboss_id[1],"WZ_METEOR",9,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1845. end;
  1846. OnTimer5000:
  1847. initnpctimer;
  1848. end;
  1849. }
  1850. 1@eom,4,6,0 script #mk_trap CLEAR_NPC,{
  1851. end;
  1852. OnTrap:
  1853. .@label$ = instance_npcname("#mk_trap") + "::OnMobDead";
  1854. if (mobcount( 'map_eom$, .@label$ ) < 3) {
  1855. getunitdata 'boss_id, .@data;
  1856. monster 'map_eom$,.@data[UMOB_X]-4,.@data[UMOB_Y], "Frenzied Kasa", 3089,1, .@label$; // MM_LOCO_KASA
  1857. monster 'map_eom$,.@data[UMOB_X],.@data[UMOB_Y]-4, "Frenzied Kasa", 3089,1, .@label$;
  1858. monster 'map_eom$,.@data[UMOB_X]+4,.@data[UMOB_Y], "Frenzied Kasa", 3089,1, .@label$;
  1859. monster 'map_eom$,.@data[UMOB_X],.@data[UMOB_Y]+4, "Frenzied Kasa", 3089,1, .@label$;
  1860. }
  1861. end;
  1862. OnMobDead:
  1863. end;
  1864. }
  1865. 1@eom,102,222,3 script #morocc_god 3097,{
  1866. end;
  1867. OnStart:
  1868. enablenpc instance_npcname("#morocc_god");
  1869. initnpctimer;
  1870. end;
  1871. OnTimer2000:
  1872. mapannounce 'map_eom$, "This is getting more interesting. *Snicker*", bc_map, 0xff0000;
  1873. end;
  1874. OnTimer6000:
  1875. mapannounce 'map_eom$, "Hey, you don't think this is over already, do you?", bc_map, 0xff0000;
  1876. end;
  1877. OnTimer10000:
  1878. disablenpc instance_npcname("#morocc_god");
  1879. end;
  1880. OnTimer12000:
  1881. donpcevent instance_npcname("#despair_main") + "::OnStart";
  1882. end;
  1883. OnTimer13000:
  1884. unittalk 'boss_id, "What are you waiting for?!";
  1885. end;
  1886. OnTimer14000:
  1887. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1888. end;
  1889. OnTimer16000:
  1890. mapannounce 'map_eom$, "I'll take your blood!", bc_map, 0xff0000;
  1891. end;
  1892. OnTimer17000:
  1893. stopnpctimer;
  1894. getunitdata 'boss_id, .@data;
  1895. unitskillusepos 'boss_id,"NPC_WIDESUCK",1,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1896. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  1897. end;
  1898. }
  1899. 1@eom,1,1,0 script #despair_main -1,{
  1900. end;
  1901. OnStart:
  1902. enablenpc instance_npcname("#despair_main");
  1903. monster 'map_eom$,101,194, "Despair God Morroc",3097,1, instance_npcname("#despair_main") + "::OnMobDead"; // MM_MOROCC_ADT
  1904. 'boss_id = $@mobid[0];
  1905. end;
  1906. OnMobDead:
  1907. disablenpc instance_npcname("#despair_main");
  1908. killmonster 'map_eom$, instance_npcname("#despair_main") + "::OnMobDead";
  1909. stopnpctimer instance_npcname("#morocc_god");
  1910. stopnpctimer instance_npcname("#ma_combo");
  1911. stopnpctimer instance_npcname("#despair_event_1");
  1912. stopnpctimer instance_npcname("#despair_event_2");
  1913. stopnpctimer instance_npcname("#despair_event_3");
  1914. stopnpctimer instance_npcname("#despair_event_4");
  1915. stopnpctimer instance_npcname("#despair_event_5");
  1916. mapannounce 'map_eom$, "D-don't think... th-this... is over.. You're... already... time...", bc_map, 0xff0000;
  1917. initnpctimer;
  1918. 'step = 11;
  1919. donpcevent instance_npcname("#demon_god_variables") + "::OnVariableReset";
  1920. end;
  1921. OnTimer2000:
  1922. stopnpctimer;
  1923. enablenpc instance_npcname("Nidhogg#eomnyd04");
  1924. end;
  1925. OnTest_hp:
  1926. if ('boss_id && mobcount( 'map_eom$, instance_npcname("#despair_main") + "::OnMobDead" ) > 0)
  1927. setunitdata 'boss_id, UMOB_HP, 2000000;
  1928. end;
  1929. }
  1930. 1@eom,4,8,0 script #ma_combo CLEAR_NPC,{
  1931. end;
  1932. OnStart:
  1933. initnpctimer;
  1934. end;
  1935. OnTimer10000:
  1936. donpcevent instance_npcname("#despair_event_" + rand(1,5)) + "::OnEvent";
  1937. stopnpctimer;
  1938. end;
  1939. }
  1940. 1@eom,1,1,0 script #despair_event_1 -1,{
  1941. end;
  1942. OnEvent:
  1943. initnpctimer;
  1944. unittalk 'boss_id, "I'll burn you slowly and painfully.";
  1945. end;
  1946. OnTimer2000:
  1947. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1948. end;
  1949. OnTimer3000:
  1950. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  1951. end;
  1952. OnTimer5000:
  1953. stopnpctimer;
  1954. getunitdata 'boss_id, .@data;
  1955. unitskillusepos 'boss_id,"WZ_METEOR",11,.@data[UMOB_X],.@data[UMOB_Y],-50;
  1956. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  1957. end;
  1958. }
  1959. 1@eom,1,1,0 script #despair_event_2 -1,{
  1960. end;
  1961. OnEvent:
  1962. initnpctimer;
  1963. unittalk 'boss_id, "Can you hear the rhapsody? It's the sound of your soul writhing and screaming in pain!";
  1964. end;
  1965. OnTimer2000:
  1966. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  1967. end;
  1968. OnTimer3000:
  1969. getunitdata 'boss_id, .@data;
  1970. 'bossx = .@data[UMOB_X];
  1971. 'bossy = .@data[UMOB_Y];
  1972. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-2),'bossy,-50;
  1973. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+2),'bossy,-50;
  1974. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+2),-50;
  1975. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-2),-50;
  1976. end;
  1977. OnTimer4000:
  1978. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-6),'bossy,-50;
  1979. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+6),'bossy,-50;
  1980. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+6),-50;
  1981. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-6),-50;
  1982. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-4),('bossy+4),-50;
  1983. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-4),('bossy-4),-50;
  1984. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+4),('bossy+4),-50;
  1985. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+4),('bossy-4),-50;
  1986. end;
  1987. OnTimer5000:
  1988. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-10),'bossy,-50;
  1989. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+10),'bossy,-50;
  1990. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+10),-50;
  1991. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-10),-50;
  1992. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-8),('bossy+8),-50;
  1993. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-8),('bossy-8),-50;
  1994. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+8),('bossy+8),-50;
  1995. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+8),('bossy-8),-50;
  1996. end;
  1997. OnTimer6000:
  1998. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-16),'bossy,-50;
  1999. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+16),'bossy,-50;
  2000. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy+16),-50;
  2001. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,'bossx,('bossy-16),-50;
  2002. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-12),('bossy+12),-50;
  2003. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx-12),('bossy-12),-50;
  2004. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+12),('bossy+12),-50;
  2005. unitskillusepos 'boss_id,"MG_THUNDERSTORM",20,('bossx+12),('bossy-12),-50;
  2006. end;
  2007. OnTimer7000:
  2008. stopnpctimer;
  2009. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  2010. end;
  2011. }
  2012. 1@eom,1,1,0 script #despair_event_3 -1,{
  2013. end;
  2014. OnEvent:
  2015. initnpctimer;
  2016. unittalk 'boss_id, "This is the thunderbolt of death!";
  2017. end;
  2018. OnTimer2000:
  2019. unitskilluseid 'boss_id, "NPC_WIDEWEB",1;
  2020. end;
  2021. OnTimer4000:
  2022. unitskilluseid 'boss_id, "NPC_WIDEFREEZE",5;
  2023. end;
  2024. OnTimer6000:
  2025. getunitdata 'boss_id, .@data;
  2026. unitskillusepos 'boss_id,"WZ_VERMILION",5,(.@data[UMOB_X]-7),.@data[UMOB_Y],-50;
  2027. unitskillusepos 'boss_id,"WZ_VERMILION",5,(.@data[UMOB_X]+7),.@data[UMOB_Y],-50;
  2028. unitskillusepos 'boss_id,"WZ_VERMILION",5,.@data[UMOB_X],(.@data[UMOB_Y]+7),-50;
  2029. unitskillusepos 'boss_id,"WZ_VERMILION",5,.@data[UMOB_X],(.@data[UMOB_Y]-7),-50;
  2030. end;
  2031. OnTimer10000:
  2032. unittalk 'boss_id, "Burn and make beautiful flames!";
  2033. end;
  2034. OnTimer12000:
  2035. getunitdata 'boss_id, .@data;
  2036. unitskillusepos 'boss_id,"WZ_VERMILION",21,.@data[UMOB_X],.@data[UMOB_Y],-50;
  2037. end;
  2038. OnTimer14000:
  2039. stopnpctimer;
  2040. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  2041. end;
  2042. }
  2043. 1@eom,1,1,0 script #despair_event_4 -1,{
  2044. end;
  2045. OnEvent:
  2046. initnpctimer;
  2047. unittalk 'boss_id, "I'll take your life.";
  2048. unitskilluseid 'boss_id, "NPC_FLAMECROSS",1;
  2049. end;
  2050. OnTimer1000:
  2051. getunitdata 'boss_id, .@data;
  2052. unitskillusepos 'boss_id,"NPC_WIDESUCK",1,.@data[UMOB_X],.@data[UMOB_Y],-50;
  2053. end;
  2054. OnTimer5000:
  2055. stopnpctimer;
  2056. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  2057. end;
  2058. }
  2059. 1@eom,1,1,0 script #despair_event_5 -1,{
  2060. end;
  2061. OnEvent:
  2062. initnpctimer;
  2063. unittalk 'boss_id, "*Chuckle*";
  2064. end;
  2065. OnTimer2000:
  2066. unitskilluseid 'boss_id, "NPC_FIRESTORM",3;
  2067. end;
  2068. OnTimer4000:
  2069. getunitdata 'boss_id, .@data;
  2070. unitskillusepos 'boss_id,"WZ_FIREPILLAR",10,.@data[UMOB_X],.@data[UMOB_Y],-50;
  2071. end;
  2072. OnTimer8000:
  2073. stopnpctimer;
  2074. donpcevent instance_npcname("#ma_combo") + "::OnStart";
  2075. end;
  2076. }
  2077. 1@eom,103,194,3 script Nidhogg#eomnyd04 4_F_NYDHOG,{
  2078. if ('step < 11)
  2079. end;
  2080. if (isbegin_quest(7597) == 0 && checkquest(7593,HUNTING) == 2) {
  2081. mes "[Nidhogg]";
  2082. mes "I don't know what to say.";
  2083. mes "We stopped the god-in-waiting.";
  2084. mes "We accomplished our goal.";
  2085. mes "But I'm still unnerved.";
  2086. cutin "ep14_nyd03.bmp",2;
  2087. next;
  2088. mes "[Nidhogg]";
  2089. mes "This world is created in the mind of Morroc's.";
  2090. mes "He'll live forever in this garden he couldn't finish.";
  2091. cutin "ep14_nyd02.bmp",2;
  2092. next;
  2093. mes "[Nidhogg]";
  2094. mes "He probably doesn't know his body is destroyed forever.";
  2095. mes "He was far too ambitious, even for him.";
  2096. mes "He wanted to create a new world and become its creator,";
  2097. next;
  2098. mes "[Nidhogg]";
  2099. mes "but he couldn't create anything on his own.";
  2100. mes "He abandoned his Demon body, just to become a mere facsimile of an existing god.";
  2101. cutin "ep14_nyd03.bmp",2;
  2102. next;
  2103. mes "[Nidhogg]";
  2104. mes "He took the shape of a man.";
  2105. mes "He wasn't creative enough to reinvent the concept of God.";
  2106. mes "He was a paradox.";
  2107. next;
  2108. mes "[Nidhogg]";
  2109. mes "Now we need to get out of this trap in time and end; to reality.";
  2110. mes "This world only exists in the Demon God's mind. The same day repeats forever.";
  2111. next;
  2112. mes "[Nidhogg]";
  2113. mes "Everyone who enters this world will be dragged into the same loop.";
  2114. mes "In that sense, he succeeded in making his own world.";
  2115. cutin "ep14_nyd02.bmp",2;
  2116. next;
  2117. mes "[Nidhogg]";
  2118. mes "Today's despair will repeat day after day.";
  2119. mes "Even though we know this, we'll come back to walk the same path again. I hope I'll be able to fight by you every time...";
  2120. cutin "ep14_nyd03.bmp",2;
  2121. next;
  2122. cutin "ep14_nyd04.bmp",2;
  2123. mes "[Nidhogg]";
  2124. mes "I've talked too much. The Commander must be waiting. Let me validate your feat, so you can report to him.";
  2125. mes "You did great today.";
  2126. if (isbegin_quest(7593) == 1) {
  2127. erasequest 7593;// Demon God Subjugation
  2128. setquest 7597;// Fall of the False God
  2129. }
  2130. if (checkquest(7601,HUNTING) == 1)
  2131. erasequest 7601;
  2132. if (isbegin_quest(7602) > 0)
  2133. erasequest 7602;// Temple of the Demon God Phase 1 Completed
  2134. if (isbegin_quest(7603) == 1)
  2135. erasequest 7603;
  2136. if (isbegin_quest(7604) > 0)
  2137. erasequest 7604;// Temple of the Demon God Phase 2 Completed
  2138. if (isbegin_quest(7596) == 1)
  2139. erasequest 7596;
  2140. }
  2141. else { // todo, custom text
  2142. mes "[Nidhogg]";
  2143. mes "...It feels like things are not over yet,";
  2144. mes "This is very close to Morroc's spiritual world,";
  2145. mes "He should be here to keep thinking about the past!";
  2146. cutin "ep14_nyd03.bmp",2;
  2147. }
  2148. next;
  2149. select("Exit.");
  2150. mes "[Nidhogg]";
  2151. mes "Of course. You must be exhausted.";
  2152. mes "Let me send you to the other members of your Expedition, free of charge.";
  2153. close2;
  2154. warp "moro_vol",91,87;
  2155. end;
  2156. }
  2157. 1@eom,5,1,0 script Little Helper#eomtest 4_ENERGY_BLUE,{
  2158. mes "What?";
  2159. next;
  2160. if (callfunc("F_GM_NPC",1854,0) < 1) {
  2161. mes "Wrong.";
  2162. close;
  2163. }
  2164. mes "What Boss?";
  2165. next;
  2166. switch( select( "Brinaranea", "Muspellskoll", "Demigod", "Despair God" ) ) {
  2167. case 1:
  2168. mes "Brinaranea health was set to 2.000.000.";
  2169. donpcevent instance_npcname("Brinaranea#brinpc01") + "::OnTest_hp";
  2170. close;
  2171. case 2:
  2172. mes "Muspellskoll health was set to 2.000.000.";
  2173. donpcevent instance_npcname("#skollmaster") + "::OnTest_hp";
  2174. close;
  2175. case 3:
  2176. mes "Demigod health was set to 2.000.000.";
  2177. donpcevent instance_npcname("#despair_god_main") + "::OnTest_hp";
  2178. close;
  2179. case 4:
  2180. mes "Despair God health was set to 2.000.000.";
  2181. donpcevent instance_npcname("#despair_main") + "::OnTest_hp";
  2182. close;
  2183. }
  2184. end;
  2185. }