From 93f61040ac281b84c038af72e322a03f60bc6e03 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 19 Oct 2013 16:22:04 -0300 Subject: Instance Dungeons Update As requested by the community in http://hercules.ws/board/topic/1702-implement-rathena-npc/ we're merging in the latest of rAthena's dungeons, this includes the rewriting of all instance dungeons and the addition of 4 dungeons that were not present previously (BakonawaLake, BangungotHospital, BuwayaCave and OldGlastHeim). Update also includes the ability for instances to reset (or be destroyed if instance files were disabled/removed) upon @reloadscript, instance scripts are able to control to what stage the instances are to be reset via the instance_set_respawn (reload spawn) script command, OnInstanceInit labels are now triggered when the instance starts via instance_init (and upon reload), they may be used alongside instance variables (which are persistent to @reloadscript) to save players' progress. - NPC Changelog: -- npc/instances/EndlessTower.txt --- 2.2 Instance system rewrite. [Euphy] --- 2.3 Added some missing announcements. [Euphy] --- 2.4 Added GM management function. [Euphy] -- npc/instances/NydhoggsNest.txt --- 1.5 Instance system rewrite. [Euphy] --- 1.6 Added GM management NPCs. [Euphy] -- npc/instances/OrcsMemory.txt --- 1.7 Instance system rewrite. [Euphy] -- npc/instances/SealedShrine.txt --- 2.3 Instance system rewrite. [Euphy] -- npc/other/gm_npcs.txt --- 1.0 First version. [Euphy] -- npc/re/instances/BakonawaLake.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management NPC. [Euphy] -- npc/re/instances/BangungotHospital.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management function. [Euphy] -- npc/re/instances/BuwayaCave.txt --- 1.0 First version. [Euphy] -- npc/re/instances/HazyForest.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/MalangdoCulvert.txt --- 1.0b Fixed incorrect use of 'close'. [Joseph] --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OctopusCave.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OldGlastHeim.txt --- 1.0 First version. [Euphy] Special Thanks to Haru, Uziel for their contributions to this update, and ossi0110 for helping us debug it. Signed-off-by: shennetsind --- npc/re/instances/BakonawaLake.txt | 543 +++++++++ npc/re/instances/BangungotHospital.txt | 1101 +++++++++++++++++ npc/re/instances/BuwayaCave.txt | 459 +++++++ npc/re/instances/HazyForest.txt | 320 +++-- npc/re/instances/MalangdoCulvert.txt | 355 +++--- npc/re/instances/OctopusCave.txt | 515 ++++---- npc/re/instances/OldGlastHeim.txt | 2059 ++++++++++++++++++++++++++++++++ npc/re/scripts.conf | 4 + 8 files changed, 4725 insertions(+), 631 deletions(-) create mode 100644 npc/re/instances/BakonawaLake.txt create mode 100644 npc/re/instances/BangungotHospital.txt create mode 100644 npc/re/instances/BuwayaCave.txt create mode 100644 npc/re/instances/OldGlastHeim.txt (limited to 'npc/re') diff --git a/npc/re/instances/BakonawaLake.txt b/npc/re/instances/BakonawaLake.txt new file mode 100644 index 000000000..30b28e612 --- /dev/null +++ b/npc/re/instances/BakonawaLake.txt @@ -0,0 +1,543 @@ +//===== Hercules Script ====================================== +//= Bakonawa Lake +//===== By: ================================================== +//= Euphy +//===== Current Version: ===================================== +//= 1.1 +//===== Description: ========================================= +//= [Official Conversion] +//= Defeat Bakonawa before he eats the moon. +//= Part of the "Bakonawa Extermination" quest. +//===== Additional Comments: ================================= +//= 1.0 First version. [Euphy] +//= 1.1 Added GM management NPC. [Euphy] +//============================================================ + +1@ma_b mapflag src4instance +//============================================================ +ma_scene01,174,179,4 script Taho 541,{ + disable_items; + if (checkweight(1201,1) == 0) { + mes "You are carrying too many items. Come back after taking off some of them."; + close; + } + if (MaxWeight - Weight < 10000) { + mes "You are carrying too much weight. Come back after reducing the weight."; + close; + } + if (BaseLevel < 140) { + mes "[Taho]"; + mes "Hey. This is too dangerous a place for you. You cannot keep yourself safe. Get out of here and go to the village right now!"; + close; + } + if (malaya_bakona1 < 7 && malaya_bakona2 < 15) { + mes "[Taho]"; + mes "We are gonna be killed all by that Bakonawa. Ah, we must slay him but unfortunately we are not prepared."; + close; + } + + set .@party_id,getcharid(1); + set .@md_name$, "Bakonawa Lake"; + + set .@baku_time, checkquest(12278,PLAYTIME); + if (.@baku_time == -1) { + if (checkquest(12279) == -1) setquest 12279; + } + if (!.@party_id) { + mes "[Taho]"; + mes "Isn't there any company who can go with you? Or even if you wanna go alone, come after organizing a party."; + close; + } + if (.@baku_time == -1) { + if (getcharid(0) == getpartyleader(.@party_id,2)) { + mes "[Taho]"; + mes "Are you the leader of the Bakonawa slayers? The road is not well so we have to go down the cliff with a rope, is that OK?"; + next; + set .@i, select("Please weave a rope.:Now I will go down.:Cancel."); + } else { + mes "[Taho]"; + mes "You came for slaying Bakonawa. The leader of your party has to help me weaving the rope for going down."; + next; + set .@i, select(":Now I will go down.:Cancel."); + } + switch(.@i) { + case 1: + set .@instance,instance_create(.@md_name$,.@party_id); + if (.@instance < 0) { + mes "[Taho]"; + mes "Oh, the rope got dropped. I have to make a new one."; + close; + } + if (instance_attachmap("1@ma_b",.@instance) == "") { + mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!"; + instance_destroy(.@instance); + close; + } + instance_set_timeout 7200,300,.@instance; + instance_init(.@instance); + mes "[Taho]"; + mes "Now I'm weaving, so you can go down when I'm done."; + close; + case 2: + if( has_instance("1@ma_b") == "" ) { + mes "The memorial dungeon "+.@md_name$+" does not exist."; + mes "The party leader did not generate the dungeon yet."; + close; + } else { + mapannounce "ma_scene01","A party memeber, "+strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the dungeon, "+.@md_name$+".",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + setquest 12278; + warp "1@ma_b",64,51; + end; + } + case 3: + close; + } + } else if (.@baku_time == 0 || .@baku_time == 1) { + mes "[Taho]"; + mes "The rope used for getting to the Lake is already broken. We are now cleaning up the surroundings so come back after some time."; + close; + } else if (.@baku_time == 2) { + mes "[Taho]"; + mes "It's all cleaned up around here. Now you can go down again after getting a rope."; + erasequest 5; + close; + } +} + +sec_in02,26,26,4 script Bakonawa's Rage 541,{ + callfunc "F_GM_NPC"; + mes "[Taho]"; + mes "My name is Minky."; + if (callfunc("F_GM_NPC",1854,0) == 1) { + erasequest 12278; + erasequest 12279; + set malaya_bakona1,7; + set malaya_bakona2,15; + } + close; +} + +1@ma_b,62,52,4 script Taho#nf 541,{ + mes "[Taho]"; + mes "Heehee, I could join the Bakonawa hunt, but I'd rather hide behind that rock and cheer you guys on."; + next; + mes "[Taho]"; + mes "Bakonawa becomes invincible at some point. When that time comes, listen to my guides carefully. Just trust me and all will be good."; + next; + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + mes "[Taho]"; + mes "Now I will make Bakonawa spring out from the lake."; + next; + switch(select("Hold on! I'm not ready yet!:Let's do it!")) { + case 1: + mes "[Taho]"; + mes "Oh... alright... tell me when you are ready."; + close; + case 2: + mes "[Taho]"; + mes "Then I will drop a drop of Albopal to this lake."; + next; + mes "[Taho]"; + mes "Once Bakonawa tastes this, he will surface..."; + donpcevent instance_npcname("#Bakonawan1")+"::OnStart"; + disablenpc instance_npcname("Taho#nf"); + close; + } + } else { + mes "[Taho]"; + mes "I am dropping the Alpopal to make Bakonawa mad. Bakonawa can be a good source of protein once we get him."; + close; + } +} + +1@ma_b,36,111,4 script #Bakonawan1 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Bakonawan1"); + end; +OnStart: + enablenpc instance_npcname("#Bakonawan1"); + set .@map$, instance_mapname("1@ma_b"); + mapannounce .@map$,"Taho: I can see him there on the surface! ATTACK!!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + monster .@map$,78,81,"Bakonawa",2320,1,instance_npcname("#Bakonawan1")+"::OnMyMobDead"; //original: (78,83) + initnpctimer; + end; +OnFail: + killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan1")+"::OnMyMobDead"; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@ma_b"); + if (mobcount(.@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#BakonawaDeadn1")+"::OnStart"; + killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan1"); + } + end; +OnTimer1000: callsub OnAnnounce,"10 minutes"; +OnTimer60000: callsub OnAnnounce,"9 minutes"; +OnTimer120000: callsub OnAnnounce,"8 minutes"; +OnTimer180000: callsub OnAnnounce,"7 minutes"; +OnTimer240000: callsub OnAnnounce,"6 minutes"; +OnTimer300000: callsub OnAnnounce,"5 minutes"; +OnTimer360000: callsub OnAnnounce,"4 minutes"; +OnTimer420000: callsub OnAnnounce,"3 minutes"; +OnTimer480000: callsub OnAnnounce,"2 minutes"; +OnTimer540000: callsub OnAnnounce,"1 minute"; +OnTimer570000: + mapannounce instance_mapname("1@ma_b"),"Time Limit: 30 seconds",bc_map,"0xff4400"; //FW_NORMAL 18 0 0 + donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart"; + end; +OnTimer600000: + set .@map$, instance_mapname("1@ma_b"); + mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0 + donpcevent instance_npcname("Taho#Fail")+"::OnStart"; + donpcevent instance_npcname("#Bakonawan1")+"::OnFail"; + killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan1"); + end; +OnAnnounce: + mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL 15 0 0 + donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart"; + end; +} + +1@ma_b,78,81,0 script #SummonPuppetsn1 139,4,5,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#SummonPuppetsn1"); + end; +OnStart: + stopnpctimer; + enablenpc instance_npcname("#SummonPuppetsn1"); + initnpctimer; + end; +OnTouch: + stopnpctimer; + disablenpc instance_npcname("#SummonPuppetsn1"); + end; +OnTimer5000: + setarray .@x[0],79,71,60,61,57,89,95,96,99; + setarray .@y[0],71,72,80,90,99,73,82,90,99; + set .@map$, instance_mapname("1@ma_b"); + for(set .@i,0; .@i<9; set .@i,.@i+1) { + set .@rand, rand(1,10); + if (.@rand > 7) + monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2337,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead"; + else if (.@rand < 4) + monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2343,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead"; + } + end; +OnTimer50000: + killmonster instance_mapname("1@ma_b"),instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#SummonPuppetsn1"); + end; +OnMyMobDead: + end; +} + +1@ma_b,1,5,4 script #BakonawaDeadn1 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#BakonawaDeadn1"); + end; +OnStart: + enablenpc instance_npcname("#BakonawaDeadn1"); + initnpctimer; + end; +OnTimer100: + mapannounce instance_mapname("1@ma_b"),"Taho: Good! Bakonawa is hidden under water. He will now try to swallow the moon.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer5000: + mapannounce instance_mapname("1@ma_b"),"Taho: We must make loud noises with caldron and gong so he can never concentrate on the moon!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer10000: + mapannounce instance_mapname("1@ma_b"),"Taho: Do not engage on him even if he come above the surface. Just make loud noises!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer15000: + mapannounce instance_mapname("1@ma_b"),"Mission - Destroy 2 caldrons and 2 gongs on left and right sides of the lake.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0 + donpcevent instance_npcname("#Bakonawan2")+"::OnStart"; + stopnpctimer; + disablenpc instance_npcname("#BakonawaDeadn1"); + end; +} + +1@ma_b,36,111,4 script #Bakonawan2 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Bakonawan2"); + end; +OnStart: + enablenpc instance_npcname("#Bakonawan2"); + set .@label$, instance_npcname("#Bakonawan2")+"::OnMyMobDead"; + set .@map$, instance_mapname("1@ma_b"); + monster .@map$,95,98,"Caldron",2328,1,.@label$; + monster .@map$,60,98,"Caldron",2328,1,.@label$; + monster .@map$,97,104,"Gong",2328,1,.@label$; + monster .@map$,58,104,"Gong",2328,1,.@label$; + donpcevent instance_npcname("#Bakonawan2-1")+"::OnStart"; + initnpctimer; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@ma_b"); + set .@mob_dead_num, mobcount(.@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead"); + if (.@mob_dead_num < 1) { + donpcevent instance_npcname("#Bakonawan2-1")+"::OnEnd"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan2"); + } else + mapannounce .@map$,"Taho: Good! "+.@mob_dead_num+" left to go!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer1000: callsub OnAnnounce,"5 minutes",15,1; +OnTimer60000: callsub OnAnnounce,"4 minutes",15,1; +OnTimer120000: callsub OnAnnounce,"3 minutes",15,1; +OnTimer180000: callsub OnAnnounce,"2 minutes",15,1; +OnTimer240000: callsub OnAnnounce,"1 minute",15,1; +OnTimer270000: callsub OnAnnounce,"30 seconds",15,0; +OnTimer280000: callsub OnAnnounce,"20 seconds",15,0; +OnTimer290000: callsub OnAnnounce,"10 seconds",15,0; +OnTimer295000: callsub OnAnnounce,"5 seconds",16,0; +OnTimer296000: callsub OnAnnounce,"4 seconds",17,0; +OnTimer297000: callsub OnAnnounce,"3 seconds",18,0; +OnTimer298000: callsub OnAnnounce,"2 seconds",19,0; +OnTimer299000: callsub OnAnnounce,"1 second",20,0; +OnTimer300000: + set .@map$, instance_mapname("1@ma_b"); + mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0 + donpcevent instance_npcname("Taho#Fail")+"::OnStart"; + donpcevent instance_npcname("#Bakonawan2-1")+"::OnFail"; + killmonster .@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan2"); + end; +OnAnnounce: + mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0 + if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart"; + end; +} + +1@ma_b,36,111,4 script #Bakonawan2-1 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Bakonawan2-1"); + end; +OnStart: + enablenpc instance_npcname("#Bakonawan2-1"); + monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2321,1,instance_npcname("#Bakonawan2-1")+"::OnMyMobDead"; //original: (78,93) + end; +OnFail: + killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead"; + end; +OnEnd: + enablenpc instance_npcname("#Bakonawan2-1"); + killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead"; + initnpctimer; + end; +OnTimer1000: + mapannounce instance_mapname("1@ma_b"),"Taho: He is back into the lake again. Is it over?",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer5000: + mapannounce instance_mapname("1@ma_b"),"Taho: UHM! Something is moving up rapidly under the water! Ba... Bakonawa is coming!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + end; +OnTimer10000: + mapannounce instance_mapname("1@ma_b"),"Mission - Eliminate Bakonawa who became more fierce.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0 + donpcevent instance_npcname("#Bakonawan3")+"::OnStart"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan2-1"); + end; +OnMyMobDead: + end; +} + +1@ma_b,36,111,4 script #Bakonawan3 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Bakonawan3"); + end; +OnStart: + enablenpc instance_npcname("#Bakonawan3"); + initnpctimer; + monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2322,1,instance_npcname("#Bakonawan3")+"::OnMyMobDead"; //original: (78,83) + donpcevent instance_npcname("#Bakonawan3-1")+"::OnStart"; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@ma_b"); + set .@mob_dead_num, mobcount(.@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead"); + if (.@mob_dead_num < 1) { + mapannounce .@map$,"Taho: We got him! I can see he has threw up something that looks like a box.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + donpcevent instance_npcname("Taho#Completed")+"::OnStart"; + donpcevent instance_npcname("#Bakonawan3-1")+"::OnEnd"; + killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan3"); + } + end; +OnTimer1000: + callsub OnAnnounce,"10 minutes",15,1; + end; +OnTimer60000: +OnTimer120000: +OnTimer180000: +OnTimer240000: + donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart"; + end; +OnTimer300000: callsub OnAnnounce,"5 minutes",15,1; +OnTimer360000: callsub OnAnnounce,"4 minutes",15,1; +OnTimer420000: callsub OnAnnounce,"3 minutes",15,1; +OnTimer480000: callsub OnAnnounce,"2 minutes",15,1; +OnTimer540000: callsub OnAnnounce,"1 minute",15,1; +OnTimer570000: callsub OnAnnounce,"30 seconds",15,0; +OnTimer580000: callsub OnAnnounce,"20 seconds",15,0; +OnTimer590000: callsub OnAnnounce,"10 seconds",15,0; +OnTimer595000: callsub OnAnnounce,"5 seconds",16,0; +OnTimer596000: callsub OnAnnounce,"4 seconds",17,0; +OnTimer597000: callsub OnAnnounce,"3 seconds",18,0; +OnTimer598000: callsub OnAnnounce,"2 seconds",19,0; +OnTimer599000: callsub OnAnnounce,"1 second",20,0; +OnTimer600000: + set .@map$, instance_mapname("1@ma_b"); + mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0 + donpcevent instance_npcname("Taho#Fail")+"::OnStart"; + killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead"; + stopnpctimer; + disablenpc instance_npcname("#Bakonawan3"); + end; +OnAnnounce: + mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0 + if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart"; + end; +} + +1@ma_b,36,111,4 script #Bakonawan3-1 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Bakonawan3-1"); + end; +OnStart: + initnpctimer; + end; +OnEnd: + killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead"; + //showdigit 0; + stopnpctimer; + end; +OnMyMobDead: + showdigit mobcount(instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead"); + end; +OnTimer120000: callsub OnMobSpawn,10; +OnTimer180000: callsub OnMobSpawn,15; +OnTimer240000: callsub OnMobSpawn,20; +//OnTimer300000: callsub OnMobSpawn,25; +OnTimer300000: callsub OnMobSpawn,30; +OnTimer360000: callsub OnMobSpawn,35; +OnTimer420000: callsub OnMobSpawn,40; +OnTimer480000: callsub OnMobSpawn,45; +OnTimer540000: callsub OnMobSpawn,50; +OnTimer600000: + killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead"; + stopnpctimer; + end; +OnMobSpawn: + set .@label$, instance_npcname("#Bakonawan3-1")+"::OnMyMobDead"; + set .@map$, instance_mapname("1@ma_b"); + killmonster .@map$,.@label$; + set .@mob_dead_num, mobcount(.@map$,.@label$); + if (.@mob_dead_num < 50) { + set .@mob_rg, 50 - .@mob_dead_num; + if (.@mob_rg > getarg(0)) + set .@mob_rg, getarg(0); + while(1) { + areamonster .@map$,74,74,82,74,"Bakonawa's Puppet",2334,1,.@label$; + set .@mob_dead_num, mobcount(.@map$,.@label$); + if (.@mob_dead_num >= .@mob_rg) { + break; + } + } + } + end; +} + +1@ma_b,62,52,4 script Taho#Completed 541,{ + disable_items; + if (checkweight(1201,1) == 0) { + mes "It seems you are carrying too many different kinds of items. Please try again after reducing it."; + close; + } + if (MaxWeight - Weight < 10000) { + mes "It seems you are already carrying items of too much weight. Please try again after reducing the weight."; + close; + } + if (checkquest(12279,HUNTING) == 2) { + erasequest 12279; + mes "[Taho]"; + mes "This was found from Bakonawa's corpse. It would be better if you take this."; +// if (IsPremiumPcCafe == 10) + getitem 6499,7; //Ancient_Grudge +// else +// getitem 6499,5; //Ancient_Grudge + getexp 0,100000; + next; + } + mes "[Taho]"; + mes "We better hurry and get out of this place. This place is still dangerous even without Bakonawa..."; + next; + mes "[Taho]"; + mes "Then let's use to the rope to go up!"; + close2; + warp "ma_scene01",175,176; + end; +OnInstanceInit: + disablenpc instance_npcname("Taho#Completed"); + end; +OnStart: + enablenpc instance_npcname("Taho#Completed"); + initnpctimer; + end; +OnTimer1000: + monster instance_mapname("1@ma_b"),78,74,"Bakonawa Treasure Box",2335,1; + end; +OnTimer10000: + mapannounce instance_mapname("1@ma_b"),"Taho: After opening the treasure box, please visit me at the top of the hill. I've got something to give to you.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0 + stopnpctimer; + end; +} + +1@ma_b,62,52,4 script Taho#Fail 541,{ + mes "[Taho]"; + mes "HMM. We almost got him but he is one fast creature..."; + next; + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + mes "[Taho]"; + mes "Are we going to try again?"; + next; + switch(select("Hold on a sec!:Of couse! We cannot stand back now!")) { + case 1: + mes "[Taho]"; + mes "AWW... I almost brought him out."; + close; + case 2: + mes "[Taho]"; + mes "Then I will use Albopal once again to the lake."; + next; + mes "[Taho]"; + mes "We are about to see Bakonawa with intenser anger..."; + disablenpc instance_npcname("Taho#Fail"); + donpcevent instance_npcname("#Bakonawan1")+"::OnStart"; + close; + } + close; + } else { + mes "[Taho]"; + mes "I am dropping Albopal like I did a while ago. I hope it pisses him off..."; + close; + } + +OnInstanceInit: + disablenpc instance_npcname("Taho#Fail"); + end; +OnStart: + enablenpc instance_npcname("Taho#Fail"); + end; +} diff --git a/npc/re/instances/BangungotHospital.txt b/npc/re/instances/BangungotHospital.txt new file mode 100644 index 000000000..18d70e02d --- /dev/null +++ b/npc/re/instances/BangungotHospital.txt @@ -0,0 +1,1101 @@ +//===== Hercules Script ====================================== +//= Bangungot Hospital 2F +//===== By: ================================================== +//= Euphy +//===== Current Version: ===================================== +//= 1.1 +//===== Description: ========================================= +//= [Official Conversion] +//= Save the hospital in Port Malaya from Bangungot. +//= Part of the "Nurse in Port Malaya" quest. +//===== Additional Comments: ================================= +//= 1.0 First version. [Euphy] +//= 1.1 Added GM management function. [Euphy] +//============================================================ + +1@ma_h mapflag src4instance +//============================================================ + +// Instance Creation +//============================================================ +ma_dun01,147,10,5 script Nurse#ma_dun01 569,{ + if (BaseLevel < 100) end; + + set .@party_id,getcharid(1); + cutin "malaya_nurseB",2; + if (checkquest(9223) == -1) { + set .@quest, checkquest(9222); + if (.@quest == -1) { + if (!.@party_id) { + if (malaya_bang == 30) + callsub L_Closed,1; + else if (malaya_bang == 31) + callsub L_Closed,0; + else + goto L_NoParty; + } + if (checkquest(11309,HUNTING) < 2) { + set .@playtime, checkquest(9224,PLAYTIME); + if (.@playtime == -1) { + if (malaya_bang == 30) + callsub L_Closed,1; + else if (malaya_bang == 31) + callsub L_Closed,0; + else if (malaya_bang > 39) + callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,0,0; + else { + mes "[Nurse Maenne]"; + mes ".........."; + close2; + cutin "",255; + end; + } + } else if (.@playtime == 0 || .@playtime == 1) { + if (checkquest(11309) == -1) { + mes "[Nurse Maenne]"; + mes "This is a fatal situation."; + close2; + cutin "",255; + end; + } else { + mes "[Nurse Maenne]"; + mes "Now the entrance"; + mes "to the second floor"; + mes "is closed."; + next; + mes "[Nurse Maenne]"; + mes "To go up to"; + mes "the second floor again,"; + mes "open the gate"; + mes "after a lapse of time."; + close2; + cutin "",255; + end; + } + } else { + set .@quest2, checkquest(11309); + if (.@quest2 == -1) { + callsub L_Closed,0; + } else if (.@quest2 == 0 || .@quest2 == 1) { + callsub L_Complete; + completequest 9224; + erasequest 9224; + close2; + cutin "",255; + end; + } else { + //if (!.@party_id) goto L_NoParty; //unneeded + if (malaya_bang > 39) + callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1; + else { + mes "[Nurse Maenne]"; + mes "......."; + close2; + cutin "",255; + end; + } + } + } + } else { + mes "[Nurse Maenne]"; + mes "You got rid of Bangungot!"; //? + mes "The nurse might be waiting for you"; + mes "in front of the hospital!"; + close2; + cutin "",255; + end; + } + } else if (.@quest == 0 || .@quest == 1) { + if (!.@party_id) goto L_NoParty; + if (malaya_bang > 39) { + set .@hunting, checkquest(9222,HUNTING); + if (.@hunting == 0 || .@hunting == 1) { + set .@playtime, checkquest(9224,PLAYTIME); + if (.@playtime == 0 || .@playtime == 1) { + mes "[Nurse Maenne]"; + mes "Do you want go up to the second floor again?"; + next; + callsub L_Enter,0,0; + } else if (.@playtime == 2) { + //if (!.@party_id) goto L_NoParty; //unneeded + if (malaya_bang > 39) + callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1; + else { + mes "[Nurse Maenne]"; + mes "......."; + close2; + cutin "",255; + end; + } + } else { + mes "[Nurse Maenne]"; + mes "This is a fatal situation."; + mes "You can't go up to the 2nd floor."; + close2; + cutin "",255; + end; + } + } else { + if (checkweight(607,1) == 0) { + mes "[Nurse Maenne]"; + mes "You have too much stuff."; + mes "Please reduce your stuff and"; + mes "come to me again."; + close2; + cutin "",255; + end; + } + if (checkweight(607,11) == 0) { + mes "[Nurse Maenne]"; + mes "It's too heavy."; + mes "Please reduce the weight and"; + mes "come to me again."; + close2; + cutin "",255; + end; + } + callsub L_Complete; + completequest 9222; + erasequest 9222; + completequest 9224; + erasequest 9224; + setquest 9223; + getexp 500000,0; +// if (IsPremiumPcCafe == 10) + getitem 6499,7; //Ancient_Grudge +// else +// getitem 6499,5; //Ancient_Grudge + close2; + cutin "",255; + end; + } + } else { + mes "[Nurse Maenne]"; + mes ".....?"; + mes "Now you can't go up"; + mes "to the 2nd floor."; + close2; + cutin "",255; + end; + } + } else { + callsub L_Complete; + completequest 9222; + erasequest 9222; + completequest 9224; + erasequest 9224; + setquest 9223; + close2; + cutin "",255; + end; + } + } else { + if (checkquest(9223,PLAYTIME) == 0 || checkquest(9223,PLAYTIME) == 1) { + callsub L_Complete; + close2; + cutin "",255; + end; + } else { + if (!.@party_id) goto L_NoParty; + if (malaya_bang > 39) + callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1; + else { + mes "[Nurse Maenne]"; + mes "......."; + close2; + cutin "",255; + end; + } + } + } + +L_Closed: + mes "[Nurse Maenne]"; + mes "- The door is closed to 1st floor"; + mes "When this Nurse came in?"; + mes "I call her behind, but"; + mes "she doesn't respond. -"; + if (getarg(0)) { + set malaya_bang,31; + changequest 11302,11303; + } + close2; + cutin "",255; + end; + +L_NoParty: + mes "- I guess..."; + mes "I can't talk him alone."; + mes "After registering a party"; + mes "let me try to say something. -"; + close2; + cutin "",255; + end; + +L_Enter: + set .@md_name$,"Bangungot Hospital 2F"; + if (getarg(2) == 0) { + mes "[Nurse Maenne]"; + mes "I already heard that story so"; + mes "I pretty much know that."; + mes "What are you going to do?"; + mes "Do you want to go up"; + mes "to the second floor?"; + } else { + mes "[Nurse Maenne]"; + mes "You are back..."; + mes "There is bad news."; + mes "I heard that"; + mes "the Bangungot has"; + mes "appeared again."; + next; + mes "[Nurse Maenne]"; + mes strcharinfo(0) + "'s help"; + mes "is needed again."; + mes "Please, could you give me"; + mes "one more chance?"; + } + next; + switch(select(((getarg(0))?"Prepare to enter the second floor.":"")+":Enter the second floor.:Do not enter.")) { + case 1: + set .@instance, instance_create(.@md_name$,getcharid(1)); + if (.@instance < 0) { + mes "[Nurse Maenne]"; + mes "A critical situation has happened."; + mes "You can't go up to the 2nd floor."; + close2; + cutin "",255; + end; + } + if (instance_attachmap("1@ma_h",.@instance) == "") { + mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!"; + instance_destroy(.@instance); + close; + } + instance_set_timeout 3600,300,.@instance; + instance_init(.@instance); + mes "[Nurse Maenne]"; + mes "We are preparing to go up"; + mes "to the second floor."; + mes "At the second floor"; + mes "there is a chaotic rumor that"; + mes "the dead do not die."; + mes "Please refer to this story."; + next; + mes "[Nurse Maenne]"; + mes "When you finish everything,"; + mes "please talk to me again."; + mes "I really appreciate it."; + close2; + cutin "",255; + end; + case 2: + if( has_instance("1@ma_h") == "" ) { + mes "The memorial dungeon "+.@md_name$+" does not exist."; + mes "The party leader did not generate the dungeon yet."; + close; + } else { + mapannounce "ma_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member entered "+.@md_name$+".",bc_map,"0x00ff99"; + if (getarg(1)) { + if (checkquest(9223) > -1) { + completequest 9223; + erasequest 9223; + } + if (checkquest(9222) > -1) + erasequest 9222; + if (checkquest(9224) > -1) + erasequest 9224; + setquest 9222; + } + setquest 9224; + cutin "",255; + warp "1@ma_h",40,157; + end; + } + case 3: + mes "[Nurse Maenne]"; + mes "Alright."; + mes "If you change mind, come back again."; + close2; + cutin "",255; + end; + } + +L_Complete: + mes "[Nurse Maenne]"; + mes "You returned safely from the Bangungot on the second floor!!"; + mes "However, it's not"; + mes "really over yet."; + next; + mes "[Nurse Maenne]"; + mes "I'm pretty sure it"; + mes "never disappears easily."; + mes "I don't know what will happen"; + mes "about Bangungot, so"; + mes "after a lapse of time"; + mes "please return to me."; + return; +} + +sec_in02,27,30,0 script Bangungot Gate 406,{ + callfunc "F_GM_NPC"; + mes "Password"; + next; + if (callfunc("F_GM_NPC","1854",1) == 0) { + mes "Good Luck."; + close; + } + switch(select("Receive 9222:Receive 9223:Erase 9222:Erase 9223:Receive 9224:Erase 9224:Receive malaya_bang 30:Receive malaya_bang 40:Receive 11309:Erase 11309:Cancel")) { + case 1: setquest 9222; close; + case 2: setquest 9223; close; + case 3: erasequest 9222; close; + case 4: erasequest 9223; close; + case 5: setquest 9224; close; + case 6: erasequest 9224; close; + case 7: set malaya_bang,30; close; + case 8: set malaya_bang,40; close; + case 9: setquest 11309; close; + case 10: completequest 11309; close; + case 11: close; + } +} + +// Instance Scripts +//============================================================ +1@ma_h,43,157,0 script #Memorial Start 139,2,2,{ + end; +OnTouch: + set .@map$, instance_mapname("1@ma_h"); + mapannounce .@map$,"Bangungot: You silly "+strcharinfo(0)+" ....",bc_map,"0xFF82FF"; + mapannounce .@map$,"Bangungot: Get out before you die...",bc_map,"0xFF82FF"; + areamonster .@map$,44,156,46,158,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Memorial Start")+"::OnMyMobDead"; + donpcevent instance_npcname("#Memorial Start_time")+"::OnEnable"; + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + set .@map$, instance_mapname("1@ma_h"); + if (mobcount(.@map$,instance_npcname("#Memorial Start")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#Ward1 Entry")+"::OnEnable1"; + donpcevent instance_npcname("#Memorial Start_time")+"::OnDisable"; + mapannounce .@map$,"Bangungot: This is where your NIGHTMARE starts...",bc_map,"0xFF82FF"; + disablenpc instance_npcname("#Memorial Start"); + } + stopnpctimer; + end; +} + +1@ma_h,43,157,0 script #Memorial Start_time 139,{ //2,2 + end; +OnInstanceInit: + disablenpc instance_npcname("#Memorial Start_time"); + end; +OnEnable: + specialeffect EF_BAT2,AREA,instance_npcname("#Memorial Start"); + initnpctimer; + end; +OnDisable: + stopnpctimer; + end; +OnTimer5000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You cannot help.... you can't defeat me.",bc_map,"0xFF82FF"; + end; +OnTimer10000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: HAHAHAHAHAHAHAHA!!!!",bc_map,"0xFF82FF"; + stopnpctimer; + end; +} + +1@ma_h,46,165,0 script #Ward1 Entry 139,{ //3,3 + end; +OnInstanceInit: + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnEnable1: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; + enablenpc instance_npcname(strnpcinfo(0)); + specialeffect EF_BAT2; + switch(atoi(charat(strnpcinfo(2),4))) { + case 1: + areamonster .@map$,49,171,51,173,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,51,171,53,173,"Bangungot's Mangkukulam",2339,1,.@label$; + end; + case 2: + areamonster .@map$,49,137,51,139,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,51,137,53,139,"Bangungot's Mangkukulam",2339,1,.@label$; + end; + case 3: + areamonster .@map$,69,171,71,173,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,71,171,73,173,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,73,171,75,173,"Bangungot's Mangkukulam",2339,1,.@label$; + end; + case 4: + areamonster .@map$,71,139,73,141,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,73,139,75,141,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,75,139,77,141,"Bangungot's Mangkukulam",2339,1,.@label$; + end; + case 5: + areamonster .@map$,93,173,95,175,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,95,173,97,175,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,97,173,99,175,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,93,175,95,177,"Bangungot's Mangkukulam",2339,1,.@label$; + end; + } +/* +// Not called in official scripts. +OnEnable2: + areamonster instance_mapname("1@ma_h"),140,38,142,40,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Ward1 Entry")+"::OnMyMobDead"; + end; +*/ +OnEnable3: + set .@i, atoi(charat(strnpcinfo(2),4))+1; + donpcevent instance_npcname("#Ward"+.@i+" Entry")+"::OnEnable1"; + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + set .@map$, instance_mapname("1@ma_h"); + if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) { + specialeffect EF_BAT2; + donpcevent instance_npcname(strnpcinfo(0))+"::OnEnable3"; + switch(atoi(charat(strnpcinfo(2),4))) { + case 1: set .@str$,"Bangungot: I will let you see the pain and the agony actually be real....."; break; + case 2: set .@str$,"Bangungot: Diseased spirits are the source of my energy, and my life..."; break; + case 3: set .@str$,"Bangungot: Scream more....and more...... your pain..."; break; + case 4: set .@str$,"Bangungot: Deeply and more deeply in pain..."; break; + case 5: set .@str$,"Bangungot: Be horrified...be petrified."; break; + } + mapannounce .@map$,.@str$,bc_map,"0xFF82FF"; + } + stopnpctimer; + end; +} +1@ma_h,57,147,0 duplicate(#Ward1 Entry) #Ward2 Entry 139 //3,3 +1@ma_h,67,165,0 duplicate(#Ward1 Entry) #Ward3 Entry 139 //3,3 +1@ma_h,79,147,0 duplicate(#Ward1 Entry) #Ward4 Entry 139 //3,3 +1@ma_h,90,165,0 duplicate(#Ward1 Entry) #Ward5 Entry 139 //3,3 + +1@ma_h,101,147,0 script #Ward6 Entry 139,{ //2,2 + end; +OnInstanceInit: + disablenpc instance_npcname("#Ward6 Entry"); + end; +OnEnable1: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Ward6 Entry")+"::OnMyMobDead"; + enablenpc instance_npcname("#Ward6 Entry"); + specialeffect EF_BAT2; + areamonster .@map$,93,137,95,139,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,95,137,97,139,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,97,137,99,139,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,93,139,95,141,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,95,139,97,141,"Bangungot's Manananggal",2338,1,.@label$; + end; +/* +// Not called in official scripts. +OnEnable2: + areamonster instance_mapname("1@ma_h"),140,38,142,40,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Ward6 Entry")+"::OnMyMobDead"; + end; +*/ +OnMyMobDead: + initnpctimer; + end; +OnTimer3000: + set .@map$, instance_mapname("1@ma_h"); + if (mobcount(.@map$,instance_npcname("#Ward6 Entry")+"::OnMyMobDead") < 1) { + specialeffect EF_BAT2; + donpcevent instance_npcname("#Summon Boss")+"::OnEnable"; + mapannounce .@map$,"Bangungot: You had the choice to enter here, but you have no choice to get out as you want...",bc_map,"0xFF82FF"; + } + stopnpctimer; + end; +} + +1@ma_h,110,177,0 script #Summon Boss 139,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Summon Boss"); + end; +OnEnable: + enablenpc instance_npcname("#Summon Boss"); + monster instance_mapname("1@ma_h"),143,158,"Bangungot",2317,1,instance_npcname("#Summon Boss")+"::OnMyMobDead"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnEnable"; + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + if (mobcount(instance_mapname("1@ma_h"),instance_npcname("#Summon Boss")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#Summon Pillar")+"::OnEnable1"; + mapannounce instance_mapname("1@ma_h"),"Bangungot: I....cannot.....finish...like.......this.",bc_map,"0xFF82FF"; + disablenpc instance_npcname("#Summon Boss"); + } + stopnpctimer; + end; +} + +1@ma_h,147,143,0 script #Boss Room Entry 139,10,10,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Boss Room Entry"); + end; +OnTouch: + specialeffect EF_GHOST; + donpcevent instance_npcname("#Boss Room Entry")+"::OnDisableEntry"; + donpcevent instance_npcname("#Boss Room Entry_time")+"::OnEnable"; + end; +OnEnable: + enablenpc instance_npcname("#Boss Room Entry"); + enablenpc instance_npcname("#Boss Room Door"); + enablenpc instance_npcname("#Boss Room Door1"); + end; +OnSpawn: + areamonster instance_mapname("1@ma_h"),123,152,137,166,"Bangungot's Manananggal",2338,1,instance_npcname("#Boss Room Entry")+"::OnMyMobDead"; + end; +OnReset: + killmonster instance_mapname("1@ma_h"),instance_npcname("#Boss Room Entry")+"::OnMyMobDead"; + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + set .@map$, instance_mapname("1@ma_h"); + if (mobcount(.@map$,instance_npcname("#Boss Room Entry")+"::OnMyMobDead") < 1) + mapannounce .@map$,"Bangungot: HAHAHAH... That's not enough, I will be even stronger....",bc_map,"0xFF82FF"; + stopnpctimer; + end; + +// Unofficial labels (to avoid duplicating code). +OnEnableEntry: + enablenpc instance_npcname("#Boss Room Entry"); + enablenpc instance_npcname("#Boss Room Entry_a"); + enablenpc instance_npcname("#Boss Room Entry_b"); + enablenpc instance_npcname("#Boss Room Entry_c"); + enablenpc instance_npcname("#Boss Room Entry_d"); + enablenpc instance_npcname("#Boss Room Entry_e"); + enablenpc instance_npcname("#Boss Room Entry_f"); + enablenpc instance_npcname("#Boss Room Entry_g"); + enablenpc instance_npcname("#Boss Room Entry_h"); + end; +OnDisableEntry: + disablenpc instance_npcname("#Boss Room Entry"); + disablenpc instance_npcname("#Boss Room Entry_a"); + disablenpc instance_npcname("#Boss Room Entry_b"); + disablenpc instance_npcname("#Boss Room Entry_c"); + disablenpc instance_npcname("#Boss Room Entry_d"); + disablenpc instance_npcname("#Boss Room Entry_e"); + disablenpc instance_npcname("#Boss Room Entry_f"); + disablenpc instance_npcname("#Boss Room Entry_g"); + disablenpc instance_npcname("#Boss Room Entry_h"); + end; +} + +1@ma_h,147,143,0 script #Boss Room Entry_time 139,{ //10,10 + end; +OnInstanceInit: + disablenpc instance_npcname("#Boss Room Entry_time"); + end; +OnEnable: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You poor little things. I will invite you to the world of infectious disease...",bc_map,"0xFF82FF"; + initnpctimer; + end; +OnTimer25000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You will know what it is...",bc_map,"0xFF82FF"; + for(set .@i,10; .@i<=22; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer35000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: Real pain! You will know!!",bc_map,"0xFF82FF"; + for(set .@i,25; .@i<=33; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer45000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: Have you ever heard the patients screaming?",bc_map,"0xFF82FF"; + end; +OnTimer55000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: If you haven't, I will let you!!",bc_map,"0xFF82FF"; + enablenpc instance_npcname("#Summon Ward Mob"); + donpcevent instance_npcname("#Summon Ward Mob")+"::OnEnable7"; + end; +OnTimer60000: + for(set .@i,1; .@i<=8; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + for(set .@i,34; .@i<=38; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer60500: + for(set .@i,41; .@i<=49; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer90000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: Delight coming from agony is my nutrient.",bc_map,"0xFF82FF"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn"; + end; +OnTimer110000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: Remain here, cursed disease.....",bc_map,"0xFF82FF"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn"; + end; +OnTimer125000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You wanna hang out with me ......?",bc_map,"0xFF82FF"; + end; +OnTimer128000: + for(set .@i,1; .@i<=8; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + for(set .@i,34; .@i<=38; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer128500: + for(set .@i,41; .@i<=49; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer129000: + donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry"; + end; +OnTimer129500: + donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn"; + for(set .@i,10; .@i<=22; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer130000: + for(set .@i,25; .@i<=33; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + stopnpctimer; + end; +OnStopTimer: + stopnpctimer; + end; +} + +1@ma_h,111,177,0 script #Boss Room Entry_2 45,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Boss Room Entry_2"); + end; +OnEnable: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You are pretty powerful...",bc_map,"0xFF82FF"; + initnpctimer; + end; +OnTimer3000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: But can you...",bc_map,"0xFF82FF"; + end; +OnTimer6000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: ...defeat me again...?",bc_map,"0xFF82FF"; + end; +OnTimer9000: + for(set .@i,1; .@i<=8; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + for(set .@i,34; .@i<=38; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer9500: + for(set .@i,41; .@i<=49; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer10000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: You stupid persoon....",bc_map,"0xFF82FF"; + for(set .@i,10; .@i<=22; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + end; +OnTimer10500: + for(set .@i,25; .@i<=33; set .@i,.@i+1) + enablenpc instance_npcname("#Patternwarp"+.@i); + stopnpctimer; + end; +} + +1@ma_h,118,63,0 script #Summon Ward Mob 139,4,4,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Summon Ward Mob"); + end; +OnTouch: + donpcevent instance_npcname("#Summon Ward Mob_time")+"::OnEnable"; + specialeffect EF_CURSEATTACK; + end; +OnEnable1: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,47,77,49,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,49,77,51,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,51,77,53,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,47,79,49,81,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,49,79,51,81,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,47,81,49,83,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,49,81,51,83,"Bangungot's Tiyanak",2339,1,.@label$; + end; +OnEnable2: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,51,45,53,47,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,53,45,55,47,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,49,47,51,49,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,53,47,55,49,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,49,49,51,51,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,51,49,53,51,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,53,49,55,51,"Bangungot's Tiyanak",2340,1,.@label$; + end; +OnEnable3: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,69,75,71,77,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,71,75,73,77,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,73,75,75,77,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,69,77,71,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,71,77,73,79,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,69,79,71,81,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,71,79,73,81,"Bangungot's Tiyanak",2339,1,.@label$; + end; +OnEnable4: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,73,45,75,47,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,75,45,77,47,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,71,47,73,49,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,75,47,77,49,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,71,49,73,51,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,73,49,75,51,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,75,49,77,51,"Bangungot's Tiyanak",2340,1,.@label$; + end; +OnEnable5: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,93,77,95,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,95,77,97,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,97,77,99,79,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,93,79,95,81,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,95,79,97,81,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,93,81,95,83,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,95,81,97,83,"Bangungot's Tiyanak",2339,1,.@label$; + end; +OnEnable6: + set .@map$, instance_mapname("1@ma_h"); + set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + areamonster .@map$,93,43,95,45,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,95,43,97,45,"Bangungot's Tiyanak",2339,1,.@label$; + areamonster .@map$,91,45,93,47,"Bangungot's Mangkukulam",2339,1,.@label$; + areamonster .@map$,95,45,97,47,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,91,47,93,49,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,93,47,95,49,"Bangungot's Tiyanak",2340,1,.@label$; + areamonster .@map$,95,47,97,49,"Bangungot's Tiyanak",2340,1,.@label$; + end; +OnEnable7: + killmonster instance_mapname("1@ma_h"),instance_npcname("#Summon Ward Mob")+"::OnMyMobDead"; + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + if (mobcount(instance_mapname("1@ma_h"),instance_npcname("#Summon Ward Mob")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#Boss Room Entry_2")+"::OnEnable"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry"; + donpcevent instance_npcname("#Boss Room Entry_time")+"::OnStopTimer"; + } + stopnpctimer; + end; +} + +1@ma_h,118,64,0 script #Summon Ward Mob_time 139,{ //4,4 + end; +OnInstanceInit: + disablenpc instance_npcname("#Summon Ward Mob_time"); + end; +OnEnable: + initnpctimer; + disablenpc instance_npcname("#Summon Ward Mob"); + end; +OnTimer2000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: My spirit will be with your cursed body...",bc_map,"0xFF82FF"; + end; +OnTimer4000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: My inferiors...!! Go!! Go torment the patients in the wards!!",bc_map,"0xFF82FF"; + end; +OnTimer6000: + mapannounce instance_mapname("1@ma_h"),"- Bangungot's inferiors are bothering patients!! If you don't slay them all, Bangungot will be stronger. -",bc_map,"0xFF8200"; + end; +OnTimer10000: + setarray .@npc$[1], + "Moaning Patient","Screaming Patient","Patient in Pain","Passed Out Patient","Patient with Nightmare","Sick Looking Patient", + "Horrified Patient","Patient in Sorrow","Suffering Patient","Wriggling Patient","Patient in Cold Sweat","Howling Patient"; + enablenpc instance_npcname("#Summon Ward Mob"); + set .@rand, rand(1,6); + donpcevent instance_npcname("#Summon Ward Mob")+"::OnEnable"+.@rand; + set .@id, (.@rand*2)-rand(2); + donpcevent instance_npcname(.@npc$[.@id]+"#"+.@id)+"::OnEnable"; + stopnpctimer; + end; +} + +1@ma_h,112,177,0 script #Summon Pillar 139,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Summon Pillar"); + end; +OnEnable1: + enablenpc instance_npcname("#Summon Pillar"); + donpcevent instance_npcname("#Boss Room Entry_time")+"::OnStopTimer"; + donpcevent instance_npcname("#Summon Pillar_time")+"::OnEnable"; + monster instance_mapname("1@ma_h"),131,157,"Pillar of Spirit",2327,1,instance_npcname("#Summon Pillar")+"::OnMyMobDead"; + end; +OnEnable3: + enablenpc instance_npcname("#Boss Room Exit"); + disablenpc instance_npcname("#Summon Pillar"); + end; +OnReset: + killmonster instance_mapname("1@ma_h"),instance_npcname("#Summon Pillar")+"::OnMyMobDead"; + end; +OnMyMobDead: + initnpctimer; + end; +OnTimer1000: + set .@map$, instance_mapname("1@ma_h"); + if (mobcount(.@map$,instance_npcname("#Summon Pillar")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#Summon Pillar_time")+"::OnStopTimer"; + donpcevent instance_npcname("#Summon Pillar")+"::OnEnable3"; + donpcevent instance_npcname("#Boss Room Entry")+"::OnReset"; + mapannounce .@map$,"Bangungot: Oh....cannot believe that I lost...",bc_map,"0xFF4500"; + mapannounce .@map$,"Bangungot: But don't think this is the end!!",bc_map,"0xFF4500"; + mapannounce .@map$,"Bangungot: I WILL BE BACK!!!!!",bc_map,"0xFF4500"; + } + stopnpctimer; + end; +} + +1@ma_h,112,178,0 script #Summon Pillar_time 139,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Summon Pillar_time"); + end; +OnEnable: + initnpctimer; + end; +OnStopTimer: + stopnpctimer; + end; +OnTimer1000: + mapannounce instance_mapname("1@ma_h"),"- Bangungot's Pillar of Spirit is curing Bangungot. If you don't hunt it now, he will fully recover!! -",bc_map,"0xFF8200"; + specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45"); + end; +OnTimer7000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: I never die!!!!",bc_map,"0xFF82FF"; + specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45"); + end; +OnTimer14000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: If you dare, kill me!! I will revive soon!!!",bc_map,"0xFF82FF"; + specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45"); + end; +OnTimer21000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: I cannot die this way...!!!!",bc_map,"0xFF82FF"; + specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45"); + end; +OnTimer30000: + donpcevent instance_npcname("#Summon Pillar")+"::OnReset"; + end; +OnTimer31000: + mapannounce instance_mapname("1@ma_h"),"Bangungot: Hahahahaha!! I'm back with the power from the pillar of spirit!!!",bc_map,"0xFF82FF"; + donpcevent instance_npcname("#Summon Pillar")+"::OnReset"; + end; +OnTimer36000: + donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry"; + donpcevent instance_npcname("#Summon Boss")+"::OnEnable"; + stopnpctimer; + end; +} + +1@ma_h,118,171,0 script #Boss Room Entry_a 139,10,10,{ + end; +OnInstanceInit: + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnTouch: + specialeffect EF_GHOST; + donpcevent instance_npcname("#Boss Room Entry")+"::OnDisableEntry"; + donpcevent instance_npcname("#Boss Room Entry_time")+"::OnEnable"; + end; +} +1@ma_h,132,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_b 139,10,10 +1@ma_h,147,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_c 139,10,10 +1@ma_h,118,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_d 139,10,10 +1@ma_h,132,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_e 139,10,10 +1@ma_h,147,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_f 139,10,10 +1@ma_h,118,143,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_g 139,10,10 +1@ma_h,132,143,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_h 139,10,10 + +1@ma_h,131,62,0 script #Boss Effect 139,{ //4,4 + end; +OnInstanceInit: + disablenpc instance_npcname("#Boss Effect"); + initnpctimer; + end; +OnTimer3000: + specialeffect EF_BARRIER; + stopnpctimer; + initnpctimer; + end; +} + +1@ma_h,43,86,4 script Moaning Patient#1 584,{ + end; +OnInstanceInit: + monster instance_mapname("1@ma_h"),131,62,"Bangungot",2318,1; + end; +OnEnable: + mapannounce instance_mapname("1@ma_h"),"Moaning Patient: aaawwww....",bc_map,"0xFF0000"; + initnpctimer; + end; +OnTimer5000: +OnTimer8000: +OnTimer11000: +OnTimer14000: +OnTimer17000: +OnTimer20000: +OnTimer23000: +OnTimer26000: + specialeffect EF_POTION_BERSERK; + specialeffect EF_CURSEATTACK; + end; +OnTimer30000: + specialeffect EF_POTION_BERSERK; + specialeffect EF_CURSEATTACK; + stopnpctimer; + end; +} + +1@ma_h,60,87,4 script Screaming Patient#2 585,{ + end; +OnEnable: + switch(atoi(strnpcinfo(2))) { + case 2: set .@str$,"Screaming Patient: Aaaaargh!!"; break; + case 3: set .@str$,"Patient in Pain: Oooooowwww!! It's killing me!!!"; break; + case 4: set .@str$,"Passed Out Patient: ........"; break; + case 5: set .@str$,"Patient with Nightmare: Help~!!! Save me!!!"; break; + case 6: set .@str$,"Sick Looking Patient: Hu..a...aaah.."; break; + case 7: set .@str$,"Horrified Patient: Get away!! Please...."; break; + case 8: set .@str$,"Patient in Sorrow: crying and crying......"; break; + case 9: set .@str$,"Suffering Patient: Stop... please..."; break; + case 10: set .@str$,"Wriggling Patient: awwww..."; break; + case 11: set .@str$,"Patient in Cold Sweat: Help.....help...."; break; + case 12: set .@str$,"Howling Patient: aaaaahhhhhhhhhh!!"; break; + } + mapannounce instance_mapname("1@ma_h"),.@str$,bc_map,"0xFF0000"; + initnpctimer; + end; +OnTimer5000: +OnTimer8000: +OnTimer11000: +OnTimer14000: +OnTimer17000: +OnTimer20000: +OnTimer23000: +OnTimer26000: + specialeffect EF_POTION_BERSERK; + specialeffect EF_CURSEATTACK; + end; +OnTimer30000: + specialeffect EF_POTION_BERSERK; + specialeffect EF_CURSEATTACK; + stopnpctimer; + end; +} +1@ma_h,60,39,7 duplicate(Screaming Patient#2) Patient in Pain#3 584 +1@ma_h,43,39,7 duplicate(Screaming Patient#2) Passed Out Patient#4 585 +1@ma_h,77,86,4 duplicate(Screaming Patient#2) Patient with Nightmare#5 584 +1@ma_h,69,87,4 duplicate(Screaming Patient#2) Sick Looking Patient#6 585 +1@ma_h,73,39,7 duplicate(Screaming Patient#2) Horrified Patient#7 584 +1@ma_h,65,51,7 duplicate(Screaming Patient#2) Patient in Sorrow#8 585 +1@ma_h,87,86,4 duplicate(Screaming Patient#2) Suffering Patient#9 584 +1@ma_h,104,86,4 duplicate(Screaming Patient#2) Wriggling Patient#10 585 +1@ma_h,99,39,7 duplicate(Screaming Patient#2) Patient in Cold Sweat#11 584 +1@ma_h,87,39,7 duplicate(Screaming Patient#2) Howling Patient#12 585 + +1@ma_h,43,181,4 script Moaning Patient#b 584,{ end; } +1@ma_h,60,182,4 script Screaming Patient#b 585,{ end; } +1@ma_h,60,132,7 script Patient in Pain#b 584,{ end; } +1@ma_h,43,132,7 script Passed Out Patient#b 585,{ end; } +1@ma_h,77,182,4 script Patient with Nightmare#b 584,{ end; } +1@ma_h,69,182,4 script Sick Looking Patient#b 585,{ end; } +1@ma_h,73,132,7 script Horrified Patient#b 584,{ end; } +1@ma_h,65,144,7 script Patient in Sorrow#b 585,{ end; } +1@ma_h,87,181,4 script Suffering Patient#b 584,{ end; } +1@ma_h,104,181,4 script Wriggling Patient#b 585,{ end; } +1@ma_h,99,132,7 script Patient in Cold Sweat#b 584,{ end; } +1@ma_h,87,132,7 script Howling Patient#b 585,{ end; } + +// Warp Portals +//============================================================ +1@ma_h,35,156,0 warp #Boss Room Exit 2,2,ma_dun01,150,9 +1@ma_h,105,157,0 warp #Boss Room Door 2,2,1@ma_h,116,157 +1@ma_h,112,157,0 warp #Boss Room Door1 2,2,1@ma_h,100,157 +1@ma_h,104,63,0 warp #Boss Room Door2 2,2,1@ma_h,117,63 +1@ma_h,112,63,0 warp #Boss Room Door3 2,2,1@ma_h,100,63 +1@ma_h,36,157,0 warp #Patternwarp1 7,7,1@ma_h,117,63 +1@ma_h,46,157,0 warp #Patternwarp2 7,7,1@ma_h,117,63 +1@ma_h,57,157,0 warp #Patternwarp3 7,7,1@ma_h,117,63 +1@ma_h,67,157,0 warp #Patternwarp4 7,7,1@ma_h,117,63 +1@ma_h,79,157,0 warp #Patternwarp5 7,7,1@ma_h,117,63 +1@ma_h,89,157,0 warp #Patternwarp6 7,7,1@ma_h,117,63 +1@ma_h,100,157,0 warp #Patternwarp7 7,7,1@ma_h,117,63 +1@ma_h,51,173,0 warp #Patternwarp8 10,10,1@ma_h,117,63 +1@ma_h,52,140,0 warp #Patternwarp34 10,10,1@ma_h,117,63 +1@ma_h,73,173,0 warp #Patternwarp35 10,10,1@ma_h,117,63 +1@ma_h,73,140,0 warp #Patternwarp36 10,10,1@ma_h,117,63 +1@ma_h,95,173,0 warp #Patternwarp37 10,10,1@ma_h,117,63 +1@ma_h,95,140,0 warp #Patternwarp38 10,10,1@ma_h,117,63 +//1@ma_h,70,170,0 warp #Patternwarp39 10,10,1@ma_h,117,63 +//1@ma_h,77,169,0 warp #Patternwarp40 10,10,1@ma_h,117,63 +1@ma_h,117,171,0 warp #Patternwarp41 10,10,1@ma_h,117,63 +1@ma_h,131,171,0 warp #Patternwarp42 10,10,1@ma_h,117,63 +1@ma_h,146,171,0 warp #Patternwarp43 10,10,1@ma_h,117,63 +1@ma_h,117,157,0 warp #Patternwarp44 10,10,1@ma_h,117,63 +1@ma_h,131,157,0 warp #Patternwarp45 10,10,1@ma_h,117,63 +1@ma_h,146,157,0 warp #Patternwarp46 10,10,1@ma_h,117,63 +1@ma_h,117,143,0 warp #Patternwarp47 10,10,1@ma_h,117,63 +1@ma_h,131,143,0 warp #Patternwarp48 10,10,1@ma_h,117,63 +1@ma_h,146,143,0 warp #Patternwarp49 10,10,1@ma_h,117,63 +1@ma_h,36,63,0 warp #Patternwarp10 7,7,1@ma_h,116,157 +1@ma_h,46,63,0 warp #Patternwarp11 7,7,1@ma_h,116,157 +1@ma_h,56,63,0 warp #Patternwarp12 7,7,1@ma_h,116,157 +1@ma_h,67,63,0 warp #Patternwarp13 7,7,1@ma_h,116,157 +1@ma_h,78,63,0 warp #Patternwarp14 7,7,1@ma_h,116,157 +1@ma_h,89,63,0 warp #Patternwarp15 7,7,1@ma_h,116,157 +1@ma_h,100,63,0 warp #Patternwarp16 7,7,1@ma_h,116,157 +1@ma_h,51,79,0 warp #Patternwarp17 10,10,1@ma_h,116,157 +1@ma_h,51,46,0 warp #Patternwarp18 10,10,1@ma_h,116,157 +1@ma_h,73,80,0 warp #Patternwarp19 10,10,1@ma_h,116,157 +1@ma_h,73,46,0 warp #Patternwarp20 10,10,1@ma_h,116,157 +1@ma_h,95,79,0 warp #Patternwarp21 10,10,1@ma_h,116,157 +1@ma_h,95,46,0 warp #Patternwarp22 10,10,1@ma_h,116,157 +//1@ma_h,193,82,0 warp #Patternwarp23 7,7,1@ma_h,116,157 +//1@ma_h,193,82,0 warp #Patternwarp24 7,7,1@ma_h,116,157 +1@ma_h,117,77,0 warp #Patternwarp25 10,10,1@ma_h,116,157 +1@ma_h,131,77,0 warp #Patternwarp26 10,10,1@ma_h,116,157 +1@ma_h,146,77,0 warp #Patternwarp27 10,10,1@ma_h,116,157 +1@ma_h,117,63,0 warp #Patternwarp28 10,10,1@ma_h,116,157 +1@ma_h,131,63,0 warp #Patternwarp29 10,10,1@ma_h,116,157 +1@ma_h,146,63,0 warp #Patternwarp30 10,10,1@ma_h,116,157 +1@ma_h,117,49,0 warp #Patternwarp31 10,10,1@ma_h,116,157 +1@ma_h,131,49,0 warp #Patternwarp32 10,10,1@ma_h,116,157 +1@ma_h,146,49,0 warp #Patternwarp33 10,10,1@ma_h,116,157 + +// Disable select warps. +// Custom, but saves processing and lines. +1@ma_h,1,1,0 script #ma_hos_warp_init 844,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#Boss Room Exit"); + disablenpc instance_npcname("#Boss Room Door"); + disablenpc instance_npcname("#Boss Room Door1"); + for(set .@i,1; .@i<=8; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + for(set .@i,34; .@i<=38; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + // Skip 39-40 since they're disabled in the official script. + for(set .@i,41; .@i<=49; set .@i,.@i+1) + disablenpc instance_npcname("#Patternwarp"+.@i); + disablenpc instance_npcname("#ma_hos_warp_init"); + end; +} diff --git a/npc/re/instances/BuwayaCave.txt b/npc/re/instances/BuwayaCave.txt new file mode 100644 index 000000000..0f8117170 --- /dev/null +++ b/npc/re/instances/BuwayaCave.txt @@ -0,0 +1,459 @@ +//===== Hercules Script ====================================== +//= Buwaya Cave +//===== By: ================================================== +//= Euphy +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= [Official Conversion] +//= Defeat Buwaya in his cave. +//= Part of the "Secret in the Woods" quest. +//===== Additional Comments: ================================= +//= 1.0 First version. [Euphy] +//============================================================ + +1@ma_c mapflag src4instance +//============================================================ +ma_fild02,312,317,5 script Guard#buwaya_cave 570,{ + if (BaseLevel < 130) { + mes "[Guard]"; + mes "People under ^ff0000level 130^000000"; + mes "cannot enter this place."; + mes "This place is dangerous. Please go back."; + close; + } + + set .@party_id,getcharid(1); + set .@md_name$,"Buwaya Cave"; + + if (!.@party_id) { + mes "[Guard]"; + mes "Buwaya is dangerous."; + mes "Please come back after you form a"; + mes "team with other people."; + close; + } + if (getcharid(0) == getpartyleader(.@party_id,2)) { + mes "[Guard]"; + mes "This place is dangerous. Please go back."; + mes "If you dont have any business here, please go back."; + next; + while(1) { + switch(select("Why is it so dangerous?:I'm here to hunt down Buwaya.:End conversation.")) { + case 1: + mes "[Guard]"; + mes "Recently, there has been a case"; + mes "where villagers have disappeared."; + mes "After investigating the tracks, "; + mes "we found out the giant monster Buwaya"; + mes "was responsible."; + next; + mes "[Guard]"; + mes "Soldiers and mercenaries have been dispatched to "; + mes "hunt down Buwaya, but were never"; + mes "completely successful."; + next; + mes "[Guard]"; + mes "Buwaya is still kidnapping"; + mes "the villagers to this day."; + mes "Please gather some people to get rid of Buwaya."; + next; + break; + case 2: + set .@playtime, checkquest(4229,PLAYTIME); + if (.@playtime == -1) { + // fall through + } else if (.@playtime == 0 || .@playtime == 1) { + mes "[Guard]"; + mes "Buwaya is still hiding."; + mes "Even if you enter now, Buwaya will not come out. "; + mes "Please come back later."; + close; + } else { + erasequest 4229; + // fall through + } + set .@instance,instance_create(.@md_name$,.@party_id); + if (.@instance < 0) { + mes "[Guard]"; + mes "Party name is... "+getpartyname(.@party_id)+".";; + mes "Party leader is... "+strcharinfo(0); + mes "^0000ff"+.@md_name$+"^000000 cannot be opened now."; + mes "Please try a moment later."; + close; + } + if (instance_attachmap("1@ma_c",.@instance) == "") { + mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!"; + instance_destroy(.@instance); + close; + } + instance_set_timeout 3600,300,.@instance; + instance_init(.@instance); + + mes "[Guard]"; + mes "I will open up the tunnel to ^0000ff"+.@md_name$+"^000000."; + mes "I wish you good luck."; + close; + case 3: + mes "[Guard]"; + mes "This place is dangerous. You cannot enter."; + close; + } + } + } else { + mes "[Guard]"; + mes "Let me talk with the party leader."; + mes "Please call forth the leader."; + close; + } +} + +ma_fild02,315,323,0 script Cave Entrance#buwaya 45,2,2,{ + end; +OnTouch: + if (BaseLevel < 130) { + mes "[Guard]"; + mes "People under ^ff0000level 130^000000"; + mes "cannot enter this place."; + mes "This place is dangerous. Please go back."; + close; + } + set .@playtime, checkquest(4229,PLAYTIME); + if (.@playtime == -1) { + // fall through + } else if (.@playtime == 0 || .@playtime == 1) { + mes "[Guard]"; + mes "Buwaya is still hiding."; + mes "Even if you enter now, Buwaya will not come out."; + mes "Please come back later."; + close; + } else { + erasequest 4229; + // fall through + } + switch(select("Enter.:Turn back.")) { + case 1: + if( has_instance("1@ma_c") == "" ) { + mes "The memorial dungeon Buwaya Cave does not exist."; + mes "The party leader did not generate the dungeon yet."; + close; + } else { + mapannounce "ma_fild02",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + setquest 4229; + warp "1@ma_c",35,57; + end; + } + case 2: + mes "[Guard]"; + mes "You must value your life."; + mes "It is better to think carefully before you act."; + close; + } +} + +1@ma_c,33,112,0 script #damage 139,7,7,{ + end; +OnInstanceInit: + initnpctimer; + disablenpc instance_npcname("#damage"); + end; +OnTimer1000: + enablenpc instance_npcname("#damage"); + specialeffect EF_POISONHIT; + end; +OnTimer2000: + stopnpctimer; + initnpctimer; + disablenpc instance_npcname("#damage"); + end; +OnTouch: + percentheal -10,-10; + sc_start SC_BLEEDING,60000,0; + sc_start SC_POISON,60000,0; + end; +} + +1@ma_c,29,110,5 script Kidnapped People#1 575,{ + mes "[Kidnapped Residents]"; + mes "Buwaya was running around,"; + mes "and new people got caught."; + mes "We will be stuck in here for the rest of our lives."; + next; + switch(select("Get me outta here!!:Ca...can't escape?")) { + case 1: + mes "[Kidnapped Residents]"; + mes "We don't have enough power to destroy it but Buwaya has a weakness."; + mes "Look at the wall over there."; + mes "If you knock there, Buywaya will feel pain and spit you out."; + donpcevent instance_npcname("#box_mob_call")+"::OnEnable"; + close2; + disablenpc instance_npcname("Kidnapped People#1"); + end; + case 2: + mes "[Kidnapped People]"; + mes "Somthing is wrong here..."; + mes "Have you experienced this before?"; + close; + } + end; +OnInstanceInit: + disablenpc instance_npcname("Kidnapped People#1"); + end; +OnEnable: + enablenpc instance_npcname("Kidnapped People#1"); + donpcevent instance_npcname("#box_mob_call")+"::OnDisable"; + end; +} + +1@ma_c,36,110,5 script Kidnapped People#2 574,{ + mes "[Kidnapped Residents]"; + mes "Ahaa! I wish I had a little more power..."; + mes "I know its weakness..."; + next; + switch(select("Tell me.:Do you really know?")) { + case 1: + mes "[Kidnapped Residents]"; + mes "Are you sure you can do it...?"; + mes "Ok, listen carefully,"; + mes "its weakness is..."; + next; + mes "[Kidnapped Residents]"; + mes "...behind us on the walls."; + sc_start SC_ATKPOTION,60000,45; + sc_start SC_MATKPOTION,60000,45; + disablenpc instance_npcname("Kidnapped People#2"); + close; + case 2: + mes "[Kidnapped Residents]"; + mes "WHAT?!"; + mes "Are you ignoring me"; + mes "because I'm captured in here?"; + close; + } + end; +OnInstanceInit: + disablenpc instance_npcname("Kidnapped People#2"); + end; +OnEnable: + enablenpc instance_npcname("Kidnapped People#2"); + end; +} + +1@ma_c,3,3,0 script #box_mob_call 139,1,1,{ + end; +OnInstanceInit: + setcell instance_mapname("1@ma_c"),30,118,35,118,cell_shootable,1; //custom + disablenpc instance_npcname("#box_mob_call"); + end; +OnEnable: + enablenpc instance_npcname("#box_mob_call"); + set .@label$, instance_npcname("#box_mob_call")+"::OnMyMobDead"; + set .@map$, instance_mapname("1@ma_c"); + monster .@map$,30,118,"Buwaya's Weakness",2333,1,.@label$; + monster .@map$,35,118,"Buwaya's Weakness",2333,1,.@label$; + end; +OnDisable: + killmonster instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead"; + disablenpc instance_npcname("#box_mob_call"); + end; +OnMyMobDead: + if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead") < 1) + donpcevent instance_npcname("#box_out")+"::OnEnable"; + end; +} + +1@ma_c,38,118,0 script #box_out 45,2,2,{ +OnInstanceInit: +OnDisable: + disablenpc instance_npcname("#box_out"); + end; +OnEnable: + enablenpc instance_npcname("#box_out"); + end; +OnTouch: + set .@x, rand(1,20) + 97; + set .@y, rand(1,20) + 74; + warp instance_mapname("1@ma_c"),.@x,.@y; + end; +} + +1@ma_c,97,74,0 script #box_call 139,50,50,{ + end; +OnInstanceInit: + disablenpc instance_npcname("#box_call"); + initnpctimer; + end; +OnTimer30000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : I will put you in my treasure box!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + // Should execute OnTimer33000, but client doesn't render the effect fast enough. + for(set .@i,1; .@i<=9; set .@i,.@i+1) + donpcevent instance_npcname("#yunobi"+.@i)+"::OnEnable"; + end; +OnTimer33000: + donpcevent instance_npcname("#box_out")+"::OnDisable"; + donpcevent instance_npcname("#box_mob_call")+"::OnDisable"; + donpcevent instance_npcname("Kidnapped People#1")+"::OnEnable"; + donpcevent instance_npcname("Kidnapped People#2")+"::OnEnable"; + end; +OnTimer34000: + enablenpc instance_npcname("#box_call"); + end; +OnTimer35000: + stopnpctimer; + initnpctimer; + disablenpc instance_npcname("#box_call"); + end; +OnTouch: + specialeffect2 EF_GUIDEDATTACK; + warp instance_mapname("1@ma_c"),33,112; + end; +OnDisable: + stopnpctimer; + disablenpc instance_npcname("#box_call"); + end; +} + +1@ma_c,97,74,0 script #yunobi1 139,{ + end; +OnInstanceInit: + hideonnpc instance_npcname(strnpcinfo(0)); + end; +OnEnable: + specialeffect EF_MAPPILLAR2; + end; +} +1@ma_c,97,94,0 duplicate(#yunobi1) #yunobi2 139 +1@ma_c,117,94,0 duplicate(#yunobi1) #yunobi3 139 +1@ma_c,117,74,0 duplicate(#yunobi1) #yunobi4 139 +1@ma_c,117,54,0 duplicate(#yunobi1) #yunobi5 139 +1@ma_c,97,54,0 duplicate(#yunobi1) #yunobi6 139 +1@ma_c,77,54,0 duplicate(#yunobi1) #yunobi7 139 +1@ma_c,77,74,0 duplicate(#yunobi1) #yunobi8 139 +1@ma_c,77,94,0 duplicate(#yunobi1) #yunobi9 139 + +1@ma_c,1,1,0 script #bunshin 139,{ + end; +OnInstanceInit: + initnpctimer; + end; +OnTimer58000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : I had enough with this, let's go till the end!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer61000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : This is!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer62000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer63000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer64000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly... ATTACK!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer65000: + set .@label$, instance_npcname("#bunshin")+"::OnMyMobDead"; + set .@map$, instance_mapname("1@ma_c"); + areamonster .@map$,112,89,122,99,"Buwaya",2332,1,.@label$; + areamonster .@map$,112,49,122,59,"Buwaya",2332,1,.@label$; + areamonster .@map$,72,49,82,59,"Buwaya",2332,1,.@label$; + areamonster .@map$,72,89,82,99,"Buwaya",2332,1,.@label$; + end; +OnTimer66000: + mapannounce instance_mapname("1@ma_c"),"Buwaya : Are you scared?",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + end; +OnTimer105000: + killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead"; + stopnpctimer; + initnpctimer; + end; +OnMyMobDead: + if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead") < 1) { + stopnpctimer; + initnpctimer; + } + end; +OnDisable: + stopnpctimer; + killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead"; + disablenpc instance_npcname("#bunshin"); + end; +} + +1@ma_c,2,2,0 script #buwaya_con 139,{ + end; +OnInstanceInit: + areamonster instance_mapname("1@ma_c"),90,67,104,81,"Buwaya",2319,1,instance_npcname("#buwaya_con")+"::OnMyMobDead"; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@ma_c"); + if (mobcount(.@map$,instance_npcname("#buwaya_con")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("#box_call")+"::OnDisable"; + donpcevent instance_npcname("#bunshin")+"::OnDisable"; + donpcevent instance_npcname("#exit_mob")+"::OnDisable"; + donpcevent instance_npcname("#cave_out")+"::OnEnable"; + mapannounce .@map$,"Guard : You did great work. Please hurry up and escape to the way you came in!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + } + end; +} + +1@ma_c,3,3,0 script #exit_mob 139,{ + end; +OnInstanceInit: + initnpctimer; + end; +OnTimer60000: + set .@label$, instance_npcname("#exit_mob")+"::OnMyMobDead"; + set .@map$, instance_mapname("1@ma_c"); + if (mobcount(.@map$,.@label$) < 30) + set .@amount,10; + else + set .@amount,1; + areamonster .@map$,43,58,47,60,"Water Plant",2331,.@amount,.@label$; + areamonster .@map$,43,58,47,60,"Egg",2329,.@amount,.@label$; + stopnpctimer; + initnpctimer; + end; +OnDisable: + stopnpctimer; + killmonster instance_mapname("1@ma_c"),instance_npcname("#exit_mob")+"::OnMyMobDead"; + disablenpc instance_npcname("#exit_mob"); + end; +OnMyMobDead: + end; +} + +1@ma_c,28,57,0 script #cave_out 45,2,2,{ +OnInstanceInit: + disablenpc instance_npcname("#cave_out"); + end; +OnEnable: + enablenpc instance_npcname("#cave_out"); + end; +OnTouch: + mes "Would like to go out?"; + next; + if(select("Yes!:No, I will stay.") == 1) + warp "ma_fild02",315,315; + close; +} + +1@ma_c,1,1,0 script #buwaya_spawn_mobs -1,{ +OnInstanceInit: + set .@map$, instance_mapname("1@ma_c"); + areamonster .@map$,73,81,93,101,"Seaweed",2331,18; + areamonster .@map$,110,97,116,103,"Seaweed",2331,8; + areamonster .@map$,59,63,63,67,"Seaweed",2331,8; + areamonster .@map$,73,55,77,59,"Seaweed",2331,4; + areamonster .@map$,103,69,107,73,"Seaweed",2331,4; + areamonster .@map$,108,45,122,63,"Seaweed",2331,15; + areamonster .@map$,73,81,93,101,"Buwaya's Egg",2329,10; + areamonster .@map$,110,97,116,103,"Buwaya's Egg",2329,8; + areamonster .@map$,59,63,63,67,"Buwaya's Egg",2329,4; + areamonster .@map$,73,55,77,59,"Buwaya's Egg",2329,3; + areamonster .@map$,103,69,107,73,"Buwaya's Egg",2329,3; + areamonster .@map$,108,45,122,63,"Buwaya's Egg",2329,15; + monster .@map$,0,0,"Seaweed",2331,5; + monster .@map$,0,0,"Buwaya's Slave",2330,5; + end; +} diff --git a/npc/re/instances/HazyForest.txt b/npc/re/instances/HazyForest.txt index cecdadd20..de8bfcd06 100644 --- a/npc/re/instances/HazyForest.txt +++ b/npc/re/instances/HazyForest.txt @@ -3,15 +3,19 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= Hercules -//===== Description: ========================================= +//===== Description: ========================================= //= [Official Conversion] //= Cross through the Hazy Forest to reach the Bifrost. -//= Contains the Wandering Guardian quest. -//===== Additional Comments: ================================= +//= Contains the "Wandering Guardian" quest. +//===== Additional Comments: ================================= //= 1.0 First version. [Euphy] +//= 1.1 Instance system rewrite. [Euphy] +//============================================================ + +1@mist mapflag src4instance //============================================================ // Instance Creation @@ -79,71 +83,38 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 447,{ next; switch(select("Venture into the Hazy Forest.:Give up.")) { case 1: - set .@instance, instance_create(.@md_name$,.@party_id); - if (.@instance >= 0) { - if (instance_attachmap("1@mist",.@instance) != "") { - - instance_attach(.@instance); - instance_set_timeout 7200,300,.@instance; - instance_init(.@instance); - - donpcevent instance_npcname("#Whisper_mist", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Tom's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Tomba's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Remi's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Tired Rem's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Ron's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Rover's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Mona's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Namon's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Sad Neoron's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Spyder's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Tito's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Pumba's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Tete's Garden Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("The Gardeners' Tree", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Dragon Herder", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Mysterious Young Man#mis", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Loki#mist", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Collapsed Girl#mist", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Fragments of Memory", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#mist_warp_init", instance_id())+"::OnInstanceInit"; - - mes "[Laphine Soldier]"; - mes "Party Name "+getpartyname(.@party_id)+"..."; - mes "Party Leader "+strcharinfo(0)+"..."; - mes "I've got it. I've written them down on the report here."; - next; - mes "[Laphine Soldier]"; - mes "You'll get permission soon."; - mes "Now go to the log tunnel, the only way to get into the Hazy Forest."; - mes "You understand?"; - next; - mes "[Laphine Soldier]"; - mes "We can't go against the forest,"; - mes "but maybe you humans can."; - mes "Good luck!"; - close; - } else - instance_destroy(.@instance); - } mes "[Laphine Soldier]"; mes "Party Name "+getpartyname(.@party_id)+"..."; mes "Party Leader "+strcharinfo(0)+"..."; - mes "Hmm..."; - next; - mes "[Laphine Soldier]"; - if (.@playtime == -1) - mes "It's dangerous in the forest."; - else - mes "The atmosphere is somewhat tense in the forest."; - mes "...Why don't you just go back today?"; - close; + set .@instance, instance_create(.@md_name$, .@party_id); + if (.@instance < 0) { + mes "Hmm..."; + next; + mes "[Laphine Soldier]"; + if (.@playtime == -1) + mes "It's dangerous in the forest."; + else + mes "The atmosphere is somewhat tense in the forest."; + mes "...Why don't you just go back today?"; + close; + } + if (instance_attachmap("1@mist",.@instance) != "") { + instance_set_timeout 7200,300,.@instance; + instance_init(.@instance); + mes "I've got it. I've written them down on the report here."; + next; + mes "[Laphine Soldier]"; + mes "You'll get permission soon."; + mes "Now go to the log tunnel, the only way to get into the Hazy Forest."; + mes "You understand?"; + next; + mes "[Laphine Soldier]"; + mes "We can't go against the forest,"; + mes "but maybe you humans can."; + mes "Good luck!"; + close; + } else + instance_destroy(.@instance); case 2: mes "[Laphine Soldier]"; mes "Well, you've made the right decision."; @@ -177,15 +148,6 @@ bif_fild01,161,355,0 script Log Tunnel 844,{ next; if(select("Enter the tunnel.:Give up.") == 2) close; - // TODO: Add official MD_Enter cases. - if (!getcharid(1)) { - mes "[Laphine Soldier]"; - mes "Hey, look!"; - mes "Are you going alone?"; - mes "That's impossible. Too rash."; - mes "Team up with some friends and go together!"; - close; - } set .@playtime, checkquest(7211,PLAYTIME); if (has_instance("1@mist") == "") { if (.@playtime == 0 || .@playtime == 1) { @@ -196,12 +158,13 @@ bif_fild01,161,355,0 script Log Tunnel 844,{ mes "The world beyond the log tunnel looks dark and suffocating."; mes "Your instinct is screaming that this forest is dangerous."; close; - } - if (.@playtime == 2) erasequest 7211; - if (checkquest(7211,PLAYTIME) == -1) setquest 7211; - mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 - warp "1@mist",89,29; - close; + } else { + if (checkquest(7211,PLAYTIME) == 2) erasequest 7211; + if (checkquest(7211,PLAYTIME) == -1) setquest 7211; + mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0 + warp "1@mist",89,29; + close; + } } // Instance Scripts @@ -209,43 +172,44 @@ bif_fild01,161,355,0 script Log Tunnel 844,{ 1@mist,89,29,0 script #Whisper_mist 844,1,1,{ end; OnInstanceInit: - enablenpc instance_npcname("#Whisper_mist", instance_id()); + enablenpc instance_npcname("#Whisper_mist"); end; OnTouch: - disablenpc instance_npcname("#Whisper_mist", instance_id()); + disablenpc instance_npcname("#Whisper_mist"); initnpctimer; end; OnTimer10000: OnTimer20000: - instance_announce 0,"Whisper: Who's this? Who's this!? The forest is open! Tom, Tomba, Tired Rem, Remi! Wake up!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Whisper: Who's this? Who's this!? The forest is open! Tom, Tomba, Tired Rem, Remi! Wake up!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer60000: - instance_announce 0,"Loud Whisper: What are the forest keepers doing? What are the gardeners doing??",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Loud Whisper: What are the forest keepers doing? What are the gardeners doing??",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer120000: - instance_announce 0,"Loud Whisper: Don't go out, wander around forever, and play with us!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Loud Whisper: Don't go out, wander around forever, and play with us!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer180000: - instance_announce 0,"Loud Whisper: Useless, useless. Wandering around and around, you'll meet your end!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Loud Whisper: Useless, useless. Wandering around and around, you'll meet your end!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 stopnpctimer; end; } // callfunc "F_Mora_Mist",,,{,} function script F_Mora_Mist { - if (mobcount("1@mist",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") == 0) { + set .@map$, instance_mapname("1@mist"); + if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") == 0) { mes "Obviously no one is taking care of it."; mes "It seems like you can chop down the garden tree."; next; if(select("Chop down the garden tree.:Give up.") == 2) close; mes "You chop down the tree, which was blocking the path of the maze, "+((getarg(3,0))?"clearing the way out of the forest.":"so now you can continue."); - instance_announce 0,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 - enablenpc instance_npcname(getarg(0), instance_id()); - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + mapannounce .@map$,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + enablenpc instance_npcname(getarg(0)); + disablenpc instance_npcname(strnpcinfo(0)); close; } else - instance_announce 0,((getarg(3,0))?getarg(2):getarg(2)+"'s Cry: Huh? Who's doing bad things to my tree?!"),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce .@map$,((getarg(3,0))?getarg(2):getarg(2)+"'s Cry: Huh? Who's doing bad things to my tree?!"),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; } @@ -257,7 +221,7 @@ function script F_Mora_Mist { "Tom"; end; OnInstanceInit: - monster "1@mist",249,120,"Tom",2136,1,instance_npcname("Tom's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),249,120,"Tom",2136,1,instance_npcname("Tom's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -271,7 +235,7 @@ OnMyMobDead: "Tomba"; end; OnInstanceInit: - monster "1@mist",200,64,"Tomba",2136,1,instance_npcname("Tomba's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),200,64,"Tomba",2136,1,instance_npcname("Tomba's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -285,7 +249,7 @@ OnMyMobDead: "Remi"; end; OnInstanceInit: - monster "1@mist",154,184,"Remi the Tired",2137,1,instance_npcname("Remi's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),154,184,"Remi the Tired",2137,1,instance_npcname("Remi's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -299,16 +263,16 @@ OnMyMobDead: "Rem"; end; OnInstanceInit: - monster "1@mist",101,107,"Rem the Gardener",2136,1,instance_npcname("Tired Rem's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),101,107,"Rem the Gardener",2136,1,instance_npcname("Tired Rem's Garden Tree")+"::OnMyMobDead"; end; OnTimer10000: - instance_announce 0,"Whisper of the Forest: So Tom's, Tomba's, Remi's, and Rem's garden trees were all chopped down?",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Whisper of the Forest: So Tom's, Tomba's, Remi's, and Rem's garden trees were all chopped down?",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer15000: - instance_announce 0,"Whisper of the Forest: Trouble, trouble, we're in big trouble.",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Whisper of the Forest: Trouble, trouble, we're in big trouble.",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer20000: - instance_announce 0,"Loud Whisper: They've come to the second deepest forest. Gardeners of the deep forest, watch out!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Loud Whisper: They've come to the second deepest forest. Gardeners of the deep forest, watch out!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 stopnpctimer; end; OnMyMobDead: @@ -323,7 +287,7 @@ OnMyMobDead: "Ron"; end; OnInstanceInit: - monster "1@mist",227,178,"Ron the Gardener",2134,1,instance_npcname("Ron's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),227,178,"Ron the Gardener",2134,1,instance_npcname("Ron's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -337,7 +301,7 @@ OnMyMobDead: "Rover"; end; OnInstanceInit: - monster "1@mist",304,237,"Rover the Strutter",2134,1,instance_npcname("Rover's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),304,237,"Rover the Strutter",2134,1,instance_npcname("Rover's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -351,7 +315,7 @@ OnMyMobDead: "Mona"; end; OnInstanceInit: - monster "1@mist",239,253,"Mona the Seedseeker",2133,1,instance_npcname("Mona's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),239,253,"Mona the Seedseeker",2133,1,instance_npcname("Mona's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -365,7 +329,7 @@ OnMyMobDead: "Namon"; end; OnInstanceInit: - monster "1@mist",89,173,"Brave Namon",2134,1,instance_npcname("Namon's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),89,173,"Brave Namon",2134,1,instance_npcname("Namon's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -379,7 +343,7 @@ OnMyMobDead: "Neoron"; end; OnInstanceInit: - monster "1@mist",143,265,"Sad Neoron",2137,1,instance_npcname("Sad Neoron's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),143,265,"Sad Neoron",2137,1,instance_npcname("Sad Neoron's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -393,19 +357,19 @@ OnMyMobDead: "Spyder"; end; OnInstanceInit: - monster "1@mist",209,200,"Spyder the Eight-Legged",2132,1,instance_npcname("Spyder's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),209,200,"Spyder the Eight-Legged",2132,1,instance_npcname("Spyder's Garden Tree")+"::OnMyMobDead"; end; OnTimer5000: - instance_announce 0,"Roaring Whisper: The path is about to open. The tight bolts have been removed!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Roaring Whisper: The path is about to open. The tight bolts have been removed!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer9000: - instance_announce 0,"Roaring Whisper: A forest opened, another opened, and the other is going to open as well. Tito and Pumba, they are heading your way!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Roaring Whisper: A forest opened, another opened, and the other is going to open as well. Tito and Pumba, they are heading your way!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer13000: - instance_announce 0,"Roaring Whisper: Where you get after wandering around, around and around, everybody you've met while wandering around, around and around,",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Roaring Whisper: Where you get after wandering around, around and around, everybody you've met while wandering around, around and around,",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 end; OnTimer17000: - instance_announce 0,"Roaring Whisper: all the gardeners will be waiting for you, with their clippers in their hands-!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Roaring Whisper: all the gardeners will be waiting for you, with their clippers in their hands-!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0 stopnpctimer; end; OnMyMobDead: @@ -420,7 +384,7 @@ OnMyMobDead: "Tito"; end; OnInstanceInit: - monster "1@mist",264,291,"Tito the Flipper",2133,1,instance_npcname("Tito's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),264,291,"Tito the Flipper",2133,1,instance_npcname("Tito's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -434,7 +398,7 @@ OnMyMobDead: "Pumba"; end; OnInstanceInit: - monster "1@mist",309,165,"Diligent Pumba",2134,1,instance_npcname("Pumba's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),309,165,"Diligent Pumba",2134,1,instance_npcname("Pumba's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -448,7 +412,7 @@ OnMyMobDead: "Tete"; end; OnInstanceInit: - monster "1@mist",277,343,"Carefree Tete",2136,1,instance_npcname("Tete's Garden Tree", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),277,343,"Carefree Tete",2136,1,instance_npcname("Tete's Garden Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -461,19 +425,20 @@ OnMyMobDead: "Gardeners: We're not dead, yet!!!!",1; end; OnInstanceInit: - monster "1@mist",318,137,"Baby Tom",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",321,137,"Tomba the Baby",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",324,137,"Exhausted Remi",2137,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",319,135,"Rem the Exhausted",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",323,135,"Ron the Ex-Gardener",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",320,133,"Rover the Strutter",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",323,133,"Mona the Seedpicker",2133,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",317,132,"Timid Namon",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",326,132,"Indifferent Neoron",2137,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",317,129,"Spyder the Seven-Legged",2132,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",320,129,"Tito the Flapper",2133,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",324,129,"Lazy Pumba",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; - monster "1@mist",327,129,"Careless Tete",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead"; + set .@map$, instance_mapname("1@mist"); + monster .@map$,318,137,"Baby Tom",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,321,137,"Tomba the Baby",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,324,137,"Exhausted Remi",2137,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,319,135,"Rem the Exhausted",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,323,135,"Ron the Ex-Gardener",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,320,133,"Rover the Strutter",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,323,133,"Mona the Seedpicker",2133,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,317,132,"Timid Namon",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,326,132,"Indifferent Neoron",2137,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,317,129,"Spyder the Seven-Legged",2132,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,320,129,"Tito the Flapper",2133,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,324,129,"Lazy Pumba",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; + monster .@map$,327,129,"Careless Tete",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead"; end; OnMyMobDead: end; @@ -481,7 +446,7 @@ OnMyMobDead: 1@mist,73,290,0 script Mysterious Flower#1 844,{ specialeffect EF_LEVEL99_4; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); getitem 12561,1; //Mysterious_Seed end; } @@ -547,21 +512,22 @@ OnInstanceInit: case 5: setarray .@c[0],268,183; break; case 6: setarray .@c[0],65,278; break; } - monster "1@mist",.@c[0],.@c[1],"Wandering Purple Dragon",2131,1,instance_npcname("#Dragon Herder", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),.@c[0],.@c[1],"Wandering Purple Dragon",2131,1,instance_npcname("#Dragon Herder")+"::OnMyMobDead"; end; OnMyMobDead: - if (mobcount("1@mist",instance_npcname("#Dragon Herder", instance_id())+"::OnMyMobDead") == 0) { - donpcevent instance_npcname("Collapsed Girl#mist", instance_id())+"::OnEnable"; - donpcevent instance_npcname("Mysterious Young Man#mis", instance_id())+"::OnEnable"; - donpcevent instance_npcname("Loki#mist", instance_id())+"::OnEnable"; - instance_announce 0,"The Dragon's Cry: Am I being punished... for abandoning the way... of the guardian...?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0 - disablenpc instance_npcname("#Dragon Herder", instance_id()); + set .@map$, instance_mapname("1@mist"); + if (mobcount(.@map$,instance_npcname("#Dragon Herder")+"::OnMyMobDead") == 0) { + donpcevent instance_npcname("Collapsed Girl#mist")+"::OnEnable"; + donpcevent instance_npcname("Mysterious Young Man#mis")+"::OnEnable"; + donpcevent instance_npcname("Loki#mist")+"::OnEnable"; + mapannounce .@map$,"The Dragon's Cry: Am I being punished... for abandoning the way... of the guardian...?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0 + disablenpc instance_npcname("#Dragon Herder"); initnpctimer; } end; OnTimer3000: stopnpctimer; - instance_announce 0,"Voice in your head: ...Will you... save... me... please......?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0 + mapannounce instance_mapname("1@mist"),"Voice in your head: ...Will you... save... me... please......?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0 end; } @@ -705,12 +671,11 @@ OnTimer3000: close; } end; -OnInstanceInit: OnEnable: - enablenpc instance_npcname("Mysterious Young Man#mis", instance_id()); + enablenpc instance_npcname("Mysterious Young Man#mis"); end; OnDisable: - disablenpc instance_npcname("Mysterious Young Man#mis", instance_id()); + disablenpc instance_npcname("Mysterious Young Man#mis"); end; } @@ -761,10 +726,10 @@ OnDisable: end; OnInstanceInit: OnDisable: - disablenpc instance_npcname("Loki#mist", instance_id()); + disablenpc instance_npcname("Loki#mist"); end; OnEnable: - enablenpc instance_npcname("Loki#mist", instance_id()); + enablenpc instance_npcname("Loki#mist"); end; } @@ -774,10 +739,10 @@ OnEnable: close; OnInstanceInit: OnDisable: - disablenpc instance_npcname("Collapsed Girl#mist", instance_id()); + disablenpc instance_npcname("Collapsed Girl#mist"); end; OnEnable: - enablenpc instance_npcname("Collapsed Girl#mist", instance_id()); + enablenpc instance_npcname("Collapsed Girl#mist"); end; } @@ -905,7 +870,7 @@ mora,48,152,3 script Sharp Eyed Man 512,{ mes "You still have things to do."; next; mes "[Nydhogg the Guardian]"; - mes "... Oh, yes. It's late, but I have to fulfill my duties as a guardian."; + mes "...Oh, yes. It's late, but I have to fulfill my duties as a guardian."; mes "Now I know. I'll destroy Morroc with my own hands."; mes "I will fulfill my duties as a guardian."; next; @@ -961,68 +926,73 @@ mora,48,152,3 script Sharp Eyed Man 512,{ 1@mist,1,1,0 script #Mist Mobs Respawn1 844,{ end; OnInstanceInit: - monster "1@mist",0,0,"Miming",2137,15,instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),0,0,"Miming",2137,15,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead"; end; OnMyMobDead: - set .@num_mobs, 15 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@mist"); + set .@num_mobs, 15 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead"); if (.@num_mobs > 0) - monster "1@mist",0,0,"Miming",2137,.@num_mobs,instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead"; + monster .@map$,0,0,"Miming",2137,.@num_mobs,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead"; end; } 1@mist,1,2,0 script #Mist Mobs Respawn2 844,{ end; OnInstanceInit: - monster "1@mist",0,0,"Pom Spider",2132,35,instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),0,0,"Pom Spider",2132,35,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead"; end; OnMyMobDead: - set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@mist"); + set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead"); if (.@num_mobs > 0) - monster "1@mist",0,0,"Pom Spider",2132,.@num_mobs,instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead"; + monster .@map$,0,0,"Pom Spider",2132,.@num_mobs,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead"; end; } 1@mist,1,3,0 script #Mist Mobs Respawn3 844,{ end; OnInstanceInit: - monster "1@mist",0,0,"Angra Mantis",2133,35,instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),0,0,"Angra Mantis",2133,35,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead"; end; OnMyMobDead: - set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@mist"); + set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead"); if (.@num_mobs > 0) - monster "1@mist",0,0,"Angra Mantis",2133,.@num_mobs,instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead"; + monster .@map$,0,0,"Angra Mantis",2133,.@num_mobs,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead"; end; } 1@mist,1,4,0 script #Mist Mobs Respawn4 844,{ end; OnInstanceInit: - monster "1@mist",0,0,"Parus",2134,35,instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),0,0,"Parus",2134,35,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead"; end; OnMyMobDead: - set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@mist"); + set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead"); if (.@num_mobs > 0) - monster "1@mist",0,0,"Parus",2134,.@num_mobs,instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead"; + monster .@map$,0,0,"Parus",2134,.@num_mobs,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead"; end; } 1@mist,1,5,0 script #Mist Mobs Respawn5 844,{ end; OnInstanceInit: - monster "1@mist",0,0,"Little Fatum",2136,15,instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead"; + monster instance_mapname("1@mist"),0,0,"Little Fatum",2136,15,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead"; end; OnMyMobDead: - set .@num_mobs, 15 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@mist"); + set .@num_mobs, 15 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead"); if (.@num_mobs > 0) - monster "1@mist",0,0,"Little Fatum",2136,.@num_mobs,instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead"; + monster .@map$,0,0,"Little Fatum",2136,.@num_mobs,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead"; end; } 1@mist,1,6,0 script #Fragments of Memory 844,{ end; OnInstanceInit: - disablenpc instance_npcname("#Fragments of Memory", instance_id()); - monster "1@mist",0,0,"Guardian's Fragments of Memory",2138,15; + disablenpc instance_npcname("#Fragments of Memory"); + monster instance_mapname("1@mist"),0,0,"Guardian's Fragments of Memory",2138,15; end; } @@ -1058,7 +1028,7 @@ bif_fild01,38,374,0 script Mysterious Flower#ep14_1 844,{ OnTouch: if (checkquest(7211,PLAYTIME) == -1) setquest 7211; - warp "1@mist",116,40; + warp instance_mapname("1@mist"),116,40; end; } @@ -1160,21 +1130,21 @@ OnTouch: 1@mist,1,1,0 script #mist_warp_init 844,{ end; OnInstanceInit: - disablenpc instance_npcname("a25_a18-1", instance_id()); - disablenpc instance_npcname("a27-2_af1-2", instance_id()); - disablenpc instance_npcname("a15-2_a4-1", instance_id()); - disablenpc instance_npcname("a4-2_a11", instance_id()); - disablenpc instance_npcname("b4-2_b2", instance_id()); - disablenpc instance_npcname("b7_bf1-2", instance_id()); - disablenpc instance_npcname("b31_b16", instance_id()); - disablenpc instance_npcname("b27-3_bN-1", instance_id()); - disablenpc instance_npcname("b6-1_b33", instance_id()); - disablenpc instance_npcname("b5_b14", instance_id()); - disablenpc instance_npcname("c1_c13-1", instance_id()); - disablenpc instance_npcname("c13-3_c4", instance_id()); - disablenpc instance_npcname("c19_c4", instance_id()); - disablenpc instance_npcname("#to_bif02", instance_id()); - disablenpc instance_npcname("#mist_warp_init", instance_id()); + disablenpc instance_npcname("a25_a18-1"); + disablenpc instance_npcname("a27-2_af1-2"); + disablenpc instance_npcname("a15-2_a4-1"); + disablenpc instance_npcname("a4-2_a11"); + disablenpc instance_npcname("b4-2_b2"); + disablenpc instance_npcname("b7_bf1-2"); + disablenpc instance_npcname("b31_b16"); + disablenpc instance_npcname("b27-3_bN-1"); + disablenpc instance_npcname("b6-1_b33"); + disablenpc instance_npcname("b5_b14"); + disablenpc instance_npcname("c1_c13-1"); + disablenpc instance_npcname("c13-3_c4"); + disablenpc instance_npcname("c19_c4"); + disablenpc instance_npcname("#to_bif02"); + disablenpc instance_npcname("#mist_warp_init"); end; } 1@mist,247,123,0 warp a25_a18-1 1,1,1@mist,164,66 //Tom diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt index 2d0369699..4138962c6 100644 --- a/npc/re/instances/MalangdoCulvert.txt +++ b/npc/re/instances/MalangdoCulvert.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ====================================== //= Malangdo Culvert //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.0a -//===== Compatible With: ===================================== -//= rAthena SVN +//= 1.1 //===== Description: ========================================= //= [Official Conversion] //= Clean the culverts and defeat the Coelacanth. @@ -15,8 +13,14 @@ //= 1.0 First version. [Euphy] //= Letters "n" and "h" in NPC names indicate difficulty. //= 1.0a There is no minimum party size on official servers. +//= 1.0b Fixed incorrect use of 'close'. [Joseph] +//= 1.1 Instance system rewrite. [Euphy] //============================================================ +1@pump mapflag src4instance +2@pump mapflag src4instance +//============================================================ + // Quest NPCs //============================================================ mal_in01,172,28,2 script Albo#mal 561,{ @@ -400,7 +404,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{ mes "What a rookie."; close; case 2: - set .@instance, instance_create(.@md_name$,.@party_id); + set .@instance,instance_create(.@md_name$,.@party_id); if (.@instance < 0) { mes "Party name: "+getpartyname(.@party_id); mes "Party leader: "+strcharinfo(0); @@ -412,66 +416,26 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{ instance_destroy(.@instance); close; } - instance_attach(.@instance); instance_set_timeout 3600,300,.@instance; instance_init(.@instance); - - // Common Scripts - donpcevent instance_npcname("Missing, the Cleaner#0", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Culvert Entrance#i", instance_id())+"::OnInstanceInit"; - - // Normal Mode - donpcevent instance_npcname("Missing, the Cleaner#nf", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n5", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_n6", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Boss Creation#n", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Missing, the Cleaner#no", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Culvert Entrance#n", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Hydra#n", instance_id())+"::OnInstanceInit"; - - // Hard Mode - donpcevent instance_npcname("Missing, the Cleaner#hf", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h5", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h6", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h7", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h8", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h9", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("#Culvert_h10", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Boss Creation#h", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Missing, the Cleaner#ho", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Culvert Entrance#h", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("Hydra#h", instance_id())+"::OnInstanceInit"; - + mes "^3333FF"+.@md_name$+"^000000 - Reserving"; mes "After making the reservation, you"; mes "have to select Enter the Culvert."; close; case 3: - goto L_Enter; + callsub L_Enter,0; } - } else { - if(select("Enter Culvert:Cancel") == 2) - close; - goto L_Enter; } + if(select("Enter Culvert:Cancel") == 2) + end; + callsub L_Enter,1; } else if (.@playtime == 0 || .@playtime == 1) { mes "You can enter the Culvert if the gate is open."; next; if(select("Enter Culvert:Cancel") == 2) close; - goto L_Enter; + callsub L_Enter,0; } else if (.@playtime == 2) { mes "^0000ffThe gate to the Culvert is open again.^000000"; erasequest 12254; @@ -479,7 +443,6 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{ } end; L_Enter: - // TODO: Add official MD_Enter cases. if (has_instance("1@pump") == "") { if (checkquest(12254,PLAYTIME) == 0 || checkquest(12254,PLAYTIME) == 1) { mes "The gate to the Culvert is still closed."; @@ -493,7 +456,7 @@ L_Enter: mapannounce "mal_in01", strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the Culvert.",bc_map,"0x00ff99"; if (checkquest(12254) == -1) setquest 12254; warp "1@pump",63,98; - close; + end; } // Instance: Common Scripts @@ -521,9 +484,9 @@ L_Enter: close; } set 'party_id,getcharid(1); - instance_announce 0,"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15; - disablenpc instance_npcname("Missing, the Cleaner#0", instance_id()); - enablenpc instance_npcname("Missing, the Cleaner#n", instance_id()); + mapannounce instance_mapname("1@pump"),"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15; + disablenpc instance_npcname("Missing, the Cleaner#0"); + enablenpc instance_npcname("Missing, the Cleaner#n"); close; case 2: if (BaseLevel < 140) { @@ -543,9 +506,9 @@ L_Enter: close; } set 'party_id,getcharid(1); - instance_announce 0,"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15; - disablenpc instance_npcname("Missing, the Cleaner#0", instance_id()); - enablenpc instance_npcname("Culvert Entrance#i", instance_id()); + mapannounce instance_mapname("1@pump"),"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15; + disablenpc instance_npcname("Missing, the Cleaner#0"); + enablenpc instance_npcname("Culvert Entrance#i"); close; case 3: mes "[Missing, the Cleaner]"; @@ -553,21 +516,18 @@ L_Enter: close; } end; -OnInstanceInit: - enablenpc instance_npcname("Missing, the Cleaner#0", instance_id()); - end; } 1@pump,84,105,0 script Culvert Entrance#i 45,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("Culvert Entrance#i", instance_id()); + disablenpc instance_npcname("Culvert Entrance#i"); end; OnTouch: if (BaseLevel >= 140) - warp "2@pump",38,88; + warp instance_mapname("2@pump"),38,88; else - warp "1@pump",74,105; + warp instance_mapname("1@pump"),74,105; end; } @@ -638,56 +598,58 @@ function script F_mal_missing { mes "[Missing, the Cleaner]"; mes "Ok! Let's start now!"; set .@i$, charat(strnpcinfo(2),0); - enablenpc instance_npcname("Missing, the Cleaner#"+.@i$, instance_id()); - donpcevent instance_npcname("Missing, the Cleaner#"+.@i$, instance_id())+"::OnStart"; - disablenpc instance_npcname("Culvert Entrance#"+.@i$, instance_id()); - disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o", instance_id()); - donpcevent instance_npcname("Monster Hole#"+.@i$, instance_id())+"::OnClear"; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + enablenpc instance_npcname("Missing, the Cleaner#"+.@i$); + donpcevent instance_npcname("Missing, the Cleaner#"+.@i$)+"::OnStart"; + disablenpc instance_npcname("Culvert Entrance#"+.@i$); + disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o"); + donpcevent instance_npcname("Monster Hole#"+.@i$)+"::OnClear"; + disablenpc instance_npcname(strnpcinfo(0)); close; } close; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; } 1@pump,84,105,4 script Missing, the Cleaner#n 545,{ callfunc "F_mal_missing"; - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnStart"; + donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnStart"; close; OnInstanceInit: - disablenpc instance_npcname("Missing, the Cleaner#n", instance_id()); + disablenpc instance_npcname("Missing, the Cleaner#n"); end; OnStart: - killmonster "1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"; - disablenpc instance_npcname("Missing, the Cleaner#n", instance_id()); + killmonster instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"; + disablenpc instance_npcname("Missing, the Cleaner#n"); initnpctimer; end; OnAddSeaweed: - areamonster "1@pump",55,99,61,105,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"; - set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("1@pump"); + areamonster .@map$,55,99,61,105,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"; + set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail"; else - instance_announce 0,"Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20; + mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20; end; OnMyMobDead: end; OnFail: stopnpctimer; - donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnClear"; - killmonster "1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"; - enablenpc instance_npcname("Missing, the Cleaner#nf", instance_id()); - instance_announce 0,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15; - disablenpc instance_npcname("Missing, the Cleaner#n", instance_id()); + donpcevent instance_npcname("Monster Hole#n")+"::OnClear"; + set .@map$, instance_mapname("1@pump"); + killmonster .@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"; + enablenpc instance_npcname("Missing, the Cleaner#nf"); + mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15; + disablenpc instance_npcname("Missing, the Cleaner#n"); end; OnTimer100: - instance_announce 0,"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15; + mapannounce instance_mapname("1@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15; end; OnTimer5500: - instance_announce 0,"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15; - donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn"; + mapannounce instance_mapname("1@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15; + donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn"; end; OnTimer45000: OnTimer95000: @@ -698,12 +660,12 @@ OnTimer295000: OnTimer345000: OnTimer395000: OnTimer445000: - instance_announce 0,"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15; + mapannounce instance_mapname("1@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15; end; OnTimer50000: OnTimer100000: OnTimer150000: - donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn"; + donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn"; end; OnTimer200000: OnTimer250000: @@ -711,38 +673,36 @@ OnTimer300000: OnTimer350000: OnTimer400000: OnTimer450000: - set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"); + set .@mob_dead_num, mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail"; else - donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn"; + donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn"; end; OnTimer515000: - set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"); - instance_announce 0,"Contaminated Seaweed: "+.@mob_dead_num+" stem. Missing will come and inspect the results of the cleaning soon.",bc_map,"0xff3333",FW_NORMAL,20; + set .@map$, instance_mapname("1@pump"); + set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"); + mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem. Missing will come and inspect the results of the cleaning soon.",bc_map,"0xff3333",FW_NORMAL,20; end; OnTimer520000: stopnpctimer; - set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead"); + set .@mob_dead_num, mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail"; else - donpcevent instance_npcname("Boss Creation#n", instance_id())+"::OnEnable"; + donpcevent instance_npcname("Boss Creation#n")+"::OnEnable"; end; } 1@pump,1,1,4 script Monster Hole#n -1,{ end; -OnInstanceInit: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); - end; OnSpawn: set .@i$, charat(strnpcinfo(2),0); if (.@i$ == "n") set .@n,6; else if (.@i$ == "h") set .@n,10; - donpcevent instance_npcname("#Culvert_"+.@i$+rand(1,.@n), instance_id())+"::OnEnable"; + donpcevent instance_npcname("#Culvert_"+.@i$+rand(1,.@n))+"::OnEnable"; end; OnClear: set .@i$, charat(strnpcinfo(2),0); @@ -751,21 +711,22 @@ OnClear: else if (.@i$ == "h") set .@n,10; for(set .@i,1; .@i<=.@n; set .@i,.@i+1) - donpcevent instance_npcname("#Culvert_"+.@i$+.@n, instance_id())+"::OnClear"; + donpcevent instance_npcname("#Culvert_"+.@i$+.@n)+"::OnClear"; end; } -1@pump,36,111,4 script #Culvert_n1 844,{ +1@pump,36,111,4 script #Culvert_n1 844,14,14,{ //temporary workaround for ALL_SAMEMAP progressbar "0xFFFF00",10; stopnpctimer; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); - set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + enablenpc instance_npcname(strnpcinfo(0)); + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; + set .@map$, instance_mapname("1@pump"); set .@index, atoi(charat(strnpcinfo(2),9)); switch(.@index) { case 1: setarray .@c[0],32,107,40,115; break; @@ -775,12 +736,12 @@ OnEnable: case 5: setarray .@c[0],71,76,79,84; break; case 6: setarray .@c[0],54,97,62,105; break; } - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Crab",2176,rand(1,3),.@label$; - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Marse",2175,rand(1,3),.@label$; - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Vadon",2174,rand(1,3),.@label$; - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Shellfish",2178,rand(1,3),.@label$; - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Kukre",2179,rand(1,3),.@label$; - areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Cornutus",2177,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Crab",2176,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Marse",2175,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Vadon",2174,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Shellfish",2178,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Kukre",2179,rand(1,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Cornutus",2177,rand(1,3),.@label$; specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken getmapxy(.@map$,.@x,.@y,1); getpartymember 'party_id,2; @@ -798,67 +759,70 @@ OnMyMobDead: end; OnClear: stopnpctimer; - killmonster "1@pump",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + killmonster instance_mapname("1@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; end; OnTimer49500: //OnTimer50000 clashes with the timer in "Missing, the Cleaner#h". - donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnAddSeaweed"; - donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnClear"; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnAddSeaweed"; + donpcevent instance_npcname(strnpcinfo(0))+"::OnClear"; + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnTouch: + specialeffect EF_MAPPILLAR2; end; } -1@pump,68,124,4 duplicate(#Culvert_n1) #Culvert_n2 844 -1@pump,80,114,4 duplicate(#Culvert_n1) #Culvert_n3 844 -1@pump,40,80,4 duplicate(#Culvert_n1) #Culvert_n4 844 -1@pump,75,80,4 duplicate(#Culvert_n1) #Culvert_n5 844 -1@pump,58,101,4 duplicate(#Culvert_n1) #Culvert_n6 844 +1@pump,68,124,4 duplicate(#Culvert_n1) #Culvert_n2 844,14,14 +1@pump,80,114,4 duplicate(#Culvert_n1) #Culvert_n3 844,14,14 +1@pump,40,80,4 duplicate(#Culvert_n1) #Culvert_n4 844,14,14 +1@pump,75,80,4 duplicate(#Culvert_n1) #Culvert_n5 844,14,14 +1@pump,58,101,4 duplicate(#Culvert_n1) #Culvert_n6 844,14,14 1@pump,1,1,4 script Boss Creation#n -1,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); + enablenpc instance_npcname(strnpcinfo(0)); initnpctimer; end; OnTimer100: set .@i$, charat(strnpcinfo(2),0); if (.@i$ == "n") - instance_announce 0,"Hmm! That wasn't so bad!",bc_map,"0xff88ff",FW_NORMAL,15; + mapannounce instance_mapname("1@pump"),"Hmm! That wasn't so bad!",bc_map,"0xff88ff",FW_NORMAL,15; else if (.@i$ == "h") - instance_announce 0,"Hmm! You guys are pretty good!!",bc_map,"0xff88ff",FW_NORMAL,15; + mapannounce instance_mapname("2@pump"),"Hmm! You guys are pretty good!!",bc_map,"0xff88ff",FW_NORMAL,15; end; OnTimer5000: - instance_announce 0,"Let's pack up and go... WHAT!!?",bc_map,"0xff88ff",FW_NORMAL,15; + mapannounce strnpcinfo(4),"Let's pack up and go... WHAT!!?",bc_map,"0xff88ff",FW_NORMAL,15; end; OnTimer10000: - instance_announce 0,"I sense something strange!! Don't loosen up-- prepare for a fight!!",bc_map,"0xff88ff",FW_NORMAL,15; + mapannounce strnpcinfo(4),"I sense something strange!! Don't loosen up-- prepare for a fight!!",bc_map,"0xff88ff",FW_NORMAL,15; end; OnTimer20000: stopnpctimer; set .@i$, charat(strnpcinfo(2),0); - set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; if (rand(1,100) > 50) { if (.@i$ == "n") - monster "1@pump",0,0,"Weird Coelacanth",2188,1,.@label$; + monster instance_mapname("1@pump"),0,0,"Weird Coelacanth",2188,1,.@label$; else if (.@i$ == "h") - monster "2@pump",0,0,"Mutant Coelacanth",2189,1,.@label$; - instance_announce 0,"Something big inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15; + monster instance_mapname("2@pump"),0,0,"Mutant Coelacanth",2189,1,.@label$; + mapannounce strnpcinfo(4),"Something big inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15; } else { if (.@i$ == "n") - monster "1@pump",0,0,"Gloomy Coelacanth",2187,1,.@label$; + monster instance_mapname("1@pump"),0,0,"Gloomy Coelacanth",2187,1,.@label$; else if (.@i$ == "h") - monster "2@pump",0,0,"Violent Coelacanth",2190,1,.@label$; - instance_announce 0,"Something savage inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15; + monster instance_mapname("2@pump"),0,0,"Violent Coelacanth",2190,1,.@label$; + mapannounce strnpcinfo(4),"Something savage inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15; } end; OnMyMobDead: - if (mobcount(strnpcinfo(4),instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") < 1) { - instance_announce 0,"You've destroyed all monsters in the culverts. There are trophies lying on the ground, please look for them.",bc_map,"0xffff00",FW_NORMAL,15; + if (mobcount(strnpcinfo(4),instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) { + mapannounce strnpcinfo(4),"You've destroyed all monsters in the culverts. There are trophies lying on the ground, please look for them.",bc_map,"0xffff00",FW_NORMAL,15; set .@i$, charat(strnpcinfo(2),0); set .@map$, strnpcinfo(4); - enablenpc instance_npcname("Culvert Entrance#"+.@i$, instance_id()); - enablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o", instance_id()); + enablenpc instance_npcname("Culvert Entrance#"+.@i$); + enablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o"); if (.@i$ == "n") { for(set .@i,0; .@i<10; set .@i,.@i+1) { set .@j, rand(1,6401); @@ -883,7 +847,7 @@ OnMyMobDead: } } } else - instance_announce 0,"There are still monsters alive.",bc_map,"0x00ff99",FW_NORMAL,20; + mapannounce strnpcinfo(4),"There are still monsters alive.",bc_map,"0x00ff99",FW_NORMAL,20; end; } @@ -917,14 +881,14 @@ OnMyMobDead: mes "If Tomas closes this down, we will lose our jobs!"; close; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; } 1@pump,32,100,0 script Culvert Entrance#n 45,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnTouch: warp "mal_in01",161,32; @@ -944,40 +908,39 @@ OnInstanceInit: 2@pump,39,88,4 script Missing, the Cleaner#h 545,{ callfunc "F_mal_missing"; - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnStart"; + donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnStart"; close; -OnInstanceInit: - enablenpc instance_npcname("Missing, the Cleaner#h", instance_id()); - end; OnStart: - killmonster "2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"; - disablenpc instance_npcname("Missing, the Cleaner#h", instance_id()); + killmonster instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"; + disablenpc instance_npcname("Missing, the Cleaner#h"); initnpctimer; end; OnAddSeaweed: - areamonster "2@pump",75,78,85,88,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"; - set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"); + set .@map$, instance_mapname("2@pump"); + areamonster .@map$,75,78,85,88,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"; + set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail"; else - instance_announce 0,"Proliferous Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20; + mapannounce .@map$,"Proliferous Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20; end; OnMyMobDead: end; OnFail: stopnpctimer; - donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnClear"; - killmonster "2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"; - enablenpc instance_npcname("Missing, the Cleaner#hf", instance_id()); - instance_announce 0,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15; - disablenpc instance_npcname("Missing, the Cleaner#h", instance_id()); + donpcevent instance_npcname("Monster Hole#h")+"::OnClear"; + set .@map$, instance_mapname("2@pump"); + killmonster .@map$, instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"; + enablenpc instance_npcname("Missing, the Cleaner#hf"); + mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15; + disablenpc instance_npcname("Missing, the Cleaner#h"); end; OnTimer100: - instance_announce 0,"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15; + mapannounce instance_mapname("2@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15; end; OnTimer5500: - instance_announce 0,"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15; - donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn"; + mapannounce instance_mapname("2@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15; + donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn"; end; OnTimer35000: OnTimer75000: @@ -988,12 +951,12 @@ OnTimer235000: OnTimer275000: OnTimer315000: OnTimer355000: - instance_announce 0,"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15; + mapannounce instance_mapname("2@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15; end; OnTimer40000: OnTimer80000: OnTimer120000: - donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn"; + donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn"; end; OnTimer160000: OnTimer200000: @@ -1001,36 +964,37 @@ OnTimer240000: OnTimer280000: OnTimer320000: OnTimer360000: - set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"); + set .@mob_dead_num, mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail"; else - donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn"; + donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn"; end; OnTimer420000: - instance_announce 0,"It seems Missing will come and inspect the results of the cleaning soon. Shall we clean up the mess around here?",bc_map,"0xff3333",FW_NORMAL,20; + mapannounce instance_mapname("2@pump"),"It seems Missing will come and inspect the results of the cleaning soon. Shall we clean up the mess around here?",bc_map,"0xff3333",FW_NORMAL,20; end; OnTimer425000: stopnpctimer; - set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead"); + set .@mob_dead_num, mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead"); if (.@mob_dead_num >= 6) - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail"; + donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail"; else - donpcevent instance_npcname("Boss Creation#h", instance_id())+"::OnEnable"; + donpcevent instance_npcname("Boss Creation#h")+"::OnEnable"; end; } -2@pump,53,114,4 script #Culvert_h1 844,{ +2@pump,53,114,4 script #Culvert_h1 844,14,14,{ //temporary workaround for ALL_SAMEMAP progressbar "0xFFFF00",15; stopnpctimer; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); - set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + enablenpc instance_npcname(strnpcinfo(0)); + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; + set .@map$, instance_mapname("2@pump"); set .@index, atoi(substr(strnpcinfo(2),9,getstrlen(strnpcinfo(2))-1)); switch(.@index) { case 1: setarray .@c[0],49,110,57,118; break; @@ -1044,12 +1008,12 @@ OnEnable: case 9: setarray .@c[0],96,70,104,78; break; case 10: setarray .@c[0],111,46,119,54; break; } - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Marc",2182,rand(2,3),.@label$; - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Sword Fish",2181,rand(2,3),.@label$; - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Strouf",2180,rand(2,3),.@label$; - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Mutant Anolian",2183,rand(2,3),.@label$; - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Obeaune",2184,rand(2,3),.@label$; - areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Metamorphous Kapha",2185,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Marc",2182,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Sword Fish",2181,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Strouf",2180,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Mutant Anolian",2183,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Obeaune",2184,rand(2,3),.@label$; + areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Metamorphous Kapha",2185,rand(2,3),.@label$; specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken initnpctimer; end; @@ -1057,23 +1021,26 @@ OnMyMobDead: end; OnClear: stopnpctimer; - killmonster "2@pump",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + killmonster instance_mapname("2@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; end; OnTimer39500: //OnTimer40000 clashes with the timer in "Missing, the Cleaner#h". - donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnAddSeaweed"; - donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnClear"; - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnAddSeaweed"; + donpcevent instance_npcname(strnpcinfo(0))+"::OnClear"; + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnTouch: + specialeffect EF_MAPPILLAR2; end; } -2@pump,79,109,4 duplicate(#Culvert_h1) #Culvert_h2 844 -2@pump,114,114,4 duplicate(#Culvert_h1) #Culvert_h3 844 -2@pump,98,98,4 duplicate(#Culvert_h1) #Culvert_h4 844 -2@pump,62,96,4 duplicate(#Culvert_h1) #Culvert_h5 844 -2@pump,57,70,4 duplicate(#Culvert_h1) #Culvert_h6 844 -2@pump,47,49,4 duplicate(#Culvert_h1) #Culvert_h7 844 -2@pump,81,63,4 duplicate(#Culvert_h1) #Culvert_h8 844 -2@pump,100,74,4 duplicate(#Culvert_h1) #Culvert_h9 844 -2@pump,115,50,4 duplicate(#Culvert_h1) #Culvert_h10 844 +2@pump,79,109,4 duplicate(#Culvert_h1) #Culvert_h2 844,14,14 +2@pump,114,114,4 duplicate(#Culvert_h1) #Culvert_h3 844,14,14 +2@pump,98,98,4 duplicate(#Culvert_h1) #Culvert_h4 844,14,14 +2@pump,62,96,4 duplicate(#Culvert_h1) #Culvert_h5 844,14,14 +2@pump,57,70,4 duplicate(#Culvert_h1) #Culvert_h6 844,14,14 +2@pump,47,49,4 duplicate(#Culvert_h1) #Culvert_h7 844,14,14 +2@pump,81,63,4 duplicate(#Culvert_h1) #Culvert_h8 844,14,14 +2@pump,100,74,4 duplicate(#Culvert_h1) #Culvert_h9 844,14,14 +2@pump,115,50,4 duplicate(#Culvert_h1) #Culvert_h10 844,14,14 2@pump,1,1,4 duplicate(Monster Hole#n) Monster Hole#h -1 2@pump,1,1,4 duplicate(Boss Creation#n) Boss Creation#h -1 diff --git a/npc/re/instances/OctopusCave.txt b/npc/re/instances/OctopusCave.txt index 7eaf25a9c..c6216bfb3 100644 --- a/npc/re/instances/OctopusCave.txt +++ b/npc/re/instances/OctopusCave.txt @@ -1,18 +1,20 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ====================================== //= Octopus Cave //===== By: ================================================== //= Muad_Dib //===== Current Version: ===================================== -//= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN +//= 1.1 //===== Description: ========================================= //= [Official Conversion] //= Defeat the Disgusting Octopus. //===== Additional Comments: ================================= //= 1.0 First version. [Euphy] +//= 1.1 Instance system rewrite. [Euphy] //============================================================ +1@cash mapflag src4instance +//============================================================ + // Instance Creation //============================================================ mal_dun01,151,235,5 script Starfish 551,{ @@ -39,7 +41,7 @@ mal_dun01,151,235,5 script Starfish 551,{ mes "It is just roughly blocked for now."; mes "But someday this cave must be sealed forever, hehe!"; next; - while (1) { + while(1) { switch(select("Ask what's going on.:Ask to open the gate.:Go to other location.")) { case 1: mes "[Starfish]"; @@ -83,7 +85,7 @@ mal_dun01,151,235,5 script Starfish 551,{ } if (.@playtime == 2) erasequest 4197; if (countitem(6442)) { - set .@instance, instance_create(.@md_name$,.@party_id); + set .@instance,instance_create(.@md_name$,.@party_id); if (.@instance < 0) { mes "[Starfish]"; mes "Party name is... "+getpartyname(.@party_id)+"."; @@ -97,32 +99,9 @@ mal_dun01,151,235,5 script Starfish 551,{ instance_destroy(.@instance); close; } - instance_attach(.@instance); instance_set_timeout 3600,300,.@instance; instance_init(.@instance); - - donpcevent instance_npcname("oct_enter", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot_exit1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot_exit2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot_exit3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_foot_exit4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_backattack1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_backattack2", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_backattack3", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_backattack4", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_boss_warp", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_exit_1", instance_id())+"::OnInstanceInit"; - donpcevent instance_npcname("oct_exit_2", instance_id())+"::OnInstanceInit"; - + mes "[Starfish]"; mes "I will open the gate for a while to ^0000ff"+.@md_name$+"^000000."; mes "Please catch that pervert octopus,"; @@ -150,7 +129,6 @@ mal_dun01,153,237,5 script Weird Entrance 844,{ switch(select("Go in.:Stop.")) { case 1: if (countitem(6442)) { - // TODO: Add official MD_Enter cases. if (has_instance("1@cash") == "") { if (checkquest(4197,PLAYTIME) == 0 || checkquest(4197,PLAYTIME) == 1) { mes "[Starfish]"; @@ -167,7 +145,7 @@ mal_dun01,153,237,5 script Weird Entrance 844,{ mapannounce "mal_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member started to hunt the Octopus!",bc_map,"0x00ff99"; if (checkquest(4197) == -1) setquest 4197; warp "1@cash",199,99; - close; + end; } mes "[Starfish]"; mes "You should definitely prepare"; @@ -186,169 +164,170 @@ mal_dun01,153,237,5 script Weird Entrance 844,{ //============================================================ 1@cash,199,99,0 script oct_enter 139,4,4,{ end; -OnInstanceInit: - enablenpc instance_npcname("oct_enter", instance_id()); - end; OnTouch: - donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnEnable"; + donpcevent instance_npcname("oct_enter_broad")+"::OnEnable"; specialeffect EF_BASH; - disablenpc instance_npcname("oct_enter", instance_id()); + disablenpc instance_npcname("oct_enter"); end; } 1@cash,1,1,0 script oct_enter_broad -1,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_enter_broad")+"::OnDisable"; end; OnEnable: - enablenpc instance_npcname("oct_enter_broad", instance_id()); - donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnEnable"; + enablenpc instance_npcname("oct_enter_broad"); + donpcevent instance_npcname("oct_foot_4")+"::OnEnable"; + donpcevent instance_npcname("oct_mob_con")+"::OnEnable"; initnpctimer; end; OnDisable: - disablenpc instance_npcname("oct_enter_broad", instance_id()); + disablenpc instance_npcname("oct_enter_broad"); end; OnTimer1000: - instance_announce 0,"Pervert Octopus : How dare you to come inside of my place!",bc_map,"0xFFFF00"; + mapannounce instance_mapname("1@cash"),"Pervert Octopus : How dare you to come inside of my place!",bc_map,"0xFFFF00"; end; OnTimer4000: - instance_announce 0,"Pervert Octopus : But I blocked all the cave gates!! There is nothing you can do!",bc_map,"0xFFFF00"; + mapannounce instance_mapname("1@cash"),"Pervert Octopus : But I blocked all the cave gates!! There is nothing you can do!",bc_map,"0xFFFF00"; end; OnTimer7000: - instance_announce 0,"Pervert Octopus : My juniors~ There is your toy! Play with it~ kakaka",bc_map,"0xFFFF00"; + mapannounce instance_mapname("1@cash"),"Pervert Octopus : My juniors~ There is your toy! Play with it~ kakaka",bc_map,"0xFFFF00"; stopnpctimer; - donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_enter_broad")+"::OnDisable"; end; } 1@cash,3,3,0 script oct_foot_4 -1,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_foot_4")+"::OnDisable"; end; OnEnable: - enablenpc instance_npcname("oct_foot_4", instance_id()); - donpcevent instance_npcname("oct_foot1", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_foot2", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_foot3", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_foot4", instance_id())+"::OnEnable"; - monster "1@cash",20,114,"Octopus Leg#1",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead"; - monster "1@cash",88,190,"Octopus Leg#2",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead"; - monster "1@cash",307,215,"Octopus Leg#3",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead"; - monster "1@cash",372,131,"Octopus Leg#4",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead"; + enablenpc instance_npcname("oct_foot_4"); + donpcevent instance_npcname("oct_foot1")+"::OnEnable"; + donpcevent instance_npcname("oct_foot2")+"::OnEnable"; + donpcevent instance_npcname("oct_foot3")+"::OnEnable"; + donpcevent instance_npcname("oct_foot4")+"::OnEnable"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,20,114,"Octopus Leg#1",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead"; + monster .@map$,88,190,"Octopus Leg#2",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead"; + monster .@map$,307,215,"Octopus Leg#3",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead"; + monster .@map$,372,131,"Octopus Leg#4",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead"; end; OnDisable: - disablenpc instance_npcname("oct_foot_4", instance_id()); + disablenpc instance_npcname("oct_foot_4"); end; OnMyMobDead: - if (mobcount("1@cash",instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead") < 1) { - donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnEnable"; - instance_announce 0,"Hey you!! I'll personally take care of you all! Let's bring it on!",bc_map,"0x00ff99"; - enablenpc instance_npcname("oct_boss_warp", instance_id()); - instance_warpall "1@cash",199,99; + set .@map$, instance_mapname("1@cash"); + if (mobcount(.@map$,instance_npcname("oct_foot_4")+"::OnMyMobDead") < 1) { + donpcevent instance_npcname("oct_boss_con")+"::OnEnable"; + mapannounce .@map$,"Hey you!! I'll personally take care of you all! Let's bring it on!",bc_map,"0x00ff99"; + enablenpc instance_npcname("oct_boss_warp"); + instance_warpall .@map$,199,99; end; } - instance_announce 0,"Arrgg!! That hurts!!! I need another strategy...",bc_map,"0x00ff99"; + mapannounce .@map$,"Arrgg!! That hurts!!! I need another strategy...",bc_map,"0x00ff99"; end; } 1@cash,20,114,0 script oct_foot1 139,6,6,{ end; OnInstanceInit: - donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable"; + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; end; OnEnable: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); - set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + enablenpc instance_npcname(strnpcinfo(0)); + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@i, atoi(charat(strnpcinfo(0),8)); + set .@map$, instance_mapname("1@cash"); switch(.@i) { case 1: - areamonster "1@cash",34,96,38,100,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",39,90,41,92,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",38,76,40,78,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",39,58,41,60,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",50,38,56,44,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",68,32,72,36,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",83,26,85,28,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",107,28,109,30,"Octopus's Henchman",2192,1,.@label$; - areamonster "1@cash",123,28,125,30,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",134,31,138,35,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",142,39,146,43,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,34,96,38,100,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,39,90,41,92,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,38,76,40,78,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,39,58,41,60,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,50,38,56,44,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,68,32,72,36,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,83,26,85,28,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,107,28,109,30,"Octopus's Henchman",2192,1,.@label$; + areamonster .@map$,123,28,125,30,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,134,31,138,35,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,142,39,146,43,"Octopus's Henchman",2192,2,.@label$; break; case 2: - areamonster "1@cash",139,113,143,117,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",135,104,137,106,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",123,93,127,97,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",113,90,115,92,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",103,89,105,91,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",89,90,91,92,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",74,104,76,106,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",74,120,76,122,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",83,131,87,135,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",92,142,94,144,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",98,159,100,161,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",94,180,98,184,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,139,113,143,117,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,135,104,137,106,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,123,93,127,97,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,113,90,115,92,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,103,89,105,91,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,89,90,91,92,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,74,104,76,106,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,74,120,76,122,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,83,131,87,135,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,92,142,94,144,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,98,159,100,161,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,94,180,98,184,"Octopus's Henchman",2192,5,.@label$; break; case 3: - areamonster "1@cash",299,209,303,213,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",292,203,296,207,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",291,186,293,188,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",292,166,294,168,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",293,151,295,153,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",299,137,303,141,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",300,123,304,127,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",300,104,304,108,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",279,101,281,103,"Octopus's Henchman",2192,2,.@label$; - monster "1@cash",260,103,"Octopus's Henchman",2192,1,.@label$; + areamonster .@map$,299,209,303,213,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,292,203,296,207,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,291,186,293,188,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,292,166,294,168,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,293,151,295,153,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,299,137,303,141,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,300,123,304,127,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,300,104,304,108,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,279,101,281,103,"Octopus's Henchman",2192,2,.@label$; + monster .@map$,260,103,"Octopus's Henchman",2192,1,.@label$; break; case 4: - areamonster "1@cash",363,123,367,127,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",364,108,368,112,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",363,93,367,97,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",364,72,366,74,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",364,58,366,60,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",355,44,359,48,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",346,36,350,40,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",319,28,325,34,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",305,27,307,29,"Octopus's Henchman",2192,2,.@label$; - areamonster "1@cash",276,29,280,33,"Octopus's Henchman",2192,5,.@label$; - areamonster "1@cash",258,37,262,41,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,363,123,367,127,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,364,108,368,112,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,363,93,367,97,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,364,72,366,74,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,364,58,366,60,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,355,44,359,48,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,346,36,350,40,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,319,28,325,34,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,305,27,307,29,"Octopus's Henchman",2192,2,.@label$; + areamonster .@map$,276,29,280,33,"Octopus's Henchman",2192,5,.@label$; + areamonster .@map$,258,37,262,41,"Octopus's Henchman",2192,2,.@label$; break; } end; OnDisable: - killmonster "1@cash",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; // Not in official script. - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + killmonster instance_mapname("1@cash"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; // Not in official script. + disablenpc instance_npcname(strnpcinfo(0)); end; OnTouch: if (getd("."+strnpcinfo(0)+instance_id())) end; setd "."+strnpcinfo(0)+instance_id(),1; - hideonnpc instance_npcname(strnpcinfo(0), instance_id()); - instance_announce 0,"Come out all my babies and help me out!",bc_map,"0xFFFF00"; + hideonnpc instance_npcname(strnpcinfo(0)); + mapannounce instance_mapname("1@cash"),"Come out all my babies and help me out!",bc_map,"0xFFFF00"; initnpctimer; end; OnTimer5000: - instance_announce 0,"Let's give them a lesson!",bc_map,"0xFFFF00"; - set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; + set .@map$, instance_mapname("1@cash"); + mapannounce .@map$,"Let's give them a lesson!",bc_map,"0xFFFF00"; + set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; set .@i, atoi(charat(strnpcinfo(0),8)); switch(.@i) { case 1: - areamonster "1@cash",18,112,22,116,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",18,112,22,116,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,18,112,22,116,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,18,112,22,116,"Octopus's Henchman",2192,3,.@label$; break; case 2: - areamonster "1@cash",86,188,90,192,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",96,98,100,102,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,86,188,90,192,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,96,98,100,102,"Octopus's Henchman",2192,3,.@label$; break; case 3: - areamonster "1@cash",305,213,309,217,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",305,213,309,217,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,305,213,309,217,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,305,213,309,217,"Octopus's Henchman",2192,3,.@label$; break; case 4: - areamonster "1@cash",370,129,374,133,"Octopus's Henchman",2192,3,.@label$; - areamonster "1@cash",370,129,374,133,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,370,129,374,133,"Octopus's Henchman",2192,3,.@label$; + areamonster .@map$,370,129,374,133,"Octopus's Henchman",2192,3,.@label$; break; } end; @@ -356,17 +335,18 @@ OnTimer30000: setd "."+strnpcinfo(0)+instance_id(),0; stopnpctimer; set .@i, atoi(charat(strnpcinfo(0),8)); - donpcevent instance_npcname("oct_foot_exit"+.@i, instance_id())+"::OnEnable"; - donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"; + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; end; OnMyMobDead: - if (mobcount("1@cash",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") < 1) { - instance_announce 0,"You hurt my babies!!? You'll have to pay for this!!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) { + mapannounce .@map$,"You hurt my babies!!? You'll have to pay for this!!!",bc_map,"0x00ff99"; setd "."+strnpcinfo(0)+instance_id(),0; stopnpctimer; set .@i, atoi(charat(strnpcinfo(0),8)); - donpcevent instance_npcname("oct_foot_exit"+.@i, instance_id())+"::OnEnable"; - donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"; + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; end; } end; @@ -378,13 +358,13 @@ OnMyMobDead: 1@cash,16,117,0 script oct_foot_exit1 45,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(0), instance_id()); + enablenpc instance_npcname(strnpcinfo(0)); end; OnTouch: - warp "1@cash",198,99; + warp instance_mapname("1@cash"),198,99; end; } 1@cash,77,193,0 duplicate(oct_foot_exit1) oct_foot_exit2 45,2,2 @@ -394,196 +374,205 @@ OnTouch: 1@cash,15,15,0 script oct_mob_con -1,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_mob_con")+"::OnDisable"; end; OnEnable: - enablenpc instance_npcname("oct_mob_con", instance_id()); - monster "1@cash",32,94,"Hydra",1068,1; - monster "1@cash",41,101,"Hydra",1068,1; - monster "1@cash",35,78,"Hydra",1068,1; - monster "1@cash",35,62,"Hydra",1068,1; - monster "1@cash",49,54,"Hydra",1068,1; - monster "1@cash",70,28,"Hydra",1068,1; - monster "1@cash",83,22,"Hydra",1068,1; - monster "1@cash",99,23,"Hydra",1068,1; - monster "1@cash",115,23,"Hydra",1068,1; - monster "1@cash",132,25,"Hydra",1068,1; - monster "1@cash",100,185,"Hydra",1068,1; - monster "1@cash",92,178,"Hydra",1068,1; - monster "1@cash",92,162,"Hydra",1068,1; - monster "1@cash",70,121,"Hydra",1068,1; - monster "1@cash",70,105,"Hydra",1068,1; - monster "1@cash",105,85,"Hydra",1068,1; - monster "1@cash",121,84,"Hydra",1068,1; - monster "1@cash",292,209,"Hydra",1068,1; - monster "1@cash",303,206,"Hydra",1068,1; - monster "1@cash",290,163,"Hydra",1068,1; - monster "1@cash",299,150,"Hydra",1068,1; - monster "1@cash",308,141,"Hydra",1068,1; - monster "1@cash",308,125,"Hydra",1068,1; - monster "1@cash",295,97,"Hydra",1068,1; - monster "1@cash",279,97,"Hydra",1068,1; - monster "1@cash",370,111,"Hydra",1068,1; - monster "1@cash",370,110,"Hydra",1068,1; - monster "1@cash",371,96,"Hydra",1068,1; - monster "1@cash",371,80,"Hydra",1068,1; - monster "1@cash",367,55,"Hydra",1068,1; - monster "1@cash",343,29,"Hydra",1068,1; - monster "1@cash",327,24,"Hydra",1068,1; - monster "1@cash",311,22,"Hydra",1068,1; - monster "1@cash",295,22,"Hydra",1068,1; - monster "1@cash",279,22,"Hydra",1068,1; - areamonster "1@cash",30,67,50,87,"Stapo",1784,1; - areamonster "1@cash",102,19,122,39,"Stapo",1784,1; - areamonster "1@cash",89,138,109,158,"Stapo",1784,1; - areamonster "1@cash",112,83,132,103,"Stapo",1784,1; - areamonster "1@cash",283,168,303,188,"Stapo",1784,1; - areamonster "1@cash",292,97,312,117,"Stapo",1784,1; - areamonster "1@cash",355,64,375,84,"Stapo",1784,1; - areamonster "1@cash",317,17,337,37,"Stapo",1784,1; - donpcevent instance_npcname("oct_backattack1", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_backattack2", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_backattack3", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_backattack4", instance_id())+"::OnEnable"; - donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnDisable"; + set .@map$, instance_mapname("1@cash"); + enablenpc instance_npcname("oct_mob_con"); + monster .@map$,32,94,"Hydra",1068,1; + monster .@map$,41,101,"Hydra",1068,1; + monster .@map$,35,78,"Hydra",1068,1; + monster .@map$,35,62,"Hydra",1068,1; + monster .@map$,49,54,"Hydra",1068,1; + monster .@map$,70,28,"Hydra",1068,1; + monster .@map$,83,22,"Hydra",1068,1; + monster .@map$,99,23,"Hydra",1068,1; + monster .@map$,115,23,"Hydra",1068,1; + monster .@map$,132,25,"Hydra",1068,1; + monster .@map$,100,185,"Hydra",1068,1; + monster .@map$,92,178,"Hydra",1068,1; + monster .@map$,92,162,"Hydra",1068,1; + monster .@map$,70,121,"Hydra",1068,1; + monster .@map$,70,105,"Hydra",1068,1; + monster .@map$,105,85,"Hydra",1068,1; + monster .@map$,121,84,"Hydra",1068,1; + monster .@map$,292,209,"Hydra",1068,1; + monster .@map$,303,206,"Hydra",1068,1; + monster .@map$,290,163,"Hydra",1068,1; + monster .@map$,299,150,"Hydra",1068,1; + monster .@map$,308,141,"Hydra",1068,1; + monster .@map$,308,125,"Hydra",1068,1; + monster .@map$,295,97,"Hydra",1068,1; + monster .@map$,279,97,"Hydra",1068,1; + monster .@map$,370,111,"Hydra",1068,1; + monster .@map$,370,110,"Hydra",1068,1; + monster .@map$,371,96,"Hydra",1068,1; + monster .@map$,371,80,"Hydra",1068,1; + monster .@map$,367,55,"Hydra",1068,1; + monster .@map$,343,29,"Hydra",1068,1; + monster .@map$,327,24,"Hydra",1068,1; + monster .@map$,311,22,"Hydra",1068,1; + monster .@map$,295,22,"Hydra",1068,1; + monster .@map$,279,22,"Hydra",1068,1; + areamonster .@map$,30,67,50,87,"Stapo",1784,1; + areamonster .@map$,102,19,122,39,"Stapo",1784,1; + areamonster .@map$,89,138,109,158,"Stapo",1784,1; + areamonster .@map$,112,83,132,103,"Stapo",1784,1; + areamonster .@map$,283,168,303,188,"Stapo",1784,1; + areamonster .@map$,292,97,312,117,"Stapo",1784,1; + areamonster .@map$,355,64,375,84,"Stapo",1784,1; + areamonster .@map$,317,17,337,37,"Stapo",1784,1; + donpcevent instance_npcname("oct_backattack1")+"::OnEnable"; + donpcevent instance_npcname("oct_backattack2")+"::OnEnable"; + donpcevent instance_npcname("oct_backattack3")+"::OnEnable"; + donpcevent instance_npcname("oct_backattack4")+"::OnEnable"; + donpcevent instance_npcname("oct_mob_con")+"::OnDisable"; end; OnDisable: - disablenpc instance_npcname("oct_mob_con", instance_id()); + disablenpc instance_npcname("oct_mob_con"); end; } 1@cash,45,53,0 script oct_backattack1 139,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack1", instance_id()); + disablenpc instance_npcname("oct_backattack1"); end; OnTouch: - monster "1@cash",39,59,"Hydra",1068,1; - monster "1@cash",40,59,"Hydra",1068,1; - monster "1@cash",41,59,"Hydra",1068,1; - monster "1@cash",47,50,"Hydra",1068,1; - monster "1@cash",48,50,"Hydra",1068,1; - monster "1@cash",49,50,"Hydra",1068,1; - monster "1@cash",41,53,"Octopus's Henchman",2192,1; - instance_announce 0,"Don't let them break through, stop them!!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,39,59,"Hydra",1068,1; + monster .@map$,40,59,"Hydra",1068,1; + monster .@map$,41,59,"Hydra",1068,1; + monster .@map$,47,50,"Hydra",1068,1; + monster .@map$,48,50,"Hydra",1068,1; + monster .@map$,49,50,"Hydra",1068,1; + monster .@map$,41,53,"Octopus's Henchman",2192,1; + mapannounce .@map$,"Don't let them break through, stop them!!!",bc_map,"0x00ff99"; specialeffect EF_BASH; - disablenpc instance_npcname("oct_backattack1", instance_id()); + disablenpc instance_npcname("oct_backattack1"); end; OnEnable: - enablenpc instance_npcname("oct_backattack1", instance_id()); + enablenpc instance_npcname("oct_backattack1"); end; } 1@cash,78,99,0 script oct_backattack2 139,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack2", instance_id()); + disablenpc instance_npcname("oct_backattack2"); end; OnTouch: if (getd("."+instance_id())) end; setd "."+instance_id(),1; initnpctimer; - monster "1@cash",71,105,"Octopus's Henchman ",2192,1; - instance_announce 0,"Headquarters are empty, GO!!!",bc_map,"0x00ff99"; - hideonnpc instance_npcname("oct_backattack2", instance_id()); + set .@map$, instance_mapname("1@cash"); + monster .@map$,71,105,"Octopus's Henchman ",2192,1; + mapannounce .@map$,"Headquarters are empty, GO!!!",bc_map,"0x00ff99"; + hideonnpc instance_npcname("oct_backattack2"); end; OnTimer2000: - monster "1@cash",71,105,"Octopus's Henchman ",2192,1; - instance_announce 0,"Run, RUN! Go, GO!!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,71,105,"Octopus's Henchman ",2192,1; + mapannounce .@map$,"Run, RUN! Go, GO!!!",bc_map,"0x00ff99"; end; OnTimer4000: - monster "1@cash",71,105,"Octopus's Henchman ",2192,1; - instance_announce 0,"No time, come out fast!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,71,105,"Octopus's Henchman ",2192,1; + mapannounce .@map$,"No time, come out fast!",bc_map,"0x00ff99"; end; OnTimer6000: - monster "1@cash",71,105,"Octopus's Henchman ",2192,3; - instance_announce 0,"Let's take over the headquarters!!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,71,105,"Octopus's Henchman ",2192,3; + mapannounce .@map$,"Let's take over the headquarters!!!",bc_map,"0x00ff99"; end; OnTimer8000: - monster "1@cash",71,105,"Octopus's Henchman ",2192,1; - instance_announce 0,"There is no time to lose, hurry up!!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,71,105,"Octopus's Henchman ",2192,1; + mapannounce .@map$,"There is no time to lose, hurry up!!!",bc_map,"0x00ff99"; stopnpctimer; end; OnEnable: - enablenpc instance_npcname("oct_backattack2", instance_id()); + enablenpc instance_npcname("oct_backattack2"); end; } 1@cash,299,144,0 script oct_backattack3 139,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack2", instance_id()); + disablenpc instance_npcname("oct_backattack3"); end; OnTouch: if (getd("."+instance_id())) end; setd "."+instance_id(),1; - monster "1@cash",293,153,"Octopus's Henchman ",2192,1; - monster "1@cash",294,152,"Octopus's Henchman ",2192,1; - monster "1@cash",292,153,"Octopus's Henchman ",2192,1; - monster "1@cash",293,151,"Octopus's Henchman ",2192,1; - monster "1@cash",293,152,"Octopus's Henchman ?",2175,1; - instance_announce 0,"Kakaka! Suprised??!!",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,293,153,"Octopus's Henchman ",2192,1; + monster .@map$,294,152,"Octopus's Henchman ",2192,1; + monster .@map$,292,153,"Octopus's Henchman ",2192,1; + monster .@map$,293,151,"Octopus's Henchman ",2192,1; + monster .@map$,293,152,"Octopus's Henchman ?",2175,1; + mapannounce .@map$,"Kakaka! Suprised??!!",bc_map,"0x00ff99"; initnpctimer; - hideonnpc instance_npcname("oct_backattack3", instance_id()); + hideonnpc instance_npcname("oct_backattack3"); end; OnTimer5000: - instance_announce 0,"... Looks like we have a spy among us.",bc_map,"0x00ff99"; + mapannounce instance_mapname("1@cash"),"... Looks like we have a spy among us.",bc_map,"0x00ff99"; stopnpctimer; end; OnEnable: - enablenpc instance_npcname("oct_backattack3", instance_id()); + enablenpc instance_npcname("oct_backattack3"); end; } 1@cash,336,36,0 script oct_backattack4 139,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack2", instance_id()); + disablenpc instance_npcname("oct_backattack4"); end; OnTouch: if (getd("."+instance_id())) end; setd "."+instance_id(),1; - monster "1@cash",332,37,"Octopus's Henchman ",2192,1; - monster "1@cash",332,36,"Octopus's Henchman ",2192,1; - monster "1@cash",332,35,"Octopus's Henchman ",2192,1; - monster "1@cash",332,34,"Octopus's Henchman ",2192,1; - monster "1@cash",341,37,"Octopus's Henchman ",2192,1; - monster "1@cash",341,36,"Octopus's Henchman ",2192,1; - monster "1@cash",341,35,"Octopus's Henchman ",2192,1; - monster "1@cash",341,34,"Octopus's Henchman ",2192,1; - monster "1@cash",260,40,"Mercenary Squid",2175,1; - monster "1@cash",260,41,"Mercenary Squid",2175,1; - monster "1@cash",260,39,"Mercenary Squid",2175,1; - monster "1@cash",259,40,"Mercenary Squid",2175,1; - monster "1@cash",261,40,"Mercenary Squid",2175,1; - instance_announce 0,"What a successful pincer tactic! The enemy is strong! Let's not lose yourselves! Anyway, where are all the mercenaries??",bc_map,"0x00ff99"; + set .@map$, instance_mapname("1@cash"); + monster .@map$,332,37,"Octopus's Henchman ",2192,1; + monster .@map$,332,36,"Octopus's Henchman ",2192,1; + monster .@map$,332,35,"Octopus's Henchman ",2192,1; + monster .@map$,332,34,"Octopus's Henchman ",2192,1; + monster .@map$,341,37,"Octopus's Henchman ",2192,1; + monster .@map$,341,36,"Octopus's Henchman ",2192,1; + monster .@map$,341,35,"Octopus's Henchman ",2192,1; + monster .@map$,341,34,"Octopus's Henchman ",2192,1; + monster .@map$,260,40,"Mercenary Squid",2175,1; + monster .@map$,260,41,"Mercenary Squid",2175,1; + monster .@map$,260,39,"Mercenary Squid",2175,1; + monster .@map$,259,40,"Mercenary Squid",2175,1; + monster .@map$,261,40,"Mercenary Squid",2175,1; + mapannounce .@map$,"What a successful pincer tactic! The enemy is strong! Let's not lose yourselves! Anyway, where are all the mercenaries??",bc_map,"0x00ff99"; initnpctimer; - hideonnpc instance_npcname("oct_backattack4", instance_id()); + hideonnpc instance_npcname("oct_backattack4"); end; OnTimer5000: - instance_announce 0,"Mercenary Squid : eh...eh... wrong direction. No enemies are shown in this direction.",bc_map,"0x00ff99"; + mapannounce instance_mapname("1@cash"),"Mercenary Squid : eh...eh... wrong direction. No enemies are shown in this direction.",bc_map,"0x00ff99"; end; OnTimer7000: - instance_announce 0,"Pervert Octopus : Fools! Can't you read the map??!! Useless!!",bc_map,"0x00ff99"; + mapannounce instance_mapname("1@cash"),"Pervert Octopus : Fools! Can't you read the map??!! Useless!!",bc_map,"0x00ff99"; stopnpctimer; end; OnEnable: - enablenpc instance_npcname("oct_backattack4", instance_id()); + enablenpc instance_npcname("oct_backattack4"); end; } 1@cash,2,2,0 script oct_boss_con -1,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_boss_con")+"::OnDisable"; end; OnDisable: - disablenpc instance_npcname("oct_boss_con", instance_id()); + disablenpc instance_npcname("oct_boss_con"); end; OnEnable: - enablenpc instance_npcname("oct_boss_con", instance_id()); - donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnEnable"; - monster "1@cash",199,188,"Disgusting Octopus",2194,1,instance_npcname("oct_boss_con", instance_id())+"::OnMyMobDead"; + enablenpc instance_npcname("oct_boss_con"); + donpcevent instance_npcname("oct_boss_foot")+"::OnEnable"; + monster instance_mapname("1@cash"),199,188,"Disgusting Octopus",2194,1,instance_npcname("oct_boss_con")+"::OnMyMobDead"; initnpctimer; end; OnTimer7000: @@ -631,16 +620,17 @@ OnTimer49000: initnpctimer; end; OnAnnounce: - instance_announce 0,"Disgusting Octopus : "+getarg(rand(3)),bc_map,"0xFFFF00"; + mapannounce instance_mapname("1@cash"),"Disgusting Octopus : "+getarg(rand(3)),bc_map,"0xFFFF00"; return; OnMyMobDead: - if (mobcount("1@cash",instance_npcname("oct_boss_con", instance_id())+"::OnMyMobDead") < 1) { - instance_announce 0,"Disgusting Octopus : That's it for the today! Next time, I will play with you badly!",bc_map,"0xFFFF00"; - enablenpc instance_npcname("oct_exit_1", instance_id()); - enablenpc instance_npcname("oct_exit_2", instance_id()); - donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnDisable"; + set .@map$, instance_mapname("1@cash"); + if (mobcount(.@map$,instance_npcname("oct_boss_con")+"::OnMyMobDead") < 1) { + mapannounce .@map$,"Disgusting Octopus : That's it for the today! Next time, I will play with you badly!",bc_map,"0xFFFF00"; + enablenpc instance_npcname("oct_exit_1"); + enablenpc instance_npcname("oct_exit_2"); + donpcevent instance_npcname("oct_boss_foot")+"::OnDisable"; stopnpctimer; - donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_boss_con")+"::OnDisable"; end; } end; @@ -649,22 +639,23 @@ OnMyMobDead: 1@cash,4,4,0 script oct_boss_foot -1,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnDisable"; + donpcevent instance_npcname("oct_boss_foot")+"::OnDisable"; end; OnEnable: - enablenpc instance_npcname("oct_boss_foot", instance_id()); + enablenpc instance_npcname("oct_boss_foot"); initnpctimer; end; OnCall: - if (mobcount("1@cash",instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead") < 100) { + set .@map$, instance_mapname("1@cash"); + if (mobcount(.@map$,instance_npcname("oct_boss_foot")+"::OnMyMobDead") < 100) { switch(rand(2)) { case 0: - instance_announce 0,"Disgusting Octopus : Do you know how many legs octopus have? It doesn't matter, I have unlimited legs!!",bc_map,"0xFFFF00"; - areamonster "1@cash",192,181,206,195,"Octopus Leg",2193,1,instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead"; + mapannounce .@map$,"Disgusting Octopus : Do you know how many legs octopus have? It doesn't matter, I have unlimited legs!!",bc_map,"0xFFFF00"; + areamonster .@map$,192,181,206,195,"Octopus Leg",2193,1,instance_npcname("oct_boss_foot")+"::OnMyMobDead"; break; case 1: - instance_announce 0,"Disgusting Octopus : I...cannot..hold anymore, my babies~ please come out and fight!",bc_map,"0xFFFF00"; - areamonster "1@cash",192,181,206,195,"Octopus's Henchman ",2192,5,instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead"; + mapannounce .@map$,"Disgusting Octopus : I...cannot..hold anymore, my babies~ please come out and fight!",bc_map,"0xFFFF00"; + areamonster .@map$,192,181,206,195,"Octopus's Henchman ",2192,5,instance_npcname("oct_boss_foot")+"::OnMyMobDead"; break; } } @@ -672,12 +663,12 @@ OnCall: end; OnTimer10000: stopnpctimer; - donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnCall"; + donpcevent instance_npcname("oct_boss_foot")+"::OnCall"; end; OnDisable: stopnpctimer; - killmonster "1@cash",instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead"; // Not in official script. - disablenpc instance_npcname("oct_boss_foot", instance_id()); + killmonster instance_mapname("1@cash"),instance_npcname("oct_boss_foot")+"::OnMyMobDead"; // Not in official script. + disablenpc instance_npcname("oct_boss_foot"); end; OnMyMobDead: end; @@ -686,17 +677,17 @@ OnMyMobDead: 1@cash,198,116,0 script oct_boss_warp 45,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_boss_warp", instance_id()); + disablenpc instance_npcname("oct_boss_warp"); end; OnTouch: - warp "1@cash",210,172; + warp instance_mapname("1@cash"),210,172; end; } 1@cash,190,208,0 script oct_exit_1 45,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(0), instance_id()); + disablenpc instance_npcname(strnpcinfo(0)); end; OnTouch: mes "Do you want to go out from the octopus dungeon?"; diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt new file mode 100644 index 000000000..034749f46 --- /dev/null +++ b/npc/re/instances/OldGlastHeim.txt @@ -0,0 +1,2059 @@ +//===== Hercules Script ====================================== +//= Old Glast Heim +//===== By: ================================================== +//= Ziu, Heris (translation) +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= Discover the history of events that took place in the +//= Glast Heim castle and how it ended up in ruins. +//===== Additional Comments: ================================= +//= 1.0 First version. [Euphy] +//============================================================ + +1@gl_k mapflag src4instance +2@gl_k mapflag src4instance +//============================================================ +glast_01,204,273,6 script Hugin#ghinstance 755,{ + mes "^ff0000This isn't considered a normal progression dungeon. Please note this point.^000000"; + next; + mes "[Hugin]"; + mes "Huh? You feel like you have seen me in different places? I see. What can I say?"; + next; + set .@ghins_time, checkquest(12317,PLAYTIME); + if (.@ghins_time == -1) { + + set .@party_id,getcharid(1); + set .@p_name$,getpartyname(.@party_id); + set .@md_name$,"Old Glast Heim"; + + if (!instance_check_party(.@party_id,2)) { + //custom + mes "[Hugin]"; + mes "Where are your party members?"; + close; + } + + if (getcharid(0) == getpartyleader(.@party_id,2)) + set .@menu$, "Create the time gap.:Enter the Old Glast Heim.:Cancel."; + else + set .@menu$, ":Enter the Old Glast Heim.:Cancel."; + switch(select(.@menu$)) { + case 1: + set .@instance, instance_create(.@md_name$,.@party_id); + if (.@instance < 0) { + mes "Party Name: "+.@p_name$; + mes "Party Leader: "+strcharinfo(0); + mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!"; + close; + } + if (instance_attachmap("1@gl_k",.@instance) == "" || instance_attachmap("2@gl_k",.@instance) == "") { + mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!"; + instance_destroy(.@instance); + close; + } + instance_set_timeout 3600,300,.@instance; + instance_init(.@instance); + mes "[Hugin]"; + mes "The time gap was created. When you're ready, talk to me again."; + close; + case 2: + if( has_instance("1@gl_k") == "" ) { + mes "The memorial dungeon "+.@md_name$+" does not exist."; + mes "The party leader did not generate the dungeon yet."; + close; + } else { + mapannounce "glast_01",strcharinfo(0)+", member of the party "+.@p_name$+" entered the instance "+.@md_name$+".",bc_map,"0x00ff99"; + setquest 12317; + setquest 12318; + warp "1@gl_k",150,20; + end; + } + case 3: + close; + } + } else if (.@ghins_time == 0 || .@ghins_time == 1) { + mes "[Hugin]"; + mes "Oh, geez."; + mes "Your body is still under the effects of time travel. In this state, you will not be able to travel again."; + next; + mes "[Hugin]"; + mes "You should rest and come back later for more."; + close; + } else { + mes "^0000ffOld Glast Heim access trail has been cleared. It is now possible to talk to Hugin.^000000"; + erasequest 12317; + if (checkquest(12318) > -1) erasequest 12318; + if (checkquest(12319) > -1) erasequest 12319; + close; + } +} + +// Floor 1 +//============================================================ +1@gl_k,149,41,6 script Varmunt#ghinstance1 654,{ + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + mes "Hey ^0000ffguys^000000, were you sent here to help me?"; + npctalk "Hey guys, were you sent here to help me?"; + cutin "gl_barmund1",2; + next; + select("Oh. Well, about that..."); + mes "["+strcharinfo(0)+"]"; + mes "Oh yeah, hahaha, we were told to meet someone called Varmunt."; + unittalk getcharid(3),"Oh yeah, hahaha, we were told to meet someone called Varmunt."; + next; + mes "[Varmunt]"; + mes "We don't have time. We must tell Sir Heinrich about Himmelmez's invasion."; + npctalk "We don't have time. We must tell Sir Heinrich about Himmelmez's invasion."; + cutin "gl_barmund2",2; + next; + select("What Himmelmez..."); + mes "["+strcharinfo(0)+"]"; + mes "Himmelmez? Who the hell is she?"; + unittalk getcharid(3),"Himmelmez? Who the hell is she?"; + next; + mes "[Varmunt]"; + mes "Didn't anybody give you the basic informations?"; + npctalk "Didn't anybody give you the basic informations?"; + cutin "gl_barmund3",2; + next; + mes "[Varmunt]"; + mes "The Valkyrie of the dead. She's after the Ymir's Heart pieces hidden here."; + npctalk "The Valkyrie of the dead. She's after the Ymir's Heart pieces hidden here"; + cutin "gl_barmund2",2; + next; + mes "[Varmunt]"; + mes "She's capable of destroying the whole castle for this purpose."; + npctalk "She's capable of destroying the whole castle for this purpose."; + next; + mes "[Varmunt]"; + mes "Hurry up! Inform Sir Heinrich that Himmelmez is coming. I will briefly explore the enchantments she made to this place!"; + npctalk "Hurry up! Inform Sir Heinrich that Himmelmez is coming. I will briefly explore the enchantments she made to this place!"; + close2; + cutin "gl_barmund2",255; + donpcevent instance_npcname("Varmunt#ghinstance1")+"::OnDisable2"; + end; + } else { + mes "[Varmunt]"; + mes "Where is he? We"; + mes "need his help."; + cutin "gl_barmund2",2; + close2; + cutin "gl_barmund2",255; + end; + } +OnInstanceInit: + donpcevent instance_npcname("Varmunt#ghinstance1")+"::OnEnable"; + end; +OnDisable: + hideonnpc instance_npcname("Varmunt#ghinstance1"); + end; +OnDisable2: + hideonnpc instance_npcname("Varmunt#ghinstance1"); + + for(set .@i,1; .@i<=20; set .@i,.@i+4) { + hideoffnpc instance_npcname("Khalitzburg Crusader#"+.@i); + hideoffnpc instance_npcname("Khalitzburg Crusader#"+(.@i+1)); + hideoffnpc instance_npcname("White Knight#"+(.@i+2)); + hideoffnpc instance_npcname("White Knight#"+(.@i+3)); + } + hideoffnpc instance_npcname("Khalitzburg Crusader#21"); + hideoffnpc instance_npcname("Khalitzburg Crusader#22"); + + hideoffnpc instance_npcname("Heinrich#ghinstance1"); + hideoffnpc instance_npcname("Varmunt#ghinstance2"); + end; +OnEnable: + hideoffnpc instance_npcname("Varmunt#ghinstance1"); + end; +} + +1@gl_k,145,54,6 script Khalitzburg Crusader#1 655,{ + mes "["+strnpcinfo(1)+"]"; + switch((atoi(strnpcinfo(2)) + 1) / 2) { + case 1: mes "Would I be recruited?"; break; + case 2: mes "May I help you?"; break; + case 3: mes "..."; break; + case 4: mes "I do not like to chit-chat during work."; break; + case 5: mes "The aura of the castle has changed, don't you think? Something like a presence seemed to appear a little while ago."; break; + case 6: mes "I wonder what commandant Varmunt is doing. I heard people are running away..."; break; + case 7: mes "Quiet please."; break; + case 8: mes "A fuss seems to be near."; break; + case 9: mes "A dream last night really bothered me. My mother used to say that these dreams may come true..."; break; + case 10: mes "Is Varmunt going with you? The commandant is waiting for you."; break; + case 11: mes "Soon it's time to change shifts. I wonder what happened to the other knights."; break; + } + close; +OnInstanceInit: + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname(strnpcinfo(0)); + end; +OnEnable: + hideoffnpc instance_npcname(strnpcinfo(0)); + end; +} +1@gl_k,154,54,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#2 655 +1@gl_k,145,59,6 duplicate(Khalitzburg Crusader#1) White Knight#3 657 +1@gl_k,154,59,3 duplicate(Khalitzburg Crusader#1) White Knight#4 657 +1@gl_k,145,64,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#5 655 +1@gl_k,154,64,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#6 655 +1@gl_k,145,69,6 duplicate(Khalitzburg Crusader#1) White Knight#7 657 +1@gl_k,154,69,3 duplicate(Khalitzburg Crusader#1) White Knight#8 657 +1@gl_k,145,74,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#9 655 +1@gl_k,154,74,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#10 655 +1@gl_k,145,79,6 duplicate(Khalitzburg Crusader#1) White Knight#11 657 +1@gl_k,154,79,3 duplicate(Khalitzburg Crusader#1) White Knight#12 657 +1@gl_k,145,84,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#13 655 +1@gl_k,154,84,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#14 655 +1@gl_k,145,89,6 duplicate(Khalitzburg Crusader#1) White Knight#15 657 +1@gl_k,154,89,3 duplicate(Khalitzburg Crusader#1) White Knight#16 657 +1@gl_k,145,94,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#17 655 +1@gl_k,154,94,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#18 655 +1@gl_k,145,99,6 duplicate(Khalitzburg Crusader#1) White Knight#19 657 +1@gl_k,154,99,3 duplicate(Khalitzburg Crusader#1) White Knight#20 657 +1@gl_k,145,104,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#21 655 +1@gl_k,154,104,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#22 655 + +1@gl_k,149,100,6 script Heinrich#ghinstance1 652,{ + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + cutin "gl_heinrich2",2; + select("Heinrich, about the castle..."); + mes "["+strcharinfo(0)+"]"; + mes "Do you know what is happening now in the castle, Heinrich?"; + unittalk getcharid(3),"Do you know what is happening now in the castle, Heinrich?"; + next; + mes "[Heinrich]"; + mes "You are the adventurers who have come with Varmunt, right?"; + npctalk "You are the adventurers who have come with Varmunt, right?"; + next; + mes "[Heinrich]"; + mes "What can I do for you? Is there something wrong?"; + npctalk "What can I do for you? Is there something wrong?"; + next; + select("The Ymir's Heart. Himmelmez..."); + mes "["+strcharinfo(0)+"]"; + mes "Himmelmez, the Valkyrie of the dead is looking to get a piece of the Ymir's heart hidden in the castle!"; + unittalk getcharid(3),"Himmelmez, the Valkyrie of the dead is looking to get a piece of the Ymir's heart hidden in the castle!"; + next; + mes "[Heinrich]"; + mes "Haha. That's a nice joke. Now tell me what brings you here."; + npctalk "Haha. That's a nice joke. Now tell me what brings you here."; + cutin "gl_heinrich1",2; + next; + mes "[Varmunt]"; + mes "I am not joking Heinrich, Sir. Now, if my judgement is correct, she will be here soon."; + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk1"; + cutin "gl_barmund2",2; + next; + mes "[Varmunt]"; + mes "I trust this guy following me. The Ymir's Heart pieces must be hidden in a safe place before Himmelmez takes them!"; + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk2"; + next; + select("Even if you do not believe..."); + mes "["+strcharinfo(0)+"]"; + mes "Even if you don't believe it, do something. We do not have much time!"; + unittalk getcharid(3),"Even if you don't believe it, do something. We do not have much time!"; + cutin "gl_barmund2",255; + next; + mes "[Heinrich]"; + mes "I will be glad if you give me two minutes, please. But now the king isn't in his room."; + npctalk "I will be glad if you give me two minutes, please. But now the king isn't in his room."; + cutin "gl_heinrich1",2; + next; + mes "[Heinrich]"; + mes "But I think that with such a busy agenda, he won't be able to take care of this."; + npctalk "But I think that with such a busy agenda, he won't be able to take care of this."; + donpcevent instance_npcname("Heinrich#ghinstance1")+"::OnDisable"; + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnEnable"; + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnEnable"; + donpcevent instance_npcname("#talkinstance1")+"::OnEnable"; + mapannounce instance_mapname("1@gl_k"), "???? Shout: Ohohohoho~!",bc_map,"0xFFFF00"; + close2; + cutin "gl_heinrich1",255; + end; + } else { + mes "[Heinrich]"; + mes "Where is your representative?"; + mes "I need to talk to him."; + cutin "gl_heinrich2",2; + close2; + cutin "gl_heinrich2",255; + end; + } +OnInstanceInit: + donpcevent instance_npcname("Heinrich#ghinstance1")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Heinrich#ghinstance1"); + end; +OnEnable: + hideoffnpc instance_npcname("Heinrich#ghinstance1"); + end; +} + +1@gl_k,152,97,3 script Varmunt#ghinstance2 654,{ + end; +OnInstanceInit: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Varmunt#ghinstance2"); + end; +OnEnable: + hideoffnpc instance_npcname("Varmunt#ghinstance2"); + end; +OnTalk1: + npctalk "I am not joking Heinrich, Sir. Now, if my judgement is correct, she will be here soon."; + end; +OnTalk2: + npctalk "I trust this guy following me. The Ymir's Heart pieces must be hidden in a safe place before Himmelmez takes them!"; + end; +OnTalk3: + npctalk "Himmelmez!! Through the cracks!"; + end; +OnTalk4: + npctalk "Unbelievable. My men are...This kind of thing is not possible!"; + end; +OnTalk5: + npctalk "Heinrich, Sir! I need a quick decision."; + end; +OnTalk6: + npctalk "To prevent other attacks, go chase her!"; + end; +OnTalk7: + npctalk "Now, your help is desperately needed. I hopefully ask you."; + end; +} + +1@gl_k,149,97,6 script Heinrich#ghinstance2 652,{ + end; +OnInstanceInit: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Heinrich#ghinstance2"); + end; +OnEnable: + hideoffnpc instance_npcname("Heinrich#ghinstance2"); + end; +OnTalk1: + npctalk "Who?!"; + end; +OnTalk2: + npctalk "That who rules the dead? No doubt, a pretty story. Here, some tea will be served to entertain the ladies. Unfortunately, I do not..."; + end; +OnTalk3: + npctalk "What did you say?"; + end; +OnTalk4: + npctalk "The King responded to the invitation of the Rune Midgard's Royal Family and hasn't come back yet."; + end; +OnTalk5: + npctalk "Just leave before you get in trouble. This is the King's will!"; + end; +OnTalk6: + npctalk "Damn! She has detected the position of the Ymir's Heart pieces."; + end; +OnTalk7: + npctalk "Now, Khalitzburg Crusaders and White Knights, follow me..."; + end; +OnTalk8: + npctalk "Unbelievable. My men are...This kind of thing is not possible!"; + end; +OnTalk9: + npctalk "I'm sorry..."; + end; +OnTalk10: + npctalk "I'm sorry, my lord! Do not forgive me!"; + end; +} + +1@gl_k,149,100,6 script Heinrich#ghinstance3 652,{ + end; +OnInstanceInit: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Heinrich#ghinstance3"); + end; +OnEnable: + hideoffnpc instance_npcname("Heinrich#ghinstance3"); + end; +OnTalk1: + npctalk "I cannot believe I killed my men with my own hands!"; + end; +OnTalk2: + npctalk "Varmunt is right about that. Now is not the time to regret."; + end; +OnTalk3: + npctalk "People, gather around and follow my orders."; + end; +OnTalk4: + npctalk "Himmelmez is turning into monsters all the people she put to sleep."; + end; +OnTalk5: + npctalk "I don't know if there are survivors around here yet."; + end; +OnTalk6: + npctalk "If there are survivors from this evil thing, please rescue them."; + end; +OnTalk7: + npctalk "With Varmunt by my side, I'm going to chase Himmelmez down."; + end; +OnTalk8: + npctalk "Hurry up Varmunt, let's chase her down."; + end; +} + +1@gl_k,149,89,1 script Himmelmez#ghinstance1 650,{ + end; +OnInstanceInit: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Himmelmez#ghinstance1"); + end; +OnEnable: + hideoffnpc instance_npcname("Himmelmez#ghinstance1"); + end; +OnTalk1: + npctalk "This~ Did I interrupt your conversation? The thing is, it's been too long since the last guests saw some sadness spread..."; + end; +OnTalk2: + npctalk "My name is Lisa Kahn Himmelmez. I am called the Valkyrie of the dead, master of the Dullahan."; + end; +OnTalk3: + npctalk "There's no need to pretend to be so laid back. Don't bluff about the whereabouts of you Majesty and things will be alright."; + end; +OnTalk4: + npctalk "Hohoho, do you have any questions? You're a really mysterious man."; + end; +OnTalk5: + npctalk "Not coveting the king's throne, you're such a stupid man, only waiting for his return. Your innocence is true, I love it."; + end; +Ontalk6: + npctalk "You make me wish we hadn't met in this situation. Too bad we did."; + end; +Ontalk7: + npctalk "Well~ Today, with such a busy commandant, I won't be able to talk as much as I'd love for you to contemplate my explanation~"; + end; +OnTalk8: + npctalk "I gotta get my job done. Meanwhile why don't you meet my men? Hohoho."; + end; +} + +// Control Timer +//============================================================ +1@gl_k,0,0,0 script #talkinstance1 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#talkinstance1")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#talkinstance1"); + end; +OnEnable: + enablenpc instance_npcname("#talkinstance1"); + initnpctimer; + end; +OnTimer5000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk1"; + end; +OnTimer10000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk1"; + end; +OnTimer15000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk3"; + end; +OnTimer20000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk2"; + end; +OnTimer25000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk2"; + end; +OnTimer30000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk3"; + end; +OnTimer35000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk3"; + end; +OnTimer45000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk4"; + end; +OnTimer50000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk5"; + end; +OnTimer55000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk6"; + end; +OnTimer60000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk4"; + end; +OnTimer65000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk5"; + end; +OnTimer70000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk7"; + end; +OnTimer75000: + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk8"; + end; +OnTimer80000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk6"; + donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnDisable"; + end; +OnTimer85000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk7"; + hideonnpc instance_npcname("Varmunt#ghinstance1"); + + for(set .@i,1; .@i<=20; set .@i,.@i+4) { + hideonnpc instance_npcname("Khalitzburg Crusader#"+.@i); + hideonnpc instance_npcname("Khalitzburg Crusader#"+(.@i+1)); + hideonnpc instance_npcname("White Knight#"+(.@i+2)); + hideonnpc instance_npcname("White Knight#"+(.@i+3)); + } + hideonnpc instance_npcname("Khalitzburg Crusader#21"); + hideonnpc instance_npcname("Khalitzburg Crusader#22"); + + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#talkinstance1")+"::OnMyMobDead"; + monster .@map$,145,59,"Abyss Knight",2470,1,.@label$; + monster .@map$,154,59,"Abyss Knight",2470,1,.@label$; + monster .@map$,145,69,"Abyss Knight",2470,1,.@label$; + monster .@map$,154,69,"Abyss Knight",2470,1,.@label$; + monster .@map$,145,79,"Abyss Knight",2470,1,.@label$; + monster .@map$,154,79,"Abyss Knight",2470,1,.@label$; + monster .@map$,145,89,"Abyss Knight",2470,1,.@label$; + monster .@map$,154,89,"Abyss Knight",2470,1,.@label$; + monster .@map$,145,99,"Abyss Knight",2470,1,.@label$; + monster .@map$,154,99,"Abyss Knight",2470,1,.@label$; + + for(set .@i,1; .@i<=22; set .@i,.@i+1) + hideoffnpc instance_npcname(".#ghinstance"+.@i); + + donpcevent instance_npcname(".#ghinstance22")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance21")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance18")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance17")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance14")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance13")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance10")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance9")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance6")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance5")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance2")+"::OnTalkK"; + donpcevent instance_npcname(".#ghinstance1")+"::OnTalkK"; + end; +OnTimer88000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk8"; + + for(set .@i,1; .@i<=20; set .@i,.@i+4) { + hideonnpc instance_npcname(".#ghinstance"+.@i); + hideonnpc instance_npcname(".#ghinstance"+(.@i+1)); + disablenpc instance_npcname(".#ghinstance"+(.@i+2)); + disablenpc instance_npcname(".#ghinstance"+(.@i+3)); + } + hideonnpc instance_npcname(".#ghinstance21"); + hideonnpc instance_npcname(".#ghinstance22"); + + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#talkinstance1")+"::OnMyMobDead"; + monster .@map$,145,54,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,54,"Khalitzburg",2471,1,.@label$; + monster .@map$,145,64,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,64,"Khalitzburg",2471,1,.@label$; + monster .@map$,145,74,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,74,"Khalitzburg",2471,1,.@label$; + monster .@map$,145,84,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,84,"Khalitzburg",2471,1,.@label$; + monster .@map$,145,94,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,94,"Khalitzburg",2471,1,.@label$; + monster .@map$,145,104,"Khalitzburg",2471,1,.@label$; + monster .@map$,154,104,"Khalitzburg",2471,1,.@label$; + end; +OnTimer93000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk4"; + end; +OnTimer97000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk9"; + end; +OnTimer105000: + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk10"; + mapannounce instance_mapname("1@gl_k"), "Heinrich's Shout: Dead men, dead men all over the place!",bc_map,"0xFFFF00"; + end; +OnTimer107000: + mapannounce instance_mapname("1@gl_k"), "Heinrich's Shout: Everybody! Go back!",bc_map,"0xFFFF00"; + end; +OnTimer110000: + donpcevent instance_npcname(".#ghinstance22")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance21")+"::OnEffect1"; + end; +OnTimer110500: + enablenpc instance_npcname(".#ghinstance20"); + enablenpc instance_npcname(".#ghinstance19"); + donpcevent instance_npcname(".#ghinstance20")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance19")+"::OnEffect1"; + end; +OnTimer111000: + donpcevent instance_npcname(".#ghinstance18")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance17")+"::OnEffect1"; + end; +OnTimer111500: + enablenpc instance_npcname(".#ghinstance16"); + enablenpc instance_npcname(".#ghinstance15"); + donpcevent instance_npcname(".#ghinstance16")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance15")+"::OnEffect1"; + end; +OnTimer112000: + donpcevent instance_npcname(".#ghinstance14")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance13")+"::OnEffect1"; + end; +OnTimer112500: + enablenpc instance_npcname(".#ghinstance12"); + enablenpc instance_npcname(".#ghinstance11"); + donpcevent instance_npcname(".#ghinstance12")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance11")+"::OnEffect1"; + end; +OnTimer113000: + donpcevent instance_npcname(".#ghinstance10")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance9")+"::OnEffect1"; + end; +OnTimer113500: + enablenpc instance_npcname(".#ghinstance8"); + enablenpc instance_npcname(".#ghinstance7"); + donpcevent instance_npcname(".#ghinstance8")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance7")+"::OnEffect1"; + end; +OnTimer114000: + donpcevent instance_npcname(".#ghinstance6")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance5")+"::OnEffect1"; + end; +OnTimer114500: + enablenpc instance_npcname(".#ghinstance4"); + enablenpc instance_npcname(".#ghinstance3"); + donpcevent instance_npcname(".#ghinstance4")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance3")+"::OnEffect1"; + end; +OnTimer114750: //custom time + disablenpc instance_npcname(".#ghinstance3"); + disablenpc instance_npcname(".#ghinstance4"); + disablenpc instance_npcname(".#ghinstance7"); + disablenpc instance_npcname(".#ghinstance8"); + disablenpc instance_npcname(".#ghinstance11"); + disablenpc instance_npcname(".#ghinstance12"); + disablenpc instance_npcname(".#ghinstance15"); + disablenpc instance_npcname(".#ghinstance16"); + disablenpc instance_npcname(".#ghinstance19"); + disablenpc instance_npcname(".#ghinstance20"); + end; +OnTimer115000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnEnable"; + donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnDisable"; + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk1"; + donpcevent instance_npcname(".#ghinstance2")+"::OnEffect1"; + donpcevent instance_npcname(".#ghinstance1")+"::OnEffect1"; + killmonster instance_mapname("1@gl_k"),instance_npcname("#talkinstance1")+"::OnMyMobDead"; + end; +OnTimer120000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk5"; + end; +OnTimer125000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk6"; + end; +OnTimer130000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk2"; + end; +OnTimer135000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk3"; + end; +OnTimer140000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk4"; + end; +OnTimer145000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk5"; + end; +OnTimer150000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk6"; + end; +OnTimer155000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk7"; + end; +OnTimer160000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk7"; + end; +OnTimer165000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk8"; + end; +OnTimer167000: + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable"; + end; +OnTimer168000: + donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnDisable"; + donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable"; + stopnpctimer; + donpcevent instance_npcname("#ghinstancewarp1")+"::OnEnable"; + donpcevent instance_npcname("#ghinstancewarp2")+"::OnEnable"; + mapannounce instance_mapname("1@gl_k"), "9 o'clock warp leading to zone 2 is now open.",bc_map,"0xFFFF00"; + donpcevent instance_npcname("#talkinstance1")+"::OnDisable"; + donpcevent instance_npcname("#ghmemorialmob01")+"::OnEnable"; + end; +OnMyMobDead: + end; +} + +1@gl_k,145,54,6 script .#ghinstance1 2471,{ + end; +OnInstanceInit: + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname(strnpcinfo(0)); + end; +OnEnable: + hideoffnpc instance_npcname(strnpcinfo(0)); + end; +OnEffect1: + specialeffect EF_GRANDCROSS; + specialeffect EF_LEXAETERNA; + end; +OnTalkK: + switch(atoi(replacestr(strnpcinfo(2),"ghinstance",""))) { + case 1: npctalk "I do not want to die."; break; + case 2: npctalk "Mom..."; break; + case 5: npctalk "Help."; break; + case 6: npctalk "My stomach hurts..."; break; + case 9: npctalk "Heinrich Sir, help!"; break; + case 10: npctalk "Ack... Ugh."; break; + case 13: npctalk "I'm thirsty."; break; + case 14: npctalk "Oh... No... I cannot die..."; break; + case 17: npctalk "This is so uncomfortable. Eww!"; break; + case 18: npctalk "Who am I..."; break; + case 21: npctalk "Uhh... My body."; break; + case 22: npctalk "I'm so thirsty!"; break; + } + end; +} +1@gl_k,154,54,3 duplicate(.#ghinstance1) .#ghinstance2 2471 +1@gl_k,145,64,6 duplicate(.#ghinstance1) .#ghinstance5 2471 +1@gl_k,154,64,3 duplicate(.#ghinstance1) .#ghinstance6 2471 +1@gl_k,145,74,6 duplicate(.#ghinstance1) .#ghinstance9 2471 +1@gl_k,154,74,3 duplicate(.#ghinstance1) .#ghinstance10 2471 +1@gl_k,145,84,6 duplicate(.#ghinstance1) .#ghinstance13 2471 +1@gl_k,154,84,3 duplicate(.#ghinstance1) .#ghinstance14 2471 +1@gl_k,145,94,6 duplicate(.#ghinstance1) .#ghinstance17 2471 +1@gl_k,154,94,3 duplicate(.#ghinstance1) .#ghinstance18 2471 +1@gl_k,145,104,6 duplicate(.#ghinstance1) .#ghinstance21 2471 +1@gl_k,154,104,3 duplicate(.#ghinstance1) .#ghinstance22 2471 + +1@gl_k,145,59,6 script .#ghinstance3 111,{ + end; +OnInstanceInit: + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname(strnpcinfo(0)); + end; +OnEnable: + hideoffnpc instance_npcname(strnpcinfo(0)); + end; +OnEffect1: + specialeffect EF_GRANDCROSS; + specialeffect EF_LEXAETERNA; + end; +} +1@gl_k,154,59,3 duplicate(.#ghinstance3) .#ghinstance4 111 +1@gl_k,145,69,6 duplicate(.#ghinstance3) .#ghinstance7 111 +1@gl_k,154,69,3 duplicate(.#ghinstance3) .#ghinstance8 111 +1@gl_k,145,79,6 duplicate(.#ghinstance3) .#ghinstance11 111 +1@gl_k,154,79,3 duplicate(.#ghinstance3) .#ghinstance12 111 +1@gl_k,145,89,6 duplicate(.#ghinstance3) .#ghinstance15 111 +1@gl_k,154,89,3 duplicate(.#ghinstance3) .#ghinstance16 111 +1@gl_k,145,99,6 duplicate(.#ghinstance3) .#ghinstance19 111 +1@gl_k,154,99,3 duplicate(.#ghinstance3) .#ghinstance20 111 + +1@gl_k,96,80,0 script #ghinstancewarp1 45,1,2,{ + end; +OnInstanceInit: + donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnEnable: + enablenpc instance_npcname(strnpcinfo(0)); + end; +OnTouch: + set .@map1$, instance_mapname("1@gl_k"); + set .@map2$, instance_mapname("2@gl_k"); + switch(atoi(replacestr(strnpcinfo(2),"ghinstancewarp",""))) { + case 1: warp .@map1$,80,80; break; + case 2: warp .@map1$,105,80; break; + case 3: warp .@map1$,215,79; break; + case 4: warp .@map1$,195,79; break; + case 5: warp .@map1$,215,216; break; + case 6: warp .@map1$,235,216; break; + case 7: warp .@map2$,150,46; break; + case 8: warp .@map2$,126,123; break; + case 9: warp .@map2$,150,116; break; + case 10: warp .@map2$,174,101; break; + case 11: warp .@map2$,150,110; break; + case 12: warp .@map2$,150,179; break; + } + end; +} +1@gl_k,90,80,0 duplicate(#ghinstancewarp1) #ghinstancewarp2 45,1,2 +1@gl_k,202,79,0 duplicate(#ghinstancewarp1) #ghinstancewarp3 45,1,2 +1@gl_k,206,79,0 duplicate(#ghinstancewarp1) #ghinstancewarp4 45,1,2 +1@gl_k,228,216,0 duplicate(#ghinstancewarp1) #ghinstancewarp5 45,1,2 +1@gl_k,222,216,0 duplicate(#ghinstancewarp1) #ghinstancewarp6 45,1,2 +1@gl_k,150,284,0 duplicate(#ghinstancewarp1) #ghinstancewarp7 45,1,2 +2@gl_k,145,123,0 duplicate(#ghinstancewarp1) #ghinstancewarp8 45,1,2 +2@gl_k,136,122,0 duplicate(#ghinstancewarp1) #ghinstancewarp9 45,1,2 +2@gl_k,154,101,0 duplicate(#ghinstancewarp1) #ghinstancewarp10 45,1,2 +2@gl_k,165,101,0 duplicate(#ghinstancewarp1) #ghinstancewarp11 45,1,2 +2@gl_k,150,163,0 duplicate(#ghinstancewarp1) #ghinstancewarp12 45,1,2 + + +// Sector 1 Mobs +//============================================================ +1@gl_k,0,0,0 script #ghmemorialmob01 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob01")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob01"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob01"); + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob01")+"::OnMyMobDead"; + areamonster .@map$,76,99,87,10,"Suffering Chamberlain",2466,15,.@label$; + areamonster .@map$,67,39,12,6,"Fallen Monk",2465,20,.@label$; + areamonster .@map$,67,39,12,6,"Suffering Chamberlain",2466,3,.@label$; + areamonster .@map$,32,75,51,58,"Decayed Butler",2464,6,.@label$; + areamonster .@map$,45,84,6,137,"Decayed Butler",2464,12,.@label$; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob01")+"::OnMyMobDead"; + set .@mob_dead_num, 56 - mobcount(.@map$,.@label$); + if (.@mob_dead_num > 35) { + mapannounce .@map$, "Seems like Himmelmez drains the dead's souls. They must be destroyed.",bc_map,"0xFFFFFF"; + killmonster .@map$,.@label$; + donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob01")+"::OnDisable"; + } + end; +} + +1@gl_k,17,51,3 script Aspiring Butcher#clearGH 706,{ + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + mes "[Aspiring Butcher]"; + mes "Help me! Help me!!!"; + next; + select("Hey, wake up! Are there any other survivors?"); + mes "["+strcharinfo(0)+"]"; + mes "Hey, wake up! Are you alone?"; + unittalk getcharid(3),"Hey, wake up! Are you alone?"; + next; + mes "[Aspiring Butcher]"; + mes "The Chamberlain... the Monk... They've become monsters. I couldn't do anything."; + npctalk "The Chamberlain... the Monk... They've become monsters. I couldn't do anything."; + next; + mes "[Aspiring Butcher]"; + mes "I just stood still... Nothing, I couldn't do anything..."; + npctalk "I just stood still... Nothing, I couldn't do anything..."; + next; + select("Wake up!"); + mes "["+strcharinfo(0)+"]"; + mes "Wake up kid! Go east along the central passage to the outside! The path is safe!"; + unittalk getcharid(3),"Wake up kid! Go east along the central passage to the outside! The path is safe!"; + next; + mes "[Aspiring Butcher]"; + mes "East passage? Alone? How?"; + npctalk "East passage? Alone? How?"; + next; + select("I can guide you through the path."); + mes "["+strcharinfo(0)+"]"; + mes "I will guide you, perhaps that will help. If you want to close your eyes try not to hit anything."; + unittalk getcharid(3),"I will guide you, perhaps that will help. If you want to close your eyes try not to hit anything."; + next; + mes "[Aspiring Butcher]"; + mes "Aspiring Butcher: I know, I... I'm trying to."; + npctalk "Aspiring Butcher: I know, I... I'm trying to."; + donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnDisable"; + donpcevent instance_npcname("#ghmemorialmob02")+"::OnEnable"; + close; + } else { + mes "[Aspiring Butcher]"; + mes "Somebody help me, somebody help me, please."; + close; + } +OnInstanceInit: + donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Aspiring Butcher#clearGH"); + end; +OnEnable: + hideoffnpc instance_npcname("Aspiring Butcher#clearGH"); + end; +} + +// Sector 2 Mobs +//============================================================ +1@gl_k,291,145,3 script Hollgrehenn Destroyer 726,{ + if (getcharid(0) == getpartyleader(getcharid(1),2)) { + mes "[Hollgrehenn Destroyer]"; + mes "Yaaa!! Die!!!"; + npctalk "Yaaa!! Die!!!"; + specialeffect EF_CRASHEARTH; + next; + select("Don't worry!"); + mes "["+strcharinfo(0)+"]"; + mes "Don't worry! Mam. Are you alone? No other survivors?"; + unittalk getcharid(3),"Don't worry! Mam. Are you alone? No other survivors?"; + next; + mes "[Hollgrehenn Destroyer]"; + mes "I'm the only survivor left"; + npctalk "I'm the only survivor left"; + next; + select("This is a very dangerous place."); + mes "["+strcharinfo(0)+"]"; + mes "This is a very dangerous place. You know the central passage? Do you think you can move... and get to a safer place?"; + unittalk getcharid(3),"This is a very dangerous place. You know the central passage? Do you think you can move... and get to a safer place?"; + next; + mes "[Hollgrehenn Destroyer]"; + mes "Yes, I am able to move. I'll move for my baby's sake."; + npctalk "Yes, I am able to move. I'll move for my baby's sake."; + next; + select("Survive the road..."); + mes "["+strcharinfo(0)+"]"; + mes "You and your baby will get out of here safely. But I'm sorry I can't help you more."; + unittalk getcharid(3),"You and your baby will get out of here safely. But I'm sorry I can't help you more."; + next; + mes "[Hollgrehenn Destroyer]"; + mes "That's ok. Thank you for helping us. I'm good to go alone. Ah and good luck also."; + npctalk "That's ok. Thank you for helping us. I'm good to go alone. Ah and good luck also."; + donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnDisable"; + donpcevent instance_npcname("#ghmemorialmob03")+"::OnEnable"; + close; + } else { + mes "[Hollgrehenn Destroyer]"; + mes "Somebody help me, somebody help me, please"; + close; + } +OnInstanceInit: + donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Hollgrehenn Destroyer"); + end; +OnEnable: + hideoffnpc instance_npcname("Hollgrehenn Destroyer"); + end; +} + +1@gl_k,0,0,0 script #ghmemorialmob02 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob02")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob02"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob02"); + donpcevent instance_npcname("#ghinstancewarp3")+"::OnEnable"; + donpcevent instance_npcname("#ghinstancewarp4")+"::OnEnable"; + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob02")+"::OnMyMobDead"; + mapannounce .@map$,"3 o'clock warp leading to zone 3 is now open.",bc_map,"0xFFFF00"; + areamonster .@map$,241,113,291,19,"Suffering Chamberlain",2466,12,.@label$; + areamonster .@map$,241,113,291,19,"Decayed Monk",2464,12,.@label$; + areamonster .@map$,227,217,291,135,"Suffering Chamberlain",2466,12,.@label$; + areamonster .@map$,227,217,291,135,"Decayed Monk",2464,12,.@label$; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob02")+"::OnMyMobDead"; + set .@mob_dead_num, 48 - mobcount(.@map$,.@label$); + if (.@mob_dead_num > 28) { + mapannounce .@map$, "Seems like Himmelmez drains the dead's souls. They must be destroyed.",bc_map,"0xFFFFFF"; + killmonster .@map$,.@label$; + donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob02")+"::OnDisable"; + } + end; +} + +// Tramp Mobs +//============================================================ +1@gl_k,221,82,3 script Breathless Man#GHtramp1 849,4,4,{ + end; +OnTouch: + set .@i, rand(1,10); + if (.@i == 1) set .@mobs,3; + else if (.@i == 2) set .@mobs,4; + else if (.@i == 3) set .@mobs,5; + else if (.@i < 7) set .@mobs,6; + else set .@mobs,7; + getmapxy(.@map$,.@x,.@y,1); + specialeffect EF_VENOMDUST; + monster .@map$,.@x,.@y,"Muck Worm",2467,.@mobs,instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; + disablenpc instance_npcname(strnpcinfo(0)); + end; +OnMyMobDead: + end; +OnInstanceInit: + donpcevent instance_npcname(strnpcinfo(0))+"::OnEnable"; + end; +OnEnable: + enablenpc instance_npcname(strnpcinfo(0)); + end; +OnDisable: + disablenpc instance_npcname(strnpcinfo(0)); + end; +} +1@gl_k,213,63,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp2 849,4,4 +1@gl_k,230,50,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp3 849,4,4 +1@gl_k,222,39,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp4 849,4,4 +1@gl_k,214,27,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp5 849,4,4 +1@gl_k,223,17,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp6 849,4,4 +1@gl_k,235,16,4 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp7 849,4,4 +1@gl_k,251,20,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp8 849,4,4 +1@gl_k,240,43,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp9 849,4,4 +1@gl_k,271,19,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp10 849,4,4 +1@gl_k,246,62,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp11 849,4,4 +1@gl_k,282,48,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp12 849,4,4 +1@gl_k,285,81,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp13 849,4,4 +1@gl_k,241,86,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp14 849,4,4 +1@gl_k,249,101,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp15 849,4,4 +1@gl_k,276,106,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp16 849,4,4 +1@gl_k,252,120,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp17 849,4,4 +1@gl_k,258,150,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp18 849,4,4 +1@gl_k,255,157,6 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp19 849,4,4 +1@gl_k,261,164,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp20 849,4,4 +1@gl_k,269,173,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp21 849,4,4 +1@gl_k,280,167,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp22 849,4,4 +1@gl_k,293,161,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp23 849,4,4 +1@gl_k,226,96,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp24 849,4,4 +1@gl_k,222,119,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp25 849,4,4 +1@gl_k,233,123,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp26 849,4,4 +2@gl_k,147,203,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp27 849,4,4 +2@gl_k,141,222,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp28 849,4,4 +2@gl_k,167,225,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp29 849,4,4 +2@gl_k,145,236,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp30 849,4,4 +2@gl_k,143,260,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp31 849,4,4 +2@gl_k,173,258,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp32 849,4,4 + +// Sector 3 Mobs +//============================================================ +1@gl_k,0,0,0 script #ghmemorialmob03 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob03")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob03"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob03"); + donpcevent instance_npcname("#ghinstancewarp5")+"::OnEnable"; + donpcevent instance_npcname("#ghinstancewarp6")+"::OnEnable"; + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob03")+"::OnMyMobDead"; + mapannounce .@map$,"12 o'clock warp leading to the zone 4 was opened.",bc_map,"0xFFFF00"; + areamonster .@map$,17,259,53,180,"Decayed Guard",2468,11,.@label$; + areamonster .@map$,17,259,53,180,"Sharpshooter Ranger",2469,14,.@label$; + areamonster .@map$,62,281,73,186,"Decayed Guard",2468,11,.@label$; + areamonster .@map$,62,281,73,186,"Sharpshooter Ranger",2469,14,.@label$; + areamonster .@map$,74,251,109,224,"Decayed Guard",2468,11,.@label$; + areamonster .@map$,74,251,109,224,"Sharpshooter Ranger",2469,14,.@label$; + areamonster .@map$,108,281,231,234,"Decayed Guard",2468,11,.@label$; + areamonster .@map$,108,281,231,234,"Sharpshooter Ranger",2469,14,.@label$; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob03")+"::OnMyMobDead"; + set .@mob_dead_num, 100 - mobcount(.@map$,.@label$); + if (.@mob_dead_num > 85) { + mapannounce .@map$,"Himmelmez: Nice parry. I thought you were going to die slowly surrounded by the dead I summoned~",bc_map,"0xFFFFFF"; + killmonster .@map$,.@label$; + donpcevent instance_npcname("#GHMclear3")+"::OnEnable"; + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnEnable"; + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnEnable"; + donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob03")+"::OnDisable"; + } + end; +} + +// 1st MVP +//============================================================ +1@gl_k,0,0,0 script #ghmemorialmob04 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob04")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob04"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob04"); + monster instance_mapname("1@gl_k"),150,258,"Root of Corruption",2475,1,instance_npcname("#ghmemorialmob04")+"::OnMyMobDead"; + end; +OnMyMobDead: + set .@map$, instance_mapname("1@gl_k"); + if (mobcount(.@map$,instance_npcname("#ghmemorialmob04")+"::OnMyMobDead") < 1) { + mapannounce .@map$, "12 o'clock warp leading to the Chivalry's Second Floor is now open.",bc_map,"0xFFFF00"; + donpcevent instance_npcname("#ghinstancewarp7")+"::OnEnable"; + donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnTalk2"; + donpcevent instance_npcname("#effectGH01")+"::OnEnable"; + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnEnable"; + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob04")+"::OnDisable"; + } + end; +} + +1@gl_k,150,257,3 script #GHMclear3 111,9,9,{ + end; +OnTouch: + donpcevent instance_npcname("#controlGH3")+"::OnEnable"; + specialeffect EF_BASH; + donpcevent instance_npcname("#GHMclear3")+"::OnDisable"; + end; +OnInstanceInit: + donpcevent instance_npcname("#GHMclear3")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#GHMclear3"); + end; +OnEnable: + enablenpc instance_npcname("#GHMclear3"); + initnpctimer; + end; +OnTimer2000: + mapannounce instance_mapname("1@gl_k"), "Himmelmez: You got me tempted to go to the 2nd floor, come to the entrance. I'm curious about how far your luck goes.",bc_map,"0xFFFFFF"; + stopnpctimer; + end; +} + +1@gl_k,0,0,0 script #controlGH3 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#controlGH3")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#controlGH3"); + end; +OnEnable: + enablenpc instance_npcname("#controlGH3"); + initnpctimer; + end; +OnTimer3000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk1"; + end; +OnTimer6000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk2"; + end; +OnTimer9000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk3"; + end; +OnTimer12000: + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk1"; + end; +OnTimer15000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk4"; + end; +OnTimer18000: + donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnTalk1"; + end; +OnTimer21000: + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk2"; + end; +OnTimer24000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk5"; + end; +OnTimer27000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk6"; + end; +OnTimer28000: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnDisable"; + end; +OnTimer31000: + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk3"; + end; +OnTimer32000: + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnDisable"; + end; +OnTimer35000: + mapannounce instance_mapname("1@gl_k"), "An eerie echo from the depths can be heard as you get closer.",bc_map,"0xFFFFFF"; + end; +OnTimer38000: + donpcevent instance_npcname("#ghmemorialmob04")+"::OnEnable"; + stopnpctimer; + donpcevent instance_npcname("#controlGH3")+"::OnDisable"; + end; +} + +1@gl_k,144,258,6 script Heinrich#ghinstance4 652,{ + mes "[Heinrich]"; + mes "Himmelmez... You made my men get killed and I will never forget that."; + cutin "gl_heinrich1",2; + close2; + cutin "gl_heinrich1",255; + end; +OnInstanceInit: + donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Heinrich#ghinstance4"); + end; +OnEnable: + hideoffnpc instance_npcname("Heinrich#ghinstance4"); + end; +OnTalk1: + npctalk "Himmelmez! I won't let you take even a single more step here."; + end; +OnTalk2: + npctalk "What... is this?!"; + end; +OnTalk3: + npctalk "Varmunt Sir! Help the adventurers and I'll chase Himmelmez!"; + end; +} + +1@gl_k,150,257,3 script Himmelmez#ghinstance2 650,{ + mes "[Himmelmez]"; + mes "No need to stare at me with so insecure eyes. Soon they'll become relaxed..."; + cutin "gl_himel2",2; + close2; + cutin "gl_himel2",255; + end; +OnInstanceInit: + donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Himmelmez#ghinstance2"); + end; +OnEnable: + hideoffnpc instance_npcname("Himmelmez#ghinstance2"); + end; +OnTalk1: + npctalk "What an awfully lucky, I flew all the way over here and just one of them is really powerful."; + end; +OnTalk2: + npctalk "But it doesn't matter to me."; + end; +OnTalk3: + npctalk "Now, all of you will die."; + end; +OnTalk4: + npctalk "Hahaha, so you guys thought I would come alone?"; + end; +OnTalk5: + npctalk "This is my new toy to keep you at my feet. Why don't you guys play while I entertain?"; + end; +OnTalk6: + npctalk "Sincerely~, If I am given the opportunity I'd like to meet you again, Heinrich."; + end; +} + +1@gl_k,156,259,3 script Varmunt#ghinstance3 654,{ + if (checkquest(12318,HUNTING) == 2) { + if (checkquest(12319,HUNTING) == -1) { + mes "[Varmunt]"; + mes "There's something unusual about this thing's aura. Maybe someday we will be able to understand what is behind all of this."; + cutin "gl_barmund1",2; + getitem 6608,1; //Coagulated Spell + setquest 12319; + close2; + cutin "gl_barmund1",255; + end; + } + } + mes "[Varmunt]"; + mes "Even after all this time, it is impossible to prevent from the will of the Transcendent."; + cutin "gl_barmund1",2; + close2; + cutin "gl_barmund2",255; + end; +OnInstanceInit: + donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Varmunt#ghinstance3"); + end; +OnEnable: + hideoffnpc instance_npcname("Varmunt#ghinstance3"); + end; +OnTalk1: + npctalk "Heinrich Sir! Something unknown holds an inexplicably powerful force!"; + end; +OnTalk2: + npctalk "From the monster I picked up some great stuff. People who are interested, talk to me."; + end; +} + +// Floor 2 +//============================================================ +2@gl_k,148,67,1 script Heinrich#ghinstance5 652,{ + mes "[Heinrich]"; + mes "Himmelmez's blocking spells"; + mes "are everywhere around here..."; + cutin "gl_heinrich1",2; + close2; + cutin "gl_heinrich1",255; + end; +OnInstanceInit: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Heinrich#ghinstance5"); + end; +OnEnable: + hideoffnpc instance_npcname("Heinrich#ghinstance5"); + end; +OnTalk1: + npctalk "These things have never been in the castle!"; + end; +OnTalk2: + npctalk "Trying to break this power with common weapons doesn't work. I tried it."; + end; +OnTalk3: + npctalk "It is really unforgivable."; + end; +OnTalk4: + npctalk "I, who already was a subordinate of genocide. How much more in the future..."; + end; +OnTalk5: + npctalk "..."; + end; +} + +2@gl_k,151,71,7 script Varmunt#ghinstance4 654,{ + mes "[Varmunt]"; + mes "Why am I doing this again? Doesn't seem like the first time. I've seen this place repeatedly dozens of times in my dreams. This feeling..."; + cutin "gl_barmund1",2; + close2; + cutin "gl_barmund1",255; + end; +OnInstanceInit: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnDisable"; + end; +OnDisable: + hideonnpc instance_npcname("Varmunt#ghinstance4"); + end; +OnEnable: + hideoffnpc instance_npcname("Varmunt#ghinstance4"); + end; +OnTalk2: + npctalk "Himmelmez's enchantment has completely blocked the passage to each section."; + end; +OnTalk3: + npctalk "Get out of the way for a moment. I'll try to somehow break the spell with magical powers."; + end; +OnTalk4: + npctalk "The enchantment seems to be broken."; + end; +OnTalk5: + npctalk "I've never seen this spell before."; + end; +OnTalk6: + npctalk "Himmelmez doesn't use a seal on a person's body to turn it into an undead."; + end; +OnTalk7: + npctalk "She uses enchantment stones.This way, the spell is probably maintained."; + end; +OnTalk8: + npctalk "We should kill the people who have the enchantment stones to break the spell."; + end; +OnTalk9: + npctalk "However, we can't identify them. The purification can only be done randomly."; + end; +OnTalk10: + npctalk "Commandant..."; + end; +OnTalk11: + npctalk "Commandant, it seems too loose."; + end; +OnTalk12: + npctalk "We are related to all these people, not just a few."; + end; +OnTalk13: + npctalk "We can't deny that it's not their fault for what is going on."; + end; +OnTalk14: + npctalk "Well, let's do it then."; + end; +OnTalk15: + npctalk "You guys are of a great help. Try to follow us."; + end; +OnTalk16: + npctalk "There can be a tough fight. Hold on, and it would be nice to eat something."; + end; +OnTalk17: + npctalk "Guys. It is time to depart, Heinrich Sir."; + end; +} + +2@gl_k,150,67,0 script #effectGH01 111,10,10,{ + end; +OnTouch: + specialeffect EF_BASH; + donpcevent instance_npcname("#controlGH4")+"::OnEnable"; + donpcevent instance_npcname("#effectGH01")+"::OnDisable"; + end; +OnEffect: + specialeffect EF_LORD; + end; +OnInstanceInit: + donpcevent instance_npcname("#effectGH01")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#effectGH01"); + end; +OnEnable: + enablenpc instance_npcname("#effectGH01"); + end; +} + +2@gl_k,0,0,0 script #controlGH4 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#controlGH4")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#controlGH4"); + end; +OnEnable: + enablenpc instance_npcname("#controlGH4"); + initnpctimer; + end; +OnTimer3000: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk1"; + donpcevent instance_npcname("#ghmemorialmob05")+"::OnEnable"; + end; +OnTimer6000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk2"; + end; +OnTimer9000: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk2"; + end; +OnTimer12000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk3"; + end; +OnTimer15000: + donpcevent instance_npcname("#effectGH01")+"::OnEnable"; + donpcevent instance_npcname("#effectGH01")+"::OnEffect"; + end; +OnTimer18000: + donpcevent instance_npcname("#effectGH01")+"::OnDisable"; + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk4"; + end; +OnTimer21000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk5"; + end; +OnTimer24000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk6"; + end; +OnTimer27000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk7"; + end; +OnTimer30000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk8"; + end; +OnTimer33000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk9"; + end; +OnTimer36000: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk3"; + end; +OnTimer39000: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk4"; + end; +OnTimer42000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk10"; + end; +OnTimer45000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk11"; + end; +OnTimer48000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk12"; + end; +OnTimer51000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk13"; + end; +OnTimer54000: + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk5"; + end; +OnTimer57000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk14"; + end; +OnTimer60000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk15"; + end; +OnTimer63000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk16"; + end; +OnTimer66000: + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk17"; + end; +OnTimer69000: + mapannounce instance_mapname("2@gl_k"), "9 o'clock positioned warp leading to the 1st zone has been opened. Move from the central hallway. A being with an evil aura seems to be appearing in this region.",bc_map,"0xFFFF00"; + donpcevent instance_npcname("#ghinstancewarp8")+"::OnEnable"; + donpcevent instance_npcname("#ghinstancewarp9")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob06")+"::OnEnable"; + donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnDisable"; + donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnDisable"; + end; +OnTimer70000: + stopnpctimer; + donpcevent instance_npcname("#controlGH4")+"::OnDisable"; + end; +} + +2@gl_k,0,0,0 script #ghmemorialmob05 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob05")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob05"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob05"); + set .@map$, instance_mapname("2@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead"; + areamonster .@map$,124,20,31,162,"Decayed Guard",2468,8,.@label$; + areamonster .@map$,124,20,31,162,"Sharpshooter Ranger",2469,8,.@label$; + areamonster .@map$,124,20,31,162,"Fallen Abyss Knight",2470,8,.@label$; + areamonster .@map$,124,20,31,162,"Suffering Khalitzburg",2471,8,.@label$; + areamonster .@map$,124,20,31,162,"Swollen Knight",2472,8,.@label$; + set .MyMobs,80; + end; +OnMyMobDead: + set .@map$, instance_mapname("2@gl_k"); + set .MyMobs, .MyMobs-1; + if (.MyMobs == 0) { + mapannounce .@map$, "A being with an evil aura seems to be appearing in this region.",bc_map,"0xFFFF00"; + donpcevent instance_npcname("#ghmemorialmob06")+"::OnDisable2"; + donpcevent instance_npcname("#ghmemorialmob07")+"::OnEnable"; + donpcevent instance_npcname("#ghmemorialmob05")+"::OnDisable"; + } else { + set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead"; + switch(rand(5)) { + case 0: + areamonster .@map$,124,20,31,162,"Decayed Guard",2468,1,.@label$; + break; + case 1: + areamonster .@map$,124,20,31,162,"Sharpshooter Ranger",2469,1,.@label$; + break; + case 2: + areamonster .@map$,124,20,31,162,"Fallen Abyss Knight",2470,1,.@label$; + break; + case 3: + areamonster .@map$,124,20,31,162,"Suffering Khalitzburg",2471,1,.@label$; + break; + case 4: + areamonster .@map$,124,20,31,162,"Swollen Knight",2472,1,.@label$; + break; + } + } + end; +} + +2@gl_k,0,0,0 script #ghmemorialmob06 -1,{ +OnInstanceInit: + donpcevent instance_npcname("#ghmemorialmob06")+"::OnDisable"; + end; +OnDisable: + disablenpc instance_npcname("#ghmemorialmob06"); + end; +OnDisable2: + stopnpctimer; + disablenpc instance_npcname("#ghmemorialmob06"); + end; +OnEnable: + enablenpc instance_npcname("#ghmemorialmob06"); + donpcevent instance_npcname("#ghmemorialmob06")+"::OnSpawn"; + end; +OnSpawn: + initnpctimer; + end; +OnTimer90000: + set .@map$, instance_mapname("2@gl_k"); + set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead"; + setarray .@c[0], + 114,141,118,139, + 128,83,131,78, + 88,53,93,48, + 54,47,61,40, + 58,83,63,78, + 69,138,80,127, + 34,143,39,138; + for(set .@i,0; .@i