Prechádzať zdrojové kódy

Infinite Space Instance (#6554)

Implemented Infinite Space instance (Episode 16.1 version)
Implemented related shops, enchanter and misc NPCs.
Implemented item and monster from the 16.1 Update.

Thanks to @crazy-arashi, @Atemo, @Lemongrass3110, @hannicaldummy 
Credits to @crazy-arashi for the initial script release
Everade 3 rokov pred
rodič
commit
69de8663a7

+ 7 - 0
db/re/instance_db.yml

@@ -301,3 +301,10 @@ Body:
       Map: 1@slw
       X: 187
       Y: 24
+  - Id: 38
+    Name: Infinite Space
+    TimeLimit: 3600
+    Enter:
+      Map: 1@infi
+      X: 30
+      Y: 10

+ 5 - 5
db/re/item_combos.yml

@@ -275,16 +275,16 @@ Body:
       /* Confirm: Success rate */
   - Combos:
       - Combo:
-          - Rift_Ancient_Armor
-          - Rift_Ancient_Decoration
+          - Armor_Of_Goddess
+          - Accessories_Of_Goddess
     Script: |
       bonus bMaxSP,100;
       bonus bNoCastCancel;
   - Combos:
       - Combo:
-          - Rift_Ancient_Armor
-          - Rift_Manteau
-          - Rift_Shoes
+          - Armor_Of_Goddess
+          - ManteauOfCracks
+          - Shoes_Of_Cracks
     Script: |
       .@r = getequiprefinerycnt(EQI_ARMOR)+getequiprefinerycnt(EQI_GARMENT)+getequiprefinerycnt(EQI_SHOES);
       bonus bMaxHP,1000;

+ 24 - 23
db/re/item_db_equip.yml

@@ -18671,7 +18671,7 @@ Body:
       bonus bDex,8;
       bonus bVit,8;
   - Id: 1938
-    AegisName: Infinity_Violin
+    AegisName: Viollin_Of_Infinite
     Name: Infinity Violin
     Type: Weapon
     SubType: Musical
@@ -19876,11 +19876,11 @@ Body:
       bonus bDex,8;
       bonus bVit,8;
   - Id: 1994
-    AegisName: Infinity_Whip
+    AegisName: Whip_Of_Infinite
     Name: Infinity Whip
     Type: Weapon
     SubType: Whip
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 150
     Range: 2
@@ -20664,11 +20664,11 @@ Body:
     UnEquipScript: |
       heal -1000,0;
   - Id: 2024
-    AegisName: Infinity_Two-handed_Stick
-    Name: Infinity Two-handed Stick
+    AegisName: D_Staff_Of_Infinite
+    Name: Infinity Two-Handed Staff
     Type: Weapon
     SubType: 2hStaff
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 30
     MagicAttack: 170
@@ -59203,11 +59203,11 @@ Body:
          bonus bBaseAtk,3*(min(BaseLevel,120)/10);
       }
   - Id: 13126
-    AegisName: Infinity_Pistol
+    AegisName: Gun_Of_Infinite
     Name: Infinity Pistol
     Type: Weapon
     SubType: Revolver
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 175
     Range: 7
@@ -61159,10 +61159,11 @@ Body:
       if (BaseLevel >= 20 && BaseLevel <= 120)
          bonus bBaseAtk,3*.@r/10;
   - Id: 13323
-    AegisName: Infinity_Shuriken
+    AegisName: Huuma_Of_Infinite
     Name: Infinity Shuriken
     Type: Weapon
     SubType: Huuma
+    Buy: 20
     Weight: 500
     Attack: 150
     MagicAttack: 40
@@ -66602,10 +66603,10 @@ Body:
       bonus bMdef,5+.@r;
       bonus2 bSubRace,RC_Formless,5+.@r;
   - Id: 15141
-    AegisName: Rift_Ancient_Armor
+    AegisName: Armor_Of_Goddess
     Name: Rift Ancient Armor
     Type: Armor
-    Buy: 10
+    Buy: 20
     Weight: 500
     Defense: 30
     Slots: 1
@@ -70019,11 +70020,11 @@ Body:
       bonus bVit,8;
       bonus bInt,8;
   - Id: 16038
-    AegisName: Infinity_Mace
+    AegisName: Mace_Of_Infinite
     Name: Infinity Mace
     Type: Weapon
     SubType: Mace
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 155
     Range: 1
@@ -71606,7 +71607,7 @@ Body:
       bonus bAgi,8;
       bonus bDex,8;
   - Id: 18128
-    AegisName: Infinity_Bow
+    AegisName: Bow_Of_Infinite
     Name: Infinity Bow
     Type: Weapon
     SubType: Bow
@@ -80537,8 +80538,8 @@ Body:
       bonus2 bAddRace,RC_Angel,5;
       bonus2 bSubRace,RC_Angel,5;
   - Id: 19033
-    AegisName: Rift_Ancient_Decoration
-    Name: Rift Ancient Decoration
+    AegisName: Accessories_Of_Goddess
+    Name: Ancient Rift Ornament
     Type: Armor
     Buy: 20
     Weight: 200
@@ -96498,7 +96499,7 @@ Body:
          bonus bSPGainValue,20;
       }
   - Id: 20779
-    AegisName: Rift_Manteau
+    AegisName: ManteauOfCracks
     Name: Rift Manteau
     Type: Armor
     Buy: 20
@@ -99540,7 +99541,7 @@ Body:
       bonus2 bSkillUseSP,"KN_AUTOCOUNTER",2;
       bonus2 bSkillUseSP,"LK_PARRYING",25;
   - Id: 21014
-    AegisName: Infinity_Two-Handed_Sword
+    AegisName: D_Sword_Of_Infinite
     Name: Infinity Two-Handed Sword
     Type: Weapon
     SubType: 2hSword
@@ -101447,7 +101448,7 @@ Body:
       if (.@r > 9)
          bonus bSpeedRate,25;
   - Id: 22075
-    AegisName: Rift_Shoes
+    AegisName: Shoes_Of_Cracks
     Name: Rift Shoes
     Type: Armor
     Buy: 20
@@ -118074,11 +118075,11 @@ Body:
       bonus bStr,8;
       bonus bVit,8;
   - Id: 28105
-    AegisName: Infinity_Axe
+    AegisName: Axe_Of_Infinite
     Name: Infinity Axe
     Type: Weapon
     SubType: 2hAxe
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 265
     Range: 1
@@ -123306,11 +123307,11 @@ Body:
     EquipLevelMin: 120
     Refineable: true
   - Id: 28703
-    AegisName: Infinity_Dagger
+    AegisName: Dagger_Of_Infinite
     Name: Infinity Dagger
     Type: Weapon
     SubType: Dagger
-    Buy: 10
+    Buy: 20
     Weight: 500
     Attack: 125
     MagicAttack: 100

+ 5 - 2
db/re/item_db_etc.yml

@@ -23054,12 +23054,15 @@ Body:
       NoMail: true
       NoAuction: true
   - Id: 6905
-    AegisName: Broken_Magic_Stone
+    AegisName: Shattered_Rune
     Name: Broken Magic Stone
     Type: Etc
-    Buy: 10
+    Buy: 2
     Flags:
       BuyingStore: true
+    Trade:
+      NoMail: true
+      NoAuction: true
   - Id: 6906
     AegisName: Limited_High_Density_Kalunium
     Name: (Limited)High Density Kalunium

+ 7 - 0
db/re/item_db_usable.yml

@@ -45641,6 +45641,13 @@ Body:
     Script: |
       sc_start SC_EXPBOOST,1800000,50;
       sc_start SC_ITEMBOOST,1800000,100;
+  - Id: 22980
+    AegisName: InfinityD_ReturnScroll
+    Name: Return of Infinite Dungeon
+    Type: Usable
+    Weight: 10
+    Script: |
+      warp "cmd_fild07",83,270;
   - Id: 22984
     AegisName: Dr_Life_Potion_01
     Name: Kahluna Milk

+ 89 - 12
db/re/mob_db.yml

@@ -84798,7 +84798,7 @@ Body:
     Drops:
       - Item: Big_Sis'_Ribbon
         Rate: 25
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Bluish_Green_Jewel
         Rate: 500
@@ -84858,7 +84858,7 @@ Body:
         Rate: 500
       - Item: Light_Granule
         Rate: 250
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Min_Vagabond_Wolf_Card
         Rate: 1
@@ -84902,7 +84902,7 @@ Body:
         Rate: 4000
       - Item: Azure_Jewel
         Rate: 500
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Angel's_Arrival
         Rate: 500
@@ -84948,7 +84948,7 @@ Body:
     Drops:
       - Item: Fillet
         Rate: 100
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: White_Jewel
         Rate: 600
@@ -84999,7 +84999,7 @@ Body:
         Rate: 2668
       - Item: Slender_Snake
         Rate: 1250
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: War_Axe
         Rate: 1
@@ -85058,7 +85058,7 @@ Body:
         Rate: 75
       - Item: Smoking_Pipe
         Rate: 125
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Katar_Of_Raging_Blaze
         Rate: 250
@@ -85121,7 +85121,7 @@ Body:
         Rate: 100
       - Item: Jamadhar_
         Rate: 300
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Spinx_Helm
         Rate: 75
@@ -85178,7 +85178,7 @@ Body:
         Rate: 250
       - Item: Sucsamad
         Rate: 75
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Mr_Scream
         Rate: 150
@@ -85243,7 +85243,7 @@ Body:
         Rate: 125
       - Item: Orcish_Sword
         Rate: 500
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Giant_Axe
         Rate: 50
@@ -85294,7 +85294,7 @@ Body:
     Drops:
       - Item: Gemstone
         Rate: 2425
-      - Item: Broken_Magic_Stone
+      - Item: Shattered_Rune
         Rate: 10000
       - Item: Golden_Jewel
         Rate: 500
@@ -85335,6 +85335,9 @@ Body:
     AttackMotion: 816
     DamageMotion: 288
     Ai: 02
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3432
     AegisName: MIN_G_WOLF
     Name: Wolf 
@@ -85362,6 +85365,9 @@ Body:
     AttackMotion: 504
     DamageMotion: 432
     Ai: 02
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3433
     AegisName: MIN_G_ROCKER
     Name: Rocker
@@ -85389,6 +85395,9 @@ Body:
     AttackMotion: 864
     DamageMotion: 540
     Ai: 02
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3434
     AegisName: MIN_G_LUNATIC
     Name: Lunatic
@@ -85414,6 +85423,9 @@ Body:
     AttackMotion: 456
     DamageMotion: 336
     Ai: 02
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3435
     AegisName: MIN_G_GARGOYLE
     Name: Gargoyle
@@ -85441,6 +85453,9 @@ Body:
     AttackMotion: 720
     DamageMotion: 384
     Ai: 05
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3436
     AegisName: MIN_G_BIGFOOT
     Name: Bigfoot
@@ -85466,6 +85481,9 @@ Body:
     AttackMotion: 192
     DamageMotion: 192
     Ai: 17
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3437
     AegisName: MIN_G_ANCIENT_MUMMY
     Name: Ancient Mummy
@@ -85493,6 +85511,9 @@ Body:
     AttackMotion: 120
     DamageMotion: 384
     Ai: 21
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3438
     AegisName: MIN_G_SAND_MAN
     Name: Sandman
@@ -85520,6 +85541,9 @@ Body:
     AttackMotion: 720
     DamageMotion: 288
     Ai: 04
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3439
     AegisName: MIN_G_HIGH_ORC
     Name: High Orc
@@ -85547,6 +85571,9 @@ Body:
     AttackMotion: 500
     DamageMotion: 1000
     Ai: 04
+    Modes:
+      Detector: true
+      Aggressive: true
   - Id: 3440
     AegisName: MIN_G_MEGALITH
     Name: Megalith
@@ -85574,6 +85601,9 @@ Body:
     AttackMotion: 1332
     DamageMotion: 672
     Ai: 21
+    Modes:
+      Detector: true
+      Aggressive: true
 #  - Id: 3441
 #    AegisName: B_DRACULA
   - Id: 3442
@@ -86881,8 +86911,55 @@ Body:
 #    AegisName: E_WILD_MOBSTER
 #  - Id: 3493
 #    AegisName: SYS_MSG_J
-#  - Id: 3494
-#    AegisName: IFN_POIRING
+  - Id: 3494
+    AegisName: IFN_POIRING
+    Name: Shining Poring
+    Level: 100
+    Hp: 15
+    Attack: 100
+    Attack2: 100
+    Str: 10
+    Agi: 10
+    Vit: 10
+    Int: 10
+    Luk: 10
+    AttackRange: 2
+    SkillRange: 10
+    ChaseRange: 10
+    Size: Small
+    Race: Formless
+    Element: Neutral
+    ElementLevel: 1
+    WalkSpeed: 100
+    AttackDelay: 0
+    AttackMotion: 0
+    DamageMotion: 0
+    Ai: 01
+    Class: Guardian
+    Modes:
+      IgnoreMagic: true
+      IgnoreMelee: true
+      IgnoreMisc: true
+      IgnoreRanged: true
+      KnockBackImmune: true
+    Drops:
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+      - Item: Shattered_Rune
+        Rate: 3000
+        StealProtected: true
   - Id: 3495
     AegisName: DR_EGGRING
     Name: Eggring

+ 7 - 0
db/re/mob_skill_db.txt

@@ -12015,6 +12015,7 @@
 3254,T_W_O@NPC_WIDESOULDRAIN,attack,680,10,10000,0,60000,no,self,always,0,,,,,,,
 3254,T_W_O@NPC_CRITICALWOUND,attack,673,5,1500,500,45000,no,target,always,,,,,,,,
 
+// Episode 15.2 - Infinite Space
 3384,MIN_PORING@NPC_EMOTION,loot,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
 3386,MIN_FABRE@NPC_GROUNDATTACK,attack,185,1,2000,0,5000,yes,target,always,0,,,,,,,
 3387,MIN_PICKY@NPC_EMOTION,walk,197,1,2000,0,5000,yes,self,always,0,2,,,,,,
@@ -12381,6 +12382,12 @@
 3490,IMMORTAL_CO_CMDER@SA_DISPELL,chase,289,5,1000,0,10000,yes,target,always,0,,,,,,,
 3490,IMMORTAL_CO_CMDER@SA_DISPELL,attack,289,5,1000,0,10000,yes,target,always,0,,,,,,,
 
+// Episode 16.1 - Infinite Space Update
+3494,Shining Poring@NPC_RUN,attack,354,1,10000,0,0,yes,self,myhpltmaxrate,99,,,,,,29,
+3494,Shining Poring@NPC_RUN,chase,354,1,10000,0,0,yes,self,myhpltmaxrate,99,,,,,,29,
+3494,Shining Poring@MG_SAFETYWALL,attack,12,1,1000,1000,10000,no,self,always,0,,,,,,18,
+3494,Shining Poring@AL_INCAGI,chase,29,1,500,700,60000,no,self,always,,,,,,,6,
+
 3505,DR_BIG_EGGRING@NPC_SUMMONSLAVE,attack,196,4,10000,2000,10000,no,self,slavele,3,3508,,,,,,
 3505,DR_BIG_EGGRING@NPC_SUMMONSLAVE,idle,196,4,10000,2000,10000,no,self,slavele,3,3508,,,,,,
 

+ 41 - 0
npc/re/cities/comodo.txt

@@ -0,0 +1,41 @@
+//===== rAthena Script =======================================
+//= Comodo Town
+//===== Description: =========================================
+//= NPCs in Comodo
+//===== Additional Comments: =================================
+//= 1.0 Initial release [crazyarashi]
+//= 1.1 Improved translations [Everade]
+//============================================================
+
+// Infinite Space
+//============================================================
+cmd_fild07,43,275,7	script	Spectator#pa0829_01	4_M_01,{
+	mes "[Spectator]";
+	mes "If you tell me to not go in, isn't it going to make me want to go inside even more? But it doesn't look like there's anything interesting to see.";
+	mes "I see no monsters here...";
+	close;
+}
+
+cmd_fild07,45,273,7	script	Passerby#pa0829_01	4_F_JOB_HUNTER,{
+	mes "[Passerby]";
+	mes "No... I'm just passing by. I don't want to go inside...";
+	close;
+}
+
+cmd_fild07,47,274,0	script	Traveler#pa0829_01	4_F_07,{
+	mes "[Traveler]";
+	mes "Rumors have been spreading that there are monsters living here. People claim to hear the ground rumbling because of them...";
+	next;
+	mes "[Traveler]";
+	mes "I want to go explore inside...";
+	close;
+}
+
+cmd_fild07,50,271,0	script	Adventurer#pa0829_01	4_M_03,{
+	mes "[Adventurer]";
+	mes "Do you think there's going to be treasure inside this place?";
+	next;
+	mes "[Adventurer]";
+	mes "It kind of smells like it...";
+	close;
+}

+ 823 - 0
npc/re/instances/InfiniteSpace.txt

@@ -0,0 +1,823 @@
+//===== rAthena Script =======================================
+//= Infinite Space
+//===== Description: =========================================
+//= [Walkthrough Conversion]
+//= Infinite Space with hard mode (Episode 16.1)
+//===== Changelogs: ==========================================
+//= 1.0 Initial release [crazyarashi]
+//= 1.1 Updated to match official mechanics [Everade]
+//= 1.2 Moved merchants to individual files [Everade]
+//= 1.3 Cleanup and sanity checks [Everade]
+//============================================================
+
+cmd_fild07,58,278,3	script	Reckless Explorer#pa0829_01	4_F_GON,{
+	mes "^FF0000Please note that, any abnormal monster handling inside the instance such as taming is not considered normal and may hinder the instance progress.^000000"; 
+	next;
+	if (BaseLevel < 100) {
+		mes "[ Reckless Explorer ]";
+		mes "Will you come back to me after getting a little bit stronger? How about getting to level 100 first?";
+		close;
+	}
+	if (isbegin_quest(12364) != 2) {
+		mes "[ Reckless Explorer ]";
+		mes "Ah, no, I didn't meant to go inside. I didn't meant to violate any laws.";
+		next;
+		select("What are you talking about?");
+		mes "[ Reckless Explorer ]";
+		mes "Ha?";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "Hmm, are you one of the Royal Palace's suppression squad?";
+		next;
+		select("I'm an ordinary adventurer.");
+		mes "[ Reckless Explorer ]";
+		mes "Phew~ That's a relief.";
+		mes "I've never soon you before, so I thought you are one of the suppression squad of the palace.";
+		next;
+		if (select("What if I am one of the suppression squad?:What's the matter?") == 1) {
+			mes "[ Reckless Explorer ]";
+			mes "I'm just an ordinary woman who's out for a walk. And this is the end of my walk, and I'm going to...";
+			close;
+		}
+		mes "[ Reckless Explorer ]";
+		mes "Have you heard about the Paros Lighthouse collapse?";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "^777700(She moved close to me)^000000";
+		mes "The Paros Lighthouse here collapsed for some unknown reason some time ago, and there's a lot of stuff underneath it.";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "Some of the restoration workers and guards that were sent to the palace went missing. Rumors has it that monsters are crawling down there.";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "Because its depth is seemingly endless, the people here became afraid of this place and started calling it Infinite Space.";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "I know some people who sneaked in and made a fortune. That's why I'm going to give it a try, are you interested?";
+		next;
+		if (select("I'm not interested.:Yes.") == 1) {
+			mes "[ Reckless Explorer ]";
+			mes "That's unfortunate. Come back whenever you change your mind. I'll welcome you anytime.";
+			close;
+		}
+		mes "[ Reckless Explorer ]";
+		mes "All right, Just one thing, I'm inexperienced and a novice adventurer. So I'll help you explore down there by guiding you from somewhere safe.";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "I'm an adventure tour, and you can explore it yourself. Aren't we compatible with each other? Then, let's get started when you're ready.";
+		setquest 12364;
+		completequest 12364;
+	} else {
+		mes "[ Reckless Explorer ]";
+		mes "Are you going in there again this time?";
+		switch (checkquest(12365,PLAYTIME)) {
+			case -1:
+				break;
+
+			case 0:
+			case 1:
+				next;
+				mes "[ Reckless Explorer ]";
+				mes "Oh, your whole body is shouting that it's tired. You can't go down there like this.";
+				close;
+
+			case 2:
+				erasequest 12365;
+				break;
+		}
+	}
+	next;
+	.@md_name$ = "Infinite Space";
+	.@party_id = getcharid(1);
+	if (!.@party_id) {
+		mes "[ Reckless Explorer ]";
+		mes "It's impossible alone. Would you like to organize a party at least one person or join another party and come back?";
+		close;
+	}
+	if (select("Prepare to enter Infinite Space:Cancel") == 2)
+		close;
+	mes "[ Reckless Explorer ]";
+	mes "Once the passage opens, take a breath for a while and talk to me again.";
+	if (instance_create(.@md_name$) == -3)
+		dispbottom "The reservation of the instance '" + .@md_name$ + "' has failed due to an active instance.";
+	close;
+}
+
+cmd_fild07,54,280,5	script	Temporary Entrance#pa0829_01	PORTAL,{
+	switch (checkquest(12365,PLAYTIME)) {
+		case -1:
+			break;
+
+		case 0:
+		case 1:
+			mes "The passage is not yet activated.";
+			close;
+
+		case 2:
+			erasequest 12365;
+			break;
+	}
+	.@party_id = getcharid(1);
+	.@party_name = getpartyname(.@party_id);
+	.@md_name$ = "Infinite Space";
+	switch (instance_enter(.@md_name$)) {
+		case IE_OK:
+			setquest 12365;
+			mapannounce "cmd_fild07", strcharinfo(0) + " of the party, "+ .@party_name$ +", is entering the " + .@md_name$ + ".", bc_map, "0x00FF99";
+			end;
+
+		default:
+			mes "The passage is not yet activated.";
+			close;
+	}
+}
+
+1@infi,1,1,0	script	#inf_space_control	HIDDEN_WARP_NPC,{
+	end;
+
+OnInstanceInit:
+	'map$ = instance_mapname("1@infi");
+	'floor = 1;
+	'sanity = 0;
+
+	enablenpc instance_npcname("#inf_space_mobs");
+	enablenpc instance_npcname("#w0_0");
+	enablenpc instance_npcname("#w0");
+	disablenpc instance_npcname("#w50_ppl");
+	hideonnpc instance_npcname("#w0");
+
+	// Initiate Warp Portals
+	for (.@i = 1; .@i < 50; .@i++)
+		disablenpc instance_npcname("#w" + .@i);
+
+	// Initiate Treasure Chests
+	for (.@i = 10; .@i < 51; .@i += 10)
+		disablenpc instance_npcname("#w" + .@i + "_t");
+
+	// Initiate Floor Coordinates
+	setarray .@xy[1],
+	//1~10
+	27,18,33,25,
+	29,47,36,57,
+	24,81,34,91,
+	25,112,35,123,
+	16,152,45,164,
+	24,228,34,239,
+	26,261,35,271,
+	25,291,36,302,
+	24,324,35,335,
+	23,375,23,375,
+	//11~20
+	108,15,118,29,
+	108,49,118,58,
+	107,80,118,91,
+	108,111,116,121,
+	99,152,123,163,
+	106,229,116,236,
+	106,259,117,271,
+	109,295,118,303,
+	107,324,118,335,
+	114,364,114,364,
+	//21~30
+	192,15,204,25,
+	192,47,202,56,
+	193,80,204,91,
+	192,111,204,122,
+	191,152,212,162,
+	188,219,200,231,
+	190,251,199,263,
+	188,283,199,295,
+	188,315,199,327,
+	202,385,202,385,
+	//31~40
+	274,16,285,22,
+	274,49,283,58,
+	274,80,285,91,
+	276,112,286,123,
+	268,153,294,164,
+	274,220,286,231,
+	276,252,285,263,
+	274,283,286,294,
+	275,316,286,323,
+	269,376,269,376,
+	//40~50
+	356,20,364,27,
+	357,48,367,58,
+	357,79,368,91,
+	356,112,368,123,
+	349,152,374,164,
+	362,221,371,230,
+	360,251,372,263,
+	361,283,372,295,
+	360,315,372,325,
+	354,376,354,376;
+	for (.@i = 1; .@i < getarraysize(.@xy); .@i += 4) {
+		.@f++;
+		setd("'xy_" + .@f + "$",.@xy[.@i] + "," + .@xy[.@i+1] + "," + .@xy[.@i+2] + "," + .@xy[.@i+3]);
+	}
+end;
+}
+
+// Monster spawn mechanics
+1@infi,1,1,0	script	#inf_space_mobs	HIDDEN_WARP_NPC,{
+	end;
+
+OnSummonPoring:
+	.@event2$ = instance_npcname(strnpcinfo(0)) + "::OnPoringKill";
+	if (!mobcount('map$,.@event2$)) {
+		explode(.@xy$,getd("'xy_" + 'floor + "$"),",");
+		areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",3494,1,.@event2$;
+		initnpctimer;
+	}
+	end;
+
+OnTimer20000:
+	.@event2$ = instance_npcname(strnpcinfo(0)) + "::OnPoringKill";
+	killmonster 'map$,.@event2$;
+	stopnpctimer;
+	end;
+
+OnSummon:
+	.@event$ = instance_npcname(strnpcinfo(0)) + "::OnMobKill";
+	switch ('floor) {
+		case 1:
+			setarray .@mob,3384,3385,3386;
+			setarray .@amount,6,5,3;
+			break;
+
+		case 2:
+			setarray .@mob,3384,3386,3387;
+			setarray .@amount,6,3,2;
+			break;
+
+		case 3:
+			setarray .@mob,3385,3386,3387;
+			setarray .@amount,5,3,4;
+			break;
+
+		case 4:
+			setarray .@mob,3386,3387,3388;
+			setarray .@amount,3,5,3;
+			break;
+
+		case 5:
+			setarray .@mob,3386,3387,3388,3389,3390,3391;
+			setarray .@amount,5,3,5,2,2,1;
+			break;
+
+		case 6:
+			setarray .@mob,3387,3388,3389;
+			setarray .@amount,9,4,2;
+			break;
+
+		case 7:
+			setarray .@mob,3388,3389,3390;
+			setarray .@amount,8,7,2;
+			break;
+
+		case 8:
+			setarray .@mob,3389,3390,3391;
+			setarray .@amount,6,3,3;
+			break;
+
+		case 9:
+			setarray .@mob,3390,3391,3392;
+			setarray .@amount,7,4,6;
+			break;
+
+		case 10:
+			setarray .@mob,3426;
+			setarray .@amount,1;
+			break;
+
+		case 11:
+			setarray .@mob,3391,3392,3393;
+			setarray .@amount,5,5,4;
+			break;
+
+		case 12:
+			setarray .@mob,3392,3393,3394;
+			setarray .@amount,9,5,1;
+			break;
+
+		case 13:
+			setarray .@mob,3393,3394,3395;
+			setarray .@amount,8,3,5;
+			break;
+
+		case 14:
+			setarray .@mob,3394,3395,3396;
+			setarray .@amount,9,6,5;
+			break;
+
+		case 15:
+			setarray .@mob,3393,3394,3395,3396,3397,3398,3399;
+			setarray .@amount,4,4,7,5,3,4,3;
+			break;
+
+		case 16:
+			setarray .@mob,3395,3396,3397;
+			setarray .@amount,6,4,5;
+			break;
+
+		case 17:
+			setarray .@mob,3396,3397,3398;
+			setarray .@amount,7,4,4;
+			break;
+
+		case 18:
+			setarray .@mob,3397,3398,3399;
+			setarray .@amount,7,6,4;
+			break;
+
+		case 19:
+			setarray .@mob,3398,3399,3400;
+			setarray .@amount,9,4,3;
+			break;
+
+		case 20:
+			setarray .@mob,3427;
+			setarray .@amount,1;
+			break;
+
+		case 21:
+			setarray .@mob,3399,3400,3401;
+			setarray .@amount,7,5,3;
+			break;
+
+		case 22:
+			setarray .@mob,3400,3401,3402;
+			setarray .@amount,8,6,2;
+			break;
+
+		case 23:
+			setarray .@mob,3401,3402,3403;
+			setarray .@amount,8,7,5;
+			break;
+
+		case 24:
+			setarray .@mob,3402,3403,3404;
+			setarray .@amount,8,6,5;
+			break;
+
+		case 25:
+			setarray .@mob,3402,3403,3404,3405,3406,3407,3408;
+			setarray .@amount,3,4,5,4,3,3,2;
+			break;
+
+		case 26:
+			setarray .@mob,3403,3404,3405;
+			setarray .@amount,7,6,5;
+			break;
+
+		case 27:
+			setarray .@mob,3404,3405,3406;
+			setarray .@amount,6,5,5;
+			break;
+
+		case 28:
+			setarray .@mob,3405,3406,3407;
+			setarray .@amount,9,5,4;
+			break;
+
+		case 29:
+			setarray .@mob,3406,3407,3408;
+			setarray .@amount,7,5,2;
+			break;
+
+		case 30:
+			setarray .@mob,3428;
+			setarray .@amount,1;
+			break;
+
+		case 31:
+			setarray .@mob,3407,3408,3409;
+			setarray .@amount,8,4,4;
+			break;
+
+		case 32:
+			setarray .@mob,3408,3409,3410;
+			setarray .@amount,5,4,5;
+			break;
+
+		case 33:
+			setarray .@mob,3409,3410,3411;
+			setarray .@amount,6,5,3;
+			break;
+
+		case 34:
+			setarray .@mob,3410,3411,3412;
+			setarray .@amount,7,3,2;
+			break;
+
+		case 35:
+			setarray .@mob,3409,3410,3411,3412,3413,3414;
+			setarray .@amount,6,6,4,5,3,4;
+			break;
+
+		case 36:
+			setarray .@mob,3411,3412,3413;
+			setarray .@amount,8,3,3;
+			break;
+
+		case 37:
+			setarray .@mob,3412,3413,3414;
+			setarray .@amount,6,5,6;
+			break;
+
+		case 38:
+			setarray .@mob,3413,3414,3415;
+			setarray .@amount,6,4,2;
+			break;
+
+		case 39:
+			setarray .@mob,3414,3415,3416;
+			setarray .@amount,6,6,4;
+			break;
+
+		case 40:
+			setarray .@mob,3429;
+			setarray .@amount,1;
+			break;
+
+		case 41:
+			setarray .@mob,3415,3416,3417;
+			setarray .@amount,7,4,3;
+			break;
+
+		case 42:
+			setarray .@mob,3416,3417,3418;
+			setarray .@amount,8,3,5;
+			break;
+
+		case 43:
+			setarray .@mob,3417,3418,3419;
+			setarray .@amount,5,4,2;
+			break;
+
+		case 44:
+			setarray .@mob,3418,3419,3420;
+			setarray .@amount,5,7,2;
+			break;
+
+		case 45:
+			setarray .@mob,3414,3415,3416,3417,3418,3419,3420;
+			setarray .@amount,4,5,4,3,6,5,4;
+			break;
+
+		case 46:
+			setarray .@mob,3412,3419;
+			setarray .@amount,2,7;
+			break;
+
+		case 47:
+			setarray .@mob,3413,3419,3420;
+			setarray .@amount,4,7,6;
+			break;
+
+		case 48:
+			setarray .@mob,3414,3419,3420;
+			setarray .@amount,3,6,6;
+			break;
+
+		case 49:
+			setarray .@mob,3415,3419,3420;
+			setarray .@amount,4,5,9;
+			break;
+
+		case 50:
+			setarray .@mob,3430;
+			setarray .@amount,1;
+			break;
+	}
+
+	if (rand(1,100) <= 'poring_chance)
+		donpcevent instance_npcname(strnpcinfo(0)) + "::OnSummonPoring";
+
+	explode(.@xy$,getd("'xy_" + 'floor + "$"),",");
+	for (.@i = 0; .@i < getarraysize(.@mob); .@i++) {
+		areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",.@mob[.@i],.@amount[.@i],.@event$;
+		if (('floor % 10) == 0) {
+			'boss_id = $@mobid[0];
+			donpcevent instance_npcname(strnpcinfo(0)) + "::OnUnitSpawn";
+		}
+	}
+	if ('floor > 0 && 'floor % 10 > 0 && 'mode == 2) {
+		if (rand(1,100) <= 10) {
+			.@boss_id = rand(3421,3425);
+			while ('last_boss == .@boss_id)
+				.@boss_id = rand(3421,3425);
+			'last_boss = .@boss_id;
+			areamonster 'map$,atoi(.@xy$[0]),atoi(.@xy$[1]),atoi(.@xy$[2]),atoi(.@xy$[3]),"--ja--",.@boss_id,1,.@event$;
+		}
+	}
+	end;
+
+OnUnitSpawn:
+	.@event$ = instance_npcname(strnpcinfo(0)) + "::OnUnitKill";
+
+	setarray .@mob_id,3426,3427,3428,3429,3430;
+	setarray .@spawn,3436,3437,3438,3439,3440;
+	setarray .@amount,5,7,7,6,6;
+
+	setarray .@unit_id,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440;
+	setarray .@unit_amount,3,3,4,4,5,5,4,4,5,5;
+	getunitdata 'boss_id,.@data;
+	.@index = inarray(.@mob_id,.@data[UMOB_CLASS]);
+	.@x = .@data[UMOB_X];
+	.@y = .@data[UMOB_Y];
+	areamonster 'map$,.@x,.@y,.@x,.@y,"--ja--",.@spawn[.@index],.@amount[.@index],.@event$;
+	if ('mode == 2) {
+		sleep 10000;
+		while (.@index < getarraysize(.@unit_id)) {
+			if (unitexists('boss_id)) {
+				mapannounce 'map$,"The boss monster is trying to summon its allies.",0xFFFF00;
+				getunitdata 'boss_id,.@data;
+				.@x = .@data[UMOB_X];
+				.@y = .@data[UMOB_Y];
+				areamonster 'map$,.@x - 3,.@y - 3,.@x + 3,.@y + 3,"--ja--",.@unit_id[.@index],.@unit_amount[.@index],.@event$;
+				.@index++;
+			} else 
+				break;
+			sleep 5000;
+		}
+	}
+OnUnitKill:
+	end;
+
+OnMobKill:
+	.@event$ = instance_npcname(strnpcinfo(0)) + "::OnMobKill";
+	if (rand(1,100) <= 'poring_chance)
+		donpcevent instance_npcname(strnpcinfo(0)) + "::OnSummonPoring";
+	if (!mobcount('map$,.@event$)) {
+		sleep 5000;
+		// Boss Stage, spawn Treasure Chest
+		if (('floor%10) == 0)
+			enablenpc instance_npcname("#w" + 'floor + "_t");
+
+		if ('floor == 50) {
+			mapannounce 'map$,"Reckless Explorer : It seems there are no other way from here. It's dangerous, so you'd better return outside.",0xFFFF00;
+			enablenpc instance_npcname("#w50_ppl");
+		}
+		if ('floor < 50) {
+			if (('floor%10) == 0)
+				mapannounce 'map$,"Reckless Explorer : This area is safe. Use the passage to go to the next area.",0xFFFF00;
+			else
+				mapannounce 'map$,"Reckless Explorer : This area is safe. Go through the passage to the next area.",0xFFFF00;
+			// Enable warp portal to next floor
+			enablenpc instance_npcname("#w" + 'floor);
+			'floor += 1;
+		}
+	}
+OnPoringKill:
+	end;
+}
+
+1@infi,42,8,1	script	#w0_0	4_F_GON,{
+	if (is_party_leader() && !'mode && 'sanity == 0) {
+		mes "[ Reckless Explorer ]";
+		mes "I have went in and out of this place many times and figured out a way to provoke the monsters in here. You can get more rewards if you're going to deal with heated ones.";
+		next;
+		mes "[ Reckless Explorer ]";
+		mes "What do you think? Would you like to try something challenging?";
+		next;
+		if (select("I want to proceed normally:I want to proceed with something difficult") == 1 && 'sanity == 0) {
+			'mode = 1;
+			'poring_chance = 1;
+		} else {
+			'mode = 2;
+			'poring_chance = 2;
+		}
+		mes "[ Reckless Explorer ]";
+		mes "Good. Shall we go now?";
+		close2;
+		if ('sanity == 0) {
+			'sanity = 1;
+			disablenpc instance_npcname(strnpcinfo(0));
+			hideoffnpc instance_npcname("#w0");
+			npctalk "Reckless Explorer : Woah~ It's very neat for a sunken place, don't you think?",instance_npcname("#w0");
+			sleep 3000;
+			npctalk "Reckless Explorer : I would believe it to be an ancient site, not a lighthouse. It's so well organized...",instance_npcname("#w0");
+			sleep 3000;
+			npctalk "Reckless Explorer : Oh, did you hear something?",instance_npcname("#w0");
+			donpcevent instance_npcname("#inf_space_mobs") + "::OnSummon";
+			sleep 3000;
+			npctalk "Reckless Explorer : Oh, that must be the monsters haunting this place.",instance_npcname("#w0");
+			sleep 3000;
+			npctalk "Reckless Explorer : They look no different from the ones we saw outside, but I can feel a very strong energy.",instance_npcname("#w0");
+			sleep 3000;
+			npctalk "Reckless Explorer : Hm~ It looks dangerous, so I'll go back up. I'll give you directions from above.",instance_npcname("#w0");
+			disablenpc instance_npcname("#w0");
+		}
+	}
+	end;
+}
+
+1@infi,42,8,1	script	#w0	4_F_GON,{
+	end;
+}
+
+1@infi,366,392,4	script	#w50_ppl	4_F_GON,{
+	mes "[ Reckless Explorer ]";
+	mes "I'll keep a separate record of this expedition. If you've been lucky, you might have gotten a decent reward from your expedition.";
+	next;
+	mes "[ Reckless Explorer ]";
+	mes "So, shall we get out of here?";
+	close2;
+	warp "cmd_fild07",53,270;
+	end;
+}
+
+1@infi,30,369,3	script	#w10_t	4_TREASURE_BOX,{
+	if (is_party_leader()) {
+		specialeffect EF_COIN;
+		disablenpc instance_npcname(strnpcinfo(0));
+		sleep 1000;
+		if ('mode == 1)
+			.@amount = rand(3,10);	// Min/Max found in replays
+		else
+			.@amount = rand(6,22);	// Min/Max found in replays
+		getmapxy(.@map$,.@x,.@y,BL_NPC);
+		for (.@i = 0; .@i < .@amount; .@i++) {
+			switch (rand(1,4)) {
+				case 1:
+					.@xs = 1;
+					.@ys = 1;
+					break;
+
+				case 2:
+					.@xs = -1;
+					.@ys = 1;
+					break;
+
+				case 3:
+					.@xs = 1;
+					.@ys = -1;
+					break;
+
+				case 4:
+					.@xs = -1;
+					.@ys = -1;
+					break;
+			}
+			makeitem 6905,1,.@map$,.@x + .@xs,.@y + .@ys;
+        }
+		if ('mode == 2) {
+			setarray .@equip_id,1994,1938,13323,13126,28703,2024,16038,21014,28105,18128;
+			getmapxy(.@map$,.@x,.@y,BL_NPC);
+			for (.@i = 0; .@i < getarraysize(.@equip_id); .@i++) {
+				if (rand(1,100) <= 1) {
+					switch (rand(1,4)) {
+						case 1:
+							.@xs = 1;
+							.@ys = 1;
+							break;
+
+						case 2:
+							.@xs = -1;
+							.@ys = 1;
+							break;
+
+						case 3:
+							.@xs = 1;
+							.@ys = -1;
+							break;
+
+						case 4:
+							.@xs = -1;
+							.@ys = -1;
+							break;
+					}
+					makeitem2 .@equip_id[.@i],1,.@map$,.@x + .@xs,.@y + .@ys,0,0,0,0,0,0,0;
+				}
+			}
+		}
+	}
+	end;
+}
+
+1@infi,112,369,3	duplicate(#w10_t)	#w20_t	4_TREASURE_BOX
+1@infi,194,380,3	duplicate(#w10_t)	#w30_t	4_TREASURE_BOX
+1@infi,280,380,3	duplicate(#w10_t)	#w40_t	4_TREASURE_BOX
+1@infi,366,380,3	duplicate(#w10_t)	#w50_t	4_TREASURE_BOX
+// Aegis spawns hard mode specific treasure npcs
+//1@infi,112,369,3	duplicate(#w10h_t)	#w20h_t	4_TREASURE_BOX
+//1@infi,194,380,3	duplicate(#w10h_t)	#w30h_t	4_TREASURE_BOX
+//1@infi,280,380,3	duplicate(#w10h_t)	#w40h_t	4_TREASURE_BOX
+//1@infi,366,380,3	duplicate(#w10h_t)	#w50h_t	4_TREASURE_BOX
+
+1@infi,30,31,0	script	#w1	WARPNPC,2,2,{
+	end;
+
+OnTouch:
+	.@id = atoi(replacestr(strnpcinfo(2),"w",""));
+	switch (.@id) {
+		case 1: .@x = 30; .@y = 41; break;
+		case 2: .@x = 30; .@y = 73; break;
+		case 3: .@x = 30; .@y = 105; break;
+		case 4: .@x = 30; .@y = 137; break;
+		case 5: .@x = 30; .@y = 220; break;
+		case 6: .@x = 30; .@y = 253; break;
+		case 7: .@x = 30; .@y = 285; break;
+		case 8: .@x = 30; .@y = 317; break;
+		case 9: .@x = 30; .@y = 349; break;
+		case 10: .@x = 112; .@y = 10; break;
+		case 11: .@x = 112; .@y = 41; break;
+		case 12: .@x = 112; .@y = 73; break;
+		case 13: .@x = 112; .@y = 105; break;
+		case 14: .@x = 112; .@y = 137; break;
+		case 15: .@x = 112; .@y = 220; break;
+		case 16: .@x = 112; .@y = 253; break;
+		case 17: .@x = 112; .@y = 285; break;
+		case 18: .@x = 112; .@y = 317; break;
+		case 19: .@x = 112; .@y = 349; break;
+		case 20: .@x = 198; .@y = 10; break;
+		case 21: .@x = 198; .@y = 41; break;
+		case 22: .@x = 198; .@y = 73; break;
+		case 23: .@x = 198; .@y = 105; break;
+		case 24: .@x = 198; .@y = 137; break;
+		case 25: .@x = 198; .@y = 220; break;
+		case 26: .@x = 198; .@y = 245; break;
+		case 27: .@x = 198; .@y = 277; break;
+		case 28: .@x = 198; .@y = 309; break;
+		case 29: .@x = 198; .@y = 341; break;
+		case 30: .@x = 280; .@y = 10; break;
+		case 31: .@x = 280; .@y = 41; break;
+		case 32: .@x = 280; .@y = 73; break;
+		case 33: .@x = 280; .@y = 105; break;
+		case 34: .@x = 280; .@y = 137; break;
+		case 35: .@x = 280; .@y = 220; break;
+		case 36: .@x = 280; .@y = 245; break;
+		case 37: .@x = 280; .@y = 277; break;
+		case 38: .@x = 280; .@y = 309; break;
+		case 39: .@x = 280; .@y = 341; break;
+		case 40: .@x = 362; .@y = 10; break;
+		case 41: .@x = 362; .@y = 41; break;
+		case 42: .@x = 362; .@y = 73; break;
+		case 43: .@x = 362; .@y = 105; break;
+		case 44: .@x = 362; .@y = 137; break;
+		case 45: .@x = 362; .@y = 220; break;
+		case 46: .@x = 362; .@y = 245; break;
+		case 47: .@x = 362; .@y = 277; break;
+		case 48: .@x = 362; .@y = 309; break;
+		case 49: .@x = 362; .@y = 341; break;
+		default: end;
+	}
+	warp 'map$,.@x,.@y;
+	if (is_party_leader())
+		sleep 100;
+		if ('sanity < 'floor ) {
+			donpcevent instance_npcname("#inf_space_mobs") + "::OnSummon";
+			'sanity += 1;
+		}
+end;
+}
+
+1@infi,30,63,0	duplicate(#w1)	#w2	WARPNPC,2,2
+1@infi,30,95,0	duplicate(#w1)	#w3	WARPNPC,2,2
+1@infi,30,127,0	duplicate(#w1)	#w4	WARPNPC,2,2
+1@infi,30,168,0	duplicate(#w1)	#w5	WARPNPC,2,2
+1@infi,30,243,0	duplicate(#w1)	#w6	WARPNPC,2,2
+1@infi,30,275,0	duplicate(#w1)	#w7	WARPNPC,2,2
+1@infi,30,307,0	duplicate(#w1)	#w8	WARPNPC,2,2
+1@infi,30,339,0	duplicate(#w1)	#w9	WARPNPC,2,2
+1@infi,30,380,0	duplicate(#w1)	#w10	WARPNPC,2,2
+1@infi,112,31,0	duplicate(#w1)	#w11	WARPNPC,2,2
+1@infi,112,63,0	duplicate(#w1)	#w12	WARPNPC,2,2
+1@infi,112,95,0	duplicate(#w1)	#w13	WARPNPC,2,2
+1@infi,112,127,0	duplicate(#w1)	#w14	WARPNPC,2,2
+1@infi,112,168,0	duplicate(#w1)	#w15	WARPNPC,2,2
+1@infi,112,243,0	duplicate(#w1)	#w16	WARPNPC,2,2
+1@infi,112,275,0	duplicate(#w1)	#w17	WARPNPC,2,2
+1@infi,112,307,0	duplicate(#w1)	#w18	WARPNPC,2,2
+1@infi,112,339,0	duplicate(#w1)	#w19	WARPNPC,2,2
+1@infi,112,380,0	duplicate(#w1)	#w20	WARPNPC,2,2
+1@infi,198,31,0	duplicate(#w1)	#w21	WARPNPC,2,2
+1@infi,198,63,0	duplicate(#w1)	#w22	WARPNPC,2,2
+1@infi,198,95,0	duplicate(#w1)	#w23	WARPNPC,2,2
+1@infi,198,127,0	duplicate(#w1)	#w24	WARPNPC,2,2
+1@infi,198,168,0	duplicate(#w1)	#w25	WARPNPC,2,2
+1@infi,194,235,0	duplicate(#w1)	#w26	WARPNPC,2,2
+1@infi,194,267,0	duplicate(#w1)	#w27	WARPNPC,2,2
+1@infi,194,299,0	duplicate(#w1)	#w28	WARPNPC,2,2
+1@infi,194,331,0	duplicate(#w1)	#w29	WARPNPC,2,2
+1@infi,194,392,0	duplicate(#w1)	#w30	WARPNPC,2,2
+1@infi,280,31,0	duplicate(#w1)	#w31	WARPNPC,2,2
+1@infi,280,63,0	duplicate(#w1)	#w32	WARPNPC,2,2
+1@infi,280,95,0	duplicate(#w1)	#w33	WARPNPC,2,2
+1@infi,280,127,0	duplicate(#w1)	#w34	WARPNPC,2,2
+1@infi,280,168,0	duplicate(#w1)	#w35	WARPNPC,2,2
+1@infi,280,235,0	duplicate(#w1)	#w36	WARPNPC,2,2
+1@infi,280,267,0	duplicate(#w1)	#w37	WARPNPC,2,2
+1@infi,280,299,0	duplicate(#w1)	#w38	WARPNPC,2,2
+1@infi,280,331,0	duplicate(#w1)	#w39	WARPNPC,2,2
+1@infi,280,392,0	duplicate(#w1)	#w40	WARPNPC,2,2
+1@infi,362,31,0	duplicate(#w1)	#w41	WARPNPC,2,2
+1@infi,362,63,0	duplicate(#w1)	#w42	WARPNPC,2,2
+1@infi,362,95,0	duplicate(#w1)	#w43	WARPNPC,2,2
+1@infi,362,127,0	duplicate(#w1)	#w44	WARPNPC,2,2
+1@infi,362,168,0	duplicate(#w1)	#w45	WARPNPC,2,2
+1@infi,366,235,0	duplicate(#w1)	#w46	WARPNPC,2,2
+1@infi,366,267,0	duplicate(#w1)	#w47	WARPNPC,2,2
+1@infi,366,299,0	duplicate(#w1)	#w48	WARPNPC,2,2
+1@infi,366,331,0	duplicate(#w1)	#w49	WARPNPC,2,2

+ 3 - 0
npc/re/mapflag/nobranch.txt

@@ -151,6 +151,9 @@ un_myst	mapflag	nobranch
 lhz_dun_n	mapflag	nobranch
 lhz_d_n2	mapflag	nobranch
 
+// Infinite Space
+1@infi	mapflag	nobranch
+
 // WOE:TE Maps ===================
 te_alde_gld	mapflag	nobranch
 te_prt_gld	mapflag	nobranch

+ 3 - 0
npc/re/mapflag/nomemo.txt

@@ -168,6 +168,9 @@ un_myst	mapflag	nomemo
 lhz_dun_n	mapflag	nomemo
 lhz_d_n2	mapflag	nomemo
 
+// Infinite Space
+1@infi	mapflag	nomemo
+
 // WOE:TE Maps ===================
 te_prtcas01	mapflag	nomemo
 te_prtcas02	mapflag	nomemo

+ 3 - 0
npc/re/mapflag/nosave.txt

@@ -138,6 +138,9 @@ que_avan01	mapflag	nosave	SavePoint
 un_myst	mapflag	nosave	SavePoint
 1@mcd	mapflag	nosave	SavePoint
 
+// Infinite Space
+1@infi	mapflag	nosave
+
 // Ep 16
 que_swat	mapflag	nosave	SavePoint
 1@mir	mapflag	nosave	SavePoint

+ 4 - 0
npc/re/mapflag/noteleport.txt

@@ -156,6 +156,10 @@ verus04	mapflag	monster_noteleport
 lhz_dun_n	mapflag	noteleport
 lhz_d_n2	mapflag	noteleport
 
+// Infinite Space
+1@infi	mapflag	noteleport
+1@infi	mapflag	monster_noteleport
+
 // WOE:TE Maps ===================
 te_prtcas01	mapflag	noteleport
 te_prtcas02	mapflag	noteleport

+ 3 - 0
npc/re/mapflag/nowarp.txt

@@ -35,6 +35,9 @@ job_gun	mapflag	nowarp
 lhz_dun_n	mapflag	nowarp
 lhz_d_n2	mapflag	nowarp
 
+// Infinite Space
+1@infi	mapflag	nowarp
+
 // Ep 16
 que_swat	mapflag	nowarp
 

+ 3 - 0
npc/re/mapflag/nowarpto.txt

@@ -103,6 +103,9 @@ un_bk_q	mapflag	nowarpto
 un_myst	mapflag	nowarpto
 1@mcd	mapflag	nowarpto
 
+// Infinite Space
+1@infi	mapflag	nowarpto
+
 // WOE:TE Maps ===================
 te_prtcas01	mapflag	nowarpto
 te_prtcas02	mapflag	nowarpto

+ 3 - 0
npc/re/mapflag/restricted.txt

@@ -69,6 +69,9 @@
 lhz_dun_n	mapflag	restricted	6
 lhz_d_n2	mapflag	restricted	6
 
+// Infinite Space
+1@infi	mapflag	restricted	6
+
 // Ep 16
 1@mir	mapflag	restricted	6
 2@mir	mapflag	restricted	6

+ 337 - 0
npc/re/merchants/InfiniteSpace_merchants.txt

@@ -0,0 +1,337 @@
+//===== rAthena Script =======================================
+//= Infinite Space
+//===== Description: =========================================
+//= [Walkthrough Conversion]
+//= Infinite Space related merchants and enchanter
+//===== Changelogs: ==========================================
+//= 1.0 Initial release [crazyarashi]
+//= 1.1 Removed unecessary use of functions [Everade]
+//= 1.2 Added warp scroll merchant [Everade]
+//============================================================
+
+// Food Merchant
+-	shop	inf_ration	-1,512:-1,513:-1,515:-1,516:-1
+
+cmd_fild07,63,268,1	script	Emergency Food Merchant#pa0829_01	4_M_BIBI,{
+	mes "[Emergency Food Merchant]";
+	mes "I have a lot of stuff over here, of course, not for free.";
+	close2;
+	callshop "inf_ration",1;
+	end;
+}
+
+// Warp Scroll Seller
+cmd_fild07,375,167,1	script	Ruins Black Trader#pa0829_01	4_F_JOB_HUNTER,{
+	mes "[Ruins Black Trader]";
+	mes "Hey, isn't it hard to walk in and out of here every time? For just ^0000ff20,000^000000 Zeny, you can have a scroll that will take you directly to the entrance of the ruins, what do you think?";
+Purchase:
+	next;
+	switch( select( "Give me one", "I don't think so" )) {
+		case 1:
+			if (!checkweight(22980,1) || (MaxWeight - Weight) < 1000) {
+				mes "You can't proceed with the conversation because you have a large quantity of items.";
+				mes "Please organize your items and try again.";
+				close;
+			}
+			else if (Zeny < 20000) {
+				mes "[Ruins Black Trader]";
+				mes "You don't seem to have any more money. A scroll costs 20,000 Zeny.";
+				close;
+			}
+			Zeny -= 20000;
+			getitem 22980,1;
+			mes "[Ruins Black Trader]";
+			mes "It was a good deal. Need more?";
+			goto Purchase;
+		case 2:
+			mes "[Ruins Black Trader]";
+			mes "Come back anytime";
+			close;
+	}
+}
+
+// Equipment Shop
+cmd_fild07,57,275,5	script	Artifact Appraiser#pa0829_01	1_F_02,{
+	if (!checkweight(1201,1) || (MaxWeight - Weight) < 1000) {
+		mes "You can't proceed with the conversation because you have a large quantity of items.";
+		mes "Please organize your items and try again.";
+		close;
+	}
+	.@stone_id = 6905;
+	mes "[ Artifact Appraiser ]";
+	mes "Choose the type of equipment that you want to purchase. You can purchase as many as you want, as long as you have " + getitemname(.@stone_id) + ".";
+	next;
+	switch (select("Cancel:Weapons:Armors")) {
+		case 1:
+			mes "[ Artifact Appraiser ]";
+			mes "Please come back whenever you want~";
+			close;
+
+		case 2:
+			setarray .@equip_id,1994,1938,13323,13126,28703,2024,16038,21014,28105,18128;
+			.@price = 50;
+			break;
+
+		case 3:
+			setarray .@equip_id,15141,22075,20779,19033;
+			.@price = 50;
+			break;
+	}
+	.@menu$ = "Cancel:";
+	for (.@i = 0; .@i < getarraysize(.@equip_id); .@i++)
+		.@menu$ += getitemname(.@equip_id[.@i]) + ":";
+	.@s = select(.@menu$) - 1;
+	switch (.@s) {
+		case 0:
+			mes "[ Artifact Appraiser ]";
+			mes "Please come back whenever you want~";
+			close;
+
+		default:
+			.@s--;
+			mes "[ Artifact Appraiser ]";
+			mes "You need ^0000FF" + .@price + "^000000 " + getitemname(.@stone_id) + " to purchase the " + getitemname(.@equip_id[.@s]) + "~";
+			next;
+			if (select("Cancel:Purchase") == 1) {
+				mes "[ Artifact Appraiser ]";
+				mes "Please come back whenever you want~";
+				close;
+			}
+			if (countitem(.@stone_id) < .@price) {
+				mes "[ Artifact Appraiser ]";
+				mes "You don't have enough " + getitemname(.@stone_id) + " to purchase this item.";
+				close;
+			}
+			mes "[ Artifact Appraiser ]";
+			mes "Thank you for your trust. Please come back again next time.";
+			delitem .@stone_id,.@price;
+			getitem .@equip_id[.@s],1;
+			close;
+	}
+}
+
+// Equipment Enchanter
+cmd_fild07,60,275,3	script	Artifact Enhancer#pa0829_01	4_F_JOB_BLACKSMITH,{
+	if (!checkweight(1201,1) || (MaxWeight - Weight) < 1000) {
+		mes "You can't proceed with the conversation because you have a large quantity of items.";
+		mes "Please organize your items and try again.";
+		close;
+	}
+	disable_items;
+	.@stone_id = 6905;
+	function equip_check;
+	mes "[ Artifact Enhancer ]";
+	mes "If you're looking to strengthen the equipment that you've obtained in the Infinite Space, you have come to the right place.";
+	mes "Do you have any " + getitemname(.@stone_id) + "?";
+	next;
+	switch (select("How do I enchant my equipment?:Enchant equipment.:Initialize equipment's enchant.")) {
+		case 1:
+			mes "[ Artifact Enhancer ]";
+			mes "You'll be able to obtain " + getitemname(.@stone_id) + ", if you explore the space under the Paros Lighthouse.";
+			next;
+			mes "[ Artifact Enhancer ]";
+			mes "For that material, I can reinforce the equipment that you got from the Infinite Space.";
+			next;
+			mes "[ Artifact Enhancer ]";
+			mes "I can only enchant the 3rd and the 4th slot.";
+			next;
+			mes "[ Artifact Enhancer ]";
+			mes "There is no chance of the equipment being destroyed during the enchanting process, but there's a high probability that it will be destroyed when initializing the enchants.";
+			next;
+			mes "[ Artifact Enhancer ]";
+			mes "Then come visit me when you want to enchant the equipment.";
+			break;
+
+		case 2:
+			.@stone_id = 6905;
+			.@fee = 20;
+			mes "[ Artifact Enhancer ]";
+			mes "Please select the equipment that you want to enchant.";
+			next;
+			switch (select("Cancel:Weapon:Armor:Shoes:Garment:Helm")) {
+				case 1:
+					mes "[ Artifact Enhancer ]";
+					mes "Then come visit me when you want to enchant the equipment.";
+					close;
+
+				case 2:
+					.@part = EQI_HAND_R;
+					break;
+
+				case 3:
+					.@part = EQI_ARMOR;
+					break;
+
+				case 4:
+					.@part = EQI_SHOES;
+					break;
+
+				case 5:
+					.@part = EQI_GARMENT;
+					break;
+
+				case 6:
+					.@part = EQI_HEAD_TOP;
+					break;
+			}
+			.@equip_id = getequipid(.@part);
+			.@refine = getequiprefinerycnt(.@part);
+			equip_check(.@equip_id);
+			for (.@i = 0;.@i < 4;.@i++) {
+				.@card[.@i] = getequipcardid(.@part,.@i);
+				.@check[.@i] = getequipcardid(.@part,.@i);
+			}
+			if (.@card[2] > 0) {
+				mes "[ Artifact Enhancer ]";
+				mes "I can only enchant up to the third slot. Your equipment can't be further enchanted.";
+				close;
+			}
+			switch (.@part) {
+				case EQI_HAND_R:
+					setarray .@enchant$,
+					"4700,4701:4710,4711:4720,4721",
+					"4811,4810,4809,4808,4820,4821,4822,4823:4815,4814,4813,4812,4826,4827,4828,4829:4832,4833,4834,4835,4836,4837,4838,4839";
+					break;
+
+				case EQI_ARMOR:
+				case EQI_SHOES:
+					setarray .@enchant$,
+					"4700,4701,4702,4703:4710,4711,4712,4713:4720,4721,4722,4723",
+					"4795,4796,4797:4870,4871,4800:4870,4871,4800";
+					break;
+
+				case EQI_GARMENT:
+				case EQI_HEAD_TOP:
+					setarray .@enchant$,
+					"4700,4701,4702,4703:4710,4711,4712,4713:4720,4721,4722,4723",
+					"4861,4862,4867,4868,4900:4861,4862,4867,4868,4900:4861,4862,4867,4868,4900";
+					break;
+			}
+			.@slot = (.@card[3] > 0 ? 2 : 3);
+			.@index = (.@slot == 3 ? 0 : 1);
+			mes "[ Artifact Enhancer ]";
+			mes "You can choose 3 types of enchant, and the enchant fee is " + .@fee + " " + getitemname(.@stone_id) + ".";
+			mes "I'll make sure it gets enchanted without a problem.";
+			next;
+			.@type = select("Quit:Physical:Magical:Range") - 2;
+			mes "[ Artifact Enhancer ]";
+			if (.@slot == 3)
+				mes "Okay, let's begin the first enchantment.";
+			else
+				mes "Okay, let's proceed with the second enchantment.";
+			next;
+			if (select("I'll return later.:Please proceed.") == 1) {
+				mes "[ Artifact Enhancer ]";
+				mes "If you change your mind, just return to me.";
+				close;
+			}
+			if (countitem(.@stone_id) < .@fee) {
+				mes "[ Artifact Enhancer ]";
+				mes "Hm. By the way, I don't think you were listening, you don't have enough " + getitemname(.@stone_id) + ".";
+				close;
+			}
+			explode(.@T$,.@enchant$[.@index],":");
+			explode(.@TT$,.@T$[.@type],",");
+			.@enchant = atoi(.@TT$[rand(getarraysize(.@TT$))]);
+			.@card[.@slot] = .@enchant;
+			delitem .@stone_id,.@fee;
+			if (callfunc("F_IsEquipIDHack", .@part, .@equip_id) || callfunc("F_IsEquipRefineHack", .@part, .@refine) || callfunc("F_IsEquipCardHack", .@part, .@check[0], .@check[1], .@check[2], .@check[3]))
+				close;
+			delequip .@part;
+			getitem2 .@equip_id,1,1,.@refine,0,.@card[0],.@card[1],.@card[2],.@card[3];
+			specialeffect2 EF_REPAIRWEAPON;
+			mes "[ Artifact Enhancer ]";
+			mes "Hm. It was well done. Check your equipment at once.";
+			break;
+		
+		case 3:
+			.@stone_id = 6905;
+			.@fee = 30;
+			.@break_chance = 30;
+			mes "[ Artifact Enhancer ]";
+			mes "Please select the equipment that you want to enchant.";
+			next;
+			switch (select("Cancel:Weapon:Armor:Shoes:Garment:Helm")) {
+				case 1:
+					mes "[ Artifact Enhancer ]";
+					mes "Then come visit me when you want to enchant the equipment.";
+					close;
+
+				case 2:
+					.@part = EQI_HAND_R;
+					break;
+
+				case 3:
+					.@part = EQI_ARMOR;
+					break;
+
+				case 4:
+					.@part = EQI_SHOES;
+					break;
+
+				case 5:
+					.@part = EQI_GARMENT;
+					break;
+
+				case 6:
+					.@part = EQI_HEAD_TOP;
+					break;
+			}
+			.@equip_id = getequipid(.@part);
+			.@refine = getequiprefinerycnt(.@part);
+			equip_check(.@equip_id);
+			for (.@i = 0; .@i < 4; .@i++) {
+				.@card[.@i] = getequipcardid(.@part,.@i);
+				.@check[.@i] = .@card[.@i];
+			}
+			if (.@card[3] == 0) {
+				mes "[ Artifact Enhancer ]";
+				mes "Your equipment doesn't have any enchant on it.";
+				close;
+			}
+			mes "[ Artifact Enhancer ]";
+			mes "There is a chance that your infinite space equipment will be destroyed on the initializion process. Are you still willing to proceed?";
+			next;
+			if (select("Quit:Proceed") == 1) {
+				mes "[ Artifact Enhancer ]";
+				mes "If you change your mind, just return to me.";
+				close;
+			}
+			if (countitem(.@stone_id) < .@fee) {
+				mes "[ Artifact Enhancer ]";
+				mes "Hm. By the way, I don't think you were listening, you don't have enough " + getitemname(.@stone_id) + ".";
+				close;
+			}
+			delitem .@stone_id,.@fee;
+			if (callfunc("F_IsEquipIDHack", .@part, .@equip_id) || callfunc("F_IsEquipRefineHack", .@part, .@refine) || callfunc("F_IsEquipCardHack", .@part, .@check[0], .@check[1], .@check[2], .@check[3]))
+				close;
+			delequip .@part;
+			if (rand(1,100) > .@chance) {
+				getitem2 .@equip_id,1,1,.@refine,0,.@card[0],.@card[1],0,0;
+				specialeffect2 EF_REPAIRWEAPON;
+				mes "[ Artifact Enhancer ]";
+				mes "Hm. It was well done. Check your equipment at once.";
+			} else {
+				specialeffect2 EF_REFINEFAIL;
+				mes "[ Artifact Enhancer ]";
+				mes "Well, I did warn you. You aren't lucky, eh?";
+			}
+			break;
+	}
+	close;
+
+	function	equip_check	{
+		setarray .@equip_id,1994,1938,13323,13126,28703,2024,16038,21014,28105,18128,15141,22075,20779,19033;
+		if (!getarg(0)) {
+			mes "[ Artifact Enhancer ]";
+			mes "Did you take off your equipment?";
+			close;
+		}
+		if (inarray(.@equip_id,getarg(0)) == -1) {
+			mes "[ Artifact Enhancer ]";
+			mes "This equipment is not suitable for enchanting. Don't forget that only the infinite equipment series can be enchanted.";
+			close;
+		}
+		return;
+	}
+}

+ 3 - 0
npc/re/scripts_athena.conf

@@ -15,6 +15,7 @@ npc: npc/re/battleground/bg_common.txt
 // --------------------------- Cities ---------------------------
 npc: npc/re/cities/alberta.txt
 npc: npc/re/cities/brasilis.txt
+npc: npc/re/cities/comodo.txt
 npc: npc/re/cities/dewata.txt
 npc: npc/re/cities/dicastes.txt
 npc: npc/re/cities/eclage.txt
@@ -75,6 +76,7 @@ npc: npc/re/instances/GhostPalace.txt
 npc: npc/re/instances/HazyForest.txt
 npc: npc/re/instances/HorrorToyFactory.txt
 npc: npc/re/instances/HeartHunterWarBase.txt
+npc: npc/re/instances/InfiniteSpace.txt
 npc: npc/re/instances/IsleOfBios.txt
 npc: npc/re/instances/LastRoom.txt
 npc: npc/re/instances/MalangdoCulvert.txt
@@ -123,6 +125,7 @@ npc: npc/re/merchants/gld_mission_exchange.txt
 npc: npc/re/merchants/guild_warehouse.txt
 npc: npc/re/merchants/hd_refiner.txt
 npc: npc/re/merchants/HorrorToyFactory_merchants.txt
+npc: npc/re/merchants/InfiniteSpace_merchants.txt
 npc: npc/re/merchants/inn.txt
 npc: npc/re/merchants/malangdo_costume.txt
 npc: npc/re/merchants/moro_cav_exchange.txt