瀏覽代碼

Horror toy factory (#1813)

* Initial release of Horror Toy Factory instance.
Thanks to @aleos89, @secretdataz, @Lemongrass3110
Took some part from https://github.com/idathena/trunk/commit/52f6420abc1b9cdcbc6ccf012978d7e803216c5b
Credit @exneval

Todo : implement NPC_HELLBURNING skill
Atemo 8 年之前
父節點
當前提交
c6ab72207e

+ 4 - 0
db/pre-re/skill_cast_db.txt

@@ -1026,6 +1026,10 @@
 698,0,20000,0,0,0,0
 //==========================================
 
+//===== New Monster Skills (12.1) ==========
+//-- NPC_MAXPAIN
+716,0,0,0,10000,0,0,0
+
 //===== 2nd Jobs Quest Skills ==============
 //-- KN_CHARGEATK
 1001,500,0,0,0,0,0

+ 2 - 2
db/pre-re/skill_db.txt

@@ -853,8 +853,8 @@
 //713,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DANCINGBLADE,Dancing Blade
 //714,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DANCINGBLADE_ATK,Dancing Blade Attack
 //715,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DARKPIERCING,Dark Piercing
-//716,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_MAXPAIN,Max Pain
-//717,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_MAXPAIN_ATK,Max Pain Attack
+716,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,0x0,		NPC_MAXPAIN,Max Pain
+717,0,6,1,0,0xD2,18,10,1,no,0,0x2,0,misc,0,0x0,		NPC_MAXPAIN_ATK,Max Pain Attack
 //718,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DEATHSUMMON,Death Summon
 //719,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_HELLBURNING,Hell Burning
 //720,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_JACKFROST,Jack Frost 2

+ 2 - 1
db/re/instance_db.txt

@@ -19,4 +19,5 @@
 12,Old Glast Heim,3600,300,1@gl_k,150,20,2@gl_k
 13,Eclage Interior,1200,300,1@ecl,60,50
 14,Sara's Memories,3600,300,1@sara,250,155
-15,Geffen Magic Tournament,7200,300,1@gef,119,209,1@gef_in,1@ge_st
+15,Geffen Magic Tournament,7200,300,1@gef,119,209,1@gef_in,1@ge_st
+16,Horror Toy Factory,3600,300,1@xm_d,111,22

+ 18 - 18
db/re/item_db.txt

@@ -2160,10 +2160,10 @@
 2969,RWC_2012_Pendant_,Chambered RWC 2012 Pendant,4,20,,200,,0,,1,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus bMatkRate,1; },{},{}
 2971,Pocket_Watch,Pocket Watch,4,10,,200,,1,,1,0x800200,63,2,136,,80,1,,{ bonus bHPrecovRate,15; bonus bSPrecovRate,15; bonus bMatkRate,7; },{},{}
 2976,Red_Lantern,Red Lantern,4,10,,200,,0,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bMaxSP,-300; skill "MG_SIGHT",1; },{},{ sc_end SC_SIGHT; }
-2977,Broken_Heart,Broken Heart,4,10,,100,,0,,1,0xFFFFFFFF,63,2,136,,110,0,,{ bonus bMaxSP,200; skill "DC_SCREAM",3; },{},{}
-2978,Kindly_Heart,Kindly Heart,4,10,,100,,0,,1,0xFFFFFFFF,63,2,136,,110,0,,{ bonus bMaxHP,500; bonus2 bHPRegenRate,300,10000; skill "DC_SCREAM",3; },{},{}
+2977,Hurt_Mind,Hurt Mind,4,10,,100,,0,,1,0xFFFFFFFF,63,2,136,,110,0,,{ bonus bMaxSP,200; skill "DC_SCREAM",3; },{},{}
+2978,KindHeart,Kind Heart,4,10,,100,,0,,1,0xFFFFFFFF,63,2,136,,110,0,,{ bonus bMaxHP,500; bonus2 bHPRegenRate,300,10000; skill "DC_SCREAM",3; },{},{}
 2979,Strawberry_Decoration,Strawberry Decoration,4,0,,500,,1,,1,0xFFFFFFFF,63,2,136,,,0,,{ bonus bAllStats,1; bonus3 bAutoSpellWhenHit,"WZ_FROSTNOVA",3,10; /* Confirm: Frost Nova cast chance */ },{},{}
-2980,Evil_Spirits_Room_Gloves,Evil Spirits Room Gloves,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,110,1,,{ bonus bMaxHP,500; bonus bMaxSP,200; skill "PF_SPIDERWEB",1; },{},{}
+2980,Evilspirit_Gloves,Evilspirit Gloves,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,110,1,,{ bonus bMaxHP,500; bonus bMaxSP,200; skill "PF_SPIDERWEB",1; },{},{}
 2981,Warrior's_Ring,Warrior's Ring,4,10,,200,,0,,0,0xFFFFFFFF,63,2,136,,160,,,{},{},{}
 2983,Greed_Brooch,Greed Brooch,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,50,1,,{ bonus2 bHPLossRate,10,5000; },{},{}
 2984,Glove_Save_Rimnil,Glove Save Rimnil,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,30,1,,{ bonus2 bExpAddRace,RC_All,5; },{},{}
@@ -6080,8 +6080,8 @@
 11555,Red_Potion_RG,Red Potion RG,0,0,,40,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal 325,0; },{},{}
 11557,TE_White_Potion,TE White Potion,0,200,,300,,,,,0xFFFFFFFF,63,2,,,,,,{ itemheal 325,0; },{},{}
 11558,TE_White_Slim_Potion,TE White Slim Potion,0,275,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ itemheal 325,0; },{},{}
-11563,Hot_Tea,Hot Tea,2,10,,20,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal 0,100; },{},{}
-11564,Sweets,Sweets,2,10,,20,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal 1000,0; },{},{}
+11563,Hot_Tee,Hot Tea,2,10,,20,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal 0,100; },{},{}
+11564,Sweet_Canape,Sweet Canape,2,10,,20,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal 1000,0; },{},{}
 11565,White_Potion_,White Potion,0,10,,150,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal rand(325,405),0; },{},{}
 11566,Yellow_Potion_,Yellow Potion,0,10,,130,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal rand(175,235),0; },{},{}
 11567,Novice_Potion_,Novice Potion,0,10,,0,,,,0,0xFFFFFFFF,63,2,,,,,,{ itemheal rand(44,66),0; },{},{}
@@ -7451,7 +7451,7 @@
 13439,TE_Woe_Sword,TE Woe Sword,5,0,,0,120:100,,1,0,0x000654E3,63,2,2,3,40,1,2,{ bonus2 bAddRace,RC_Player,40; bonus2 bAddEff,Eff_Poison,3000; },{},{}
 13440,Ceremonial_Sword,Ceremonial Sword,5,20,,500,60,,1,0,0x00000063,5,2,2,1,1,1,2,{ bonus bAtkEle,Ele_Holy; },{},{}
 13441,Tanos_Sword,Tanos Sword,5,10,,700,150:100,,,1,0x000654E3,63,2,4,120,,1,2,{ bonus bInt,6; bonus bVit,6; bonus bLuk,-6; bonus bAtkRate,5; bonus2 bHPLossRate,100,10000; },{},{}
-13442,Old_Yangsan,Old Yangsan,5,10,,500,120:80,,,3,0x62,63,2,2,3,80,1,2,{ bonus bMatk,getrefine(); skill "MG_SOULSTRIKE",10; },{},{}
+13442,Old_Parasol,Old Parasol,5,10,,500,120:80,,,3,0x000654E2,63,2,2,3,80,1,2,{ bonus bMatk,getrefine(); skill "MG_SOULSTRIKE",10; },{},{}
 13444,Pala,Pala,5,20,,700,190,,0,1,0x000654E2,63,2,2,3,0,1,2,{ bonus bAspdRate,8; },{},{}
 13445,Half_BF_Sword1,Half BF Sword1,5,20,,0,115,,1,0,0x000654E3,63,2,2,3,80,1,2,{ bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,35; bonus2 bAddRace,RC_Player,35; bonus2 bIgnoreDefRaceRate,RC_DemiHuman,10; bonus2 bIgnoreDefRaceRate,RC_Player,10; bonus bUnbreakableWeapon,1; },{},{}
 13449,Gladius_Daemonicus,Gladius Daemonicus,5,20,,1200,130,,,2,0x000654E2,63,2,2,4,80,1,2,{ bonus bAtkEle,Ele_Dark; },{},{}
@@ -8685,7 +8685,7 @@
 16026,RWC_Memory_Mace,RWC Memory Mace,5,20,,800,100,,1,1,0x0004C5B2,63,2,2,3,1,1,8,{ bonus bUnbreakableWeapon,1; .@r = getrefine(); bonus bBaseAtk,(.@r/30)*30; if(.@r>=9){ .@i = 1; bonus3 bAutoSpellWhenHit,"BS_WEAPONPERFECT",1,10; } if(.@r>=6){ .@rate = 5*(.@i+1); bonus2 bAddClass,Class_All,5; } },{},{}
 16027,Hammer_Of_Evil_Slayer,Hammer Of Evil Slayer,5,10,,1350,,125,,1,0x228F6EEF,63,2,2,3,100,1,8,{ bonus2 bAddRace,RC_Demon,10; bonus2 bAddRace,RC_Undead,10; .@r = getrefine(); bonus bAtkRate,(.@r>=9)?(5):((.@r>=12)?(7):(0)); },{},{}
 16028,Tanos_Axe,Thanatos Hammer,5,10,,3000,180:120,,,1,0x0004C5B3,56,2,2,4,120,1,8,{ bonus bInt,6; bonus bVit,6; bonus bLuk,-6; bonus bAtkRate,5; bonus2 bHPLossRate,100,10000; },{},{}
-16029,Noble_Cross,Noble Cross,5,10,,1500,195:150,,,1,0x10,63,2,2,4,40,1,8,{ bonus bAtkEle,Ele_Holy; bonus3 bAutoSpell,"PR_TURNUNDEAD",6,50; bonus2 bSPDrainValueRace,RC_Undead,1; bonus2 bSPGainRace,RC_Undead,12; },{},{}
+16029,Noble_Cross,Noble Cross,5,10,,1500,195:150,,,1,0x00000010,58,2,2,4,40,1,8,{ bonus3 bAutoSpell,"PR_TURNUNDEAD",6,50; bonus2 bSPDrainValueRace,RC_Undead,1; bonus2 bSPGainRace,RC_Undead,12; },{},{}
 16030,Pile_Bunker_S,Pile Bunker S,5,20,,3000,400,,1,1,0x00000400,56,2,2,4,130,1,8,{ bonus bAspdRate,getrefine()/2; },{},{}
 16031,Pile_Bunker_P,Pile Bunker P,5,20,,4000,450,,1,,0x00000400,56,2,2,4,130,1,8,{ bonus bBaseAtk,getrefine()*5; },{},{}
 16032,Pile_Bunker_T,Pile Bunker T,5,20,,3500,400,,1,1,0x00000400,56,2,2,4,130,1,8,{ bonus bUseSPrate,getrefine()*-1; },{},{}
@@ -9740,8 +9740,8 @@
 18845,Banshee_Master_Kiss,Banshee Master Kiss,4,20,,200,,5,,0,0xFFFFFFFF,63,2,1,,0,0,959,{ bonus bUnbreakableHelm,1; bonus bMaxSPrate,3; autobonus2 "{ bonus2 bSubRace,RC_DemiHuman,100; bonus2 bSubRace,RC_Player,100; }",10,3000,BF_WEAPON,"{ specialeffect2 EF_POTION_BERSERK; }"; },{},{}
 18846,Seagod_Protector,Seagod Protector,4,20,,100,,0,,0,0xFFFFFFFF,63,2,512,,10,0,960,{ bonus2 bSubDefEle,Ele_Water,5; },{},{}
 18847,Jolly_Roger,Jolly Roger,4,20,,500,,10,,1,0xFFFFFFFF,63,2,256,,1,0,962,{ bonus bVit,1; bonus2 bSubDefEle,Ele_Water,2; bonus2 bAddEle,Ele_Water,2; .@r = getrefine(); if(.@r>6) { bonus2 bAddEle,Ele_Water,3; } if(.@r>8) { bonus2 bSubDefEle,Ele_Water,3; } },{},{}
-18848,Fresh_Roses,Fresh Roses,4,10,,200,0:20,0,,1,0xFFFFFFFF,63,2,256,,1,1,963,{ bonus bMagicHPGainValue,100; bonus bMagicSPGainValue,100; },{},{}
-18849,Celine_Ribbon,Celine Ribbon,4,10,,200,,,,1,0xFFFFFFFF,63,2,256,,1,1,967,{ bonus bDex,3; bonus bMatk,40+getrefine(); bonus bMagicHPGainValue,200; bonus2 bHPLossRate,50,5000; },{},{}
+18848,Lush_Rose,Lush Rose,4,10,,200,0:20,0,,1,0xFFFFFFFF,63,2,256,,1,1,963,{ bonus bMagicHPGainValue,100; bonus bMagicSPGainValue,100; },{},{}
+18849,Celines_Ribbon,Celines Ribbon,4,10,,200,,,,1,0xFFFFFFFF,63,2,256,,1,1,967,{ bonus bDex,3; bonus bMatk,40+getrefine(); bonus bMagicHPGainValue,200; bonus2 bHPLossRate,50,5000; },{},{}
 18850,Polar_Bear_Cap,Polar Bear Cap,4,20,,300,,7,,0,0xFFFFFFFF,63,2,256,,1,0,966,{ bonus bUnbreakableHelm,1; bonus bDex,1; bonus bAgi,1; bonus bMdef,3; bonus bHPrecovRate,5; bonus bSPrecovRate,3; bonus2 bAddMonsterDropItem,12354,100; },{},{}
 //18851,C_Polar_Bear_Cap,Costume Polar Bear Cap,4,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,1,1,966,{ /*Is this correct item?*/ },{},{}
 18851,Valentine_Heart,Valentine Heart,4,20,,0,,,,0,0xFFFFFFFF,63,2,256,,1,1,397,{ bonus bMaxHPrate,5+(getrefine()/2); bonus bAllStats,7; },{},{}
@@ -10076,14 +10076,14 @@
 19678,C_Bell_Ribbon,Costume Bell Ribbon,4,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,1,0,388,{},{},{}
 19682,C_SantaPoring_Cap,Costume SantaPoring Cap,4,10,,100,,,,0,0xFFFFFFFF,63,2,1024,,1,1,387,{},{},{}
 19685,C_ShineSantaPoring,Costume Shining Santa Poring,4,0,,0,,0,,0,0xFFFFFFFF,63,2,1024,,1,0,961,{},{},{}
-19686,C_Santa_Doll_Headband,Costume Santa Doll Headband,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,964,{},{},{}
-19687,C_Fresh_Roses,Costume Fresh Roses,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,963,{},{},{}
+19686,C_SantaHairband,Costume Santa Hairband,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,964,{},{},{}
+19687,C_Lush_Rose,Costume Lush Rose,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,963,{},{},{}
 19689,C_Ati_Atihan,Costume Ati Atihan,4,10,,0,,,,0,0xFFFFFFFF,63,2,7168,,1,0,303,{},{},{}
 19690,C_Dark_Snake_Lord_Hat,Costume Dark Snake Lord Hat,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,0,372,{},{},{}
 19695,C_Kettle_Hat,Costume Kettle Hat,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,0,318,{},{},{}
 19696,C_Friend_Mochiring_Hat,Costume Friend Mochiring Hat,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,0,965,{},{},{}
 19697,C_Rudolph_Santa_Hat,Costume Rudolph Santa Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,,1,619,{},{},{}
-19701,C_Red_Bonnet,Costume Red Bonnet,4,10,,100,,,,0,0xFFFFFFFF,63,2,1024,,100,1,190,{},{},{}
+19701,C_Red_Bonnet,Costume Red Bonnet,4,10,,100,,,,0,0xFFFFFFFF,63,2,1024,,1,1,190,{},{},{}
 19702,C_Twin_Pompom_By_JB,Costume Twin Pompom By JB,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,390,{},{},{}
 19706,C_Red_Dress_Hat,Costume Red Dress Hat,4,10,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,670,{},{},{}
 19707,C_Polar_Bear_Cap,Costume Polar Bear Cap,4,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,966,{ bonus bUnbreakableHelm,1; },{},{}
@@ -10894,7 +10894,7 @@
 22531,Special_Christmas_Box,Special Christmas Box,18,10,,200,,,,0,0xFFFFFFFF,63,2,,,1,,,{ /*TODO*/ },{},{}
 22532,Santa_Gift,Santa Gift,18,10,,200,,,,0,0xFFFFFFFF,63,2,,,1,,,{ /*TODO*/ },{},{}
 22533,New_Year_Gift_Box,New Year Gift Box,18,10,,200,,,,0,0xFFFFFFFF,63,2,,,1,,,{ /*TODO*/ },{},{}
-22534,Closed_Mind_Box,Closed Mind Box,18,10,,1000,,,,0,0xFFFFFFFF,63,2,,,1,,,{ getgroupitem(IG_Sealed_Mind_Box); },{},{}
+22534,Closedmind_Box,Closed Mind Box,18,10,,1000,,,,0,0xFFFFFFFF,63,2,,,1,,,{ getgroupitem(IG_Sealed_Mind_Box); },{},{}
 22535,Scroll_Summoning_Workers(Male),Scroll Summoning Workers(Male),2,10,,10,,,,0,0xFFFFFFFF,63,2,,,,,,{},{},{}
 22536,Scroll_Summoning_Workers(Female),Scroll Summoning Workers(Female),2,10,,10,,,,0,0xFFFFFFFF,63,2,,,,,,{},{},{}
 22538,Hanbok_bag,Hanbok bag,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,1,,,{},{},{}
@@ -11629,11 +11629,11 @@
 31013,LoVA_Realization_Bahamut_Card,LoVA Realization Bahamut Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if(getrefine()>=7) { bonus bDelayrate,-3; } },{},{}
 31014,LoVA_Ragnarok_Card,LoVA Ragnarok Card,6,20,,10,,,,,,,,4,,,,,{ bonus bMdef,7; bonus bMaxHPrate,6; if(getrefine()>=7) { bonus2 bSkillAtk,"HW_GRAVITATION",9; } },{},{}
 31015,LoVA_Realization_Ragnarok_Card,LoVA Realization Ragnarok Card,6,20,,10,,,,,,,,4,,,,,{ bonus bMdef,10; bonus bMaxHPrate,10; if(getrefine()>=7) { bonus2 bSkillAtk,"HW_GRAVITATION",769; } },{},{}
-31016,Evil_Decorated_Tree_Card,Evil Decorated Tree Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,1000; bonus bMaxSP,150; bonus bFlee,-25; },{},{}
-31017,Tyrannical_Cookie_Card,Tyrannical Cookie Card,6,20,,10,,,,,,,,64,,,,,{ .@r = getrefine(); bonus bAtkRate,1+.@r; bonus bMatkRate,1+.@r; bonus bMaxHPrate,-(2+(.@r*2)); },{},{}
-31018,Evil_Imbued_Box_Card,Evil Imbued Box Card,6,20,,10,,,,,,,,2,,,,,{ bonus bMaxHP,-1225; bonus3 bAddEff,Eff_Curse,300,ATF_MAGIC; /* unofficial chance [Secret] */ },{},{}
-31019,Spooky_Spirit_Card,Spooky Spirit Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,-13; bonus3 bAddEffWhenHit,Eff_Curse,300,ATF_MAGIC; /* unofficial chance [Secret] */ },{},{}
-31020,Evil_Cold_Ghost_Card,Evil Cold Ghost Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,-13; bonus3 bAddEffWhenHit,Eff_Curse,300,ATF_WEAPON; /* unofficial chance [Secret] */ },{},{}
+31016,Decorated_Evil_Tree_Card,Decorated Evil Tree Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,1000; bonus bMaxSP,150; bonus bFlee,-25; },{},{}
+31017,Vicious_Cookie_Card,Vicious Cookie Card,6,20,,10,,,,,,,,64,,,,,{ .@r = getrefine(); bonus bAtkRate,1+.@r; bonus bMatkRate,1+.@r; bonus bMaxHPrate,-(2+(.@r*2)); },{},{}
+31018,Evil_Dwelling_Box_Card,Evil Dwelling Box Card,6,20,,10,,,,,,,,2,,,,,{ bonus bMaxHP,-1225; bonus3 bAddEff,Eff_Curse,300,ATF_MAGIC; /* unofficial chance [Secret] */ },{},{}
+31019,Creepy_Demon_Card,Creepy Demon Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,-13; bonus3 bAddEffWhenHit,Eff_Curse,300,ATF_MAGIC; /* unofficial chance [Secret] */ },{},{}
+31020,Malicious_Baby_Ghost_Card,Malicious Baby Ghost Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHPrate,-13; bonus3 bAddEffWhenHit,Eff_Curse,300,ATF_WEAPON; /* unofficial chance [Secret] */ },{},{}
 31021,Dancing_Marionette_Card,Dancing Marionette Card,6,20,,10,,,,,,,,2,,,,,{ bonus bAspdRate,10; bonus bAtkRate,-3; },{},{}
 31022,Abandoned_Teddy_Bear_Card,Abandoned Teddy Bear Card,6,20,,10,,,,,,,,64,,,,,{ bonus bMaxSPRate,20; bonus2 bAddEff2,Eff_Curse,100; /* unofficial chance [Secret] */ },{},{}
 31023,Celine_Kimi_Card,Celine Kimi Card,6,20,,10,,,,,,,,2,,,,,{ bonus bMatkRate,10; bonus5 bAutoSpell,"NPC_CRITICALWOUND",5,200+(50*getrefine()),BF_MAGIC,0; },{},{}

+ 12 - 12
db/re/mob_db.txt

@@ -2141,17 +2141,17 @@
 //2984,TW_TURTLE_GENERAL
 //2985,E_MYSTERIOUS_BUG
 //2986,J_XMAS_SMOKEY_GIFT
-//2987,XM_TREE
-//2988,XM_ANTONIO
-//2989,XM_COOKIE
-//2990,XM_CRUISER
-//2991,XM_MYSTCASE
-//2992,XM_LUDE
-//2993,XM_HYLOZOIST
-//2994,XM_MARIONETTE
-//2995,XM_TEDDY_BEAR
-//2996,XM_CELINE_KIMI
-//2997,G_XM_CELINE_KIMI
+2987,XM_TREE,Decorated Evil Tree,Decorated Evil Tree,148,544444,1,4444,15888,2,1347,1924,116,44,44,66,44,44,144,44,10,12,2,6,69,0x2003885,150,917,1584,576,0,0,0,0,0,0,0,7212,900,7218,2668,7222,2037,12490,500,716,50,604,20,7939,200,0,0,0,0,31016,1
+2988,XM_ANTONIO,Wicked Vice Plant Manager,Wicked Vice Plant Manager,149,44,1,0,0,2,245,272,160,44,44,88,44,44,144,44,10,12,1,1,67,0x63F0081,100,720,720,432,0,0,0,0,0,0,0,7034,2000,19686,100,12490,500,12132,100,12098,500,0,,0,,0,0,0,0,0,
+2989,XM_COOKIE,Vicious Cookie,Vicious Cookie,149,187760,1,6666,7332,1,1348,1925,48,44,44,88,44,44,144,44,10,12,0,6,67,0x2001089,200,1248,1248,240,0,0,0,0,0,0,0,7001,2000,718,100,538,500,530,500,0,,0,,0,,0,0,0,0,31017,1
+2990,XM_CRUISER,Corrupt Cruiser,Corrupt Cruiser,140,188999,1,0,0,12,1339,1916,20,44,44,88,44,44,144,44,10,12,1,6,69,0x2002085,200,1296,1296,432,0,0,0,0,0,0,0,0,,0,,0,,0,,0,,0,,0,,0,0,0,0,0,
+2991,XM_MYSTCASE,Evil Dwelling Box,Evil Dwelling Box,148,259000,1,6666,7332,2,1347,1924,50,44,44,44,44,44,44,44,10,12,1,6,67,0x2001089,200,1248,1248,432,0,0,0,0,0,0,0,7001,2000,539,100,7643,50,7644,50,0,,0,,0,,0,0,0,0,31018,1
+2992,XM_LUDE,Creepy Demon,Creepy Demon,140,4444,1,666,732,1,539,716,90,44,44,44,44,44,44,44,10,12,0,1,67,0x3881,100,890,960,480,0,0,0,0,0,0,0,7225,1600,7220,2862,1059,500,969,1000,7230,1000,7642,1000,7642,1000,0,0,0,0,31019,1
+2993,XM_HYLOZOIST,Malicious Baby Ghost,Malicious Baby Ghost,145,444444,1,4444,15888,2,1621,2288,101,44,144,66,66,66,166,66,10,12,0,6,67,0x2003885,110,741,1536,480,0,0,0,0,0,0,0,7215,1000,7217,1000,7213,1000,740,40,22516,1000,12020,500,0,,0,0,0,0,31020,1
+2994,XM_MARIONETTE,Dancing Marionette,Dancing Marionette,148,280000,1,4444,15888,2,547,724,35,44,44,44,44,144,88,44,10,12,0,6,28,0x2003095,120,1480,480,1056,0,0,0,0,0,0,0,625,100,2486,3,2625,1,699,50,22516,1000,6100,100,0,,0,0,0,0,31021,1
+2995,XM_TEDDY_BEAR,Abandoned Teddy Bear,Abandoned Teddy Bear,148,180000,1,6666,7332,1,1347,1924,106,44,44,166,44,44,166,44,10,12,0,6,69,0x2003295,150,512,780,504,0,0,0,0,0,0,0,7317,1900,615,150,12074,100,12734,1000,12738,100,0,,0,,0,0,0,0,31022,1
+2996,XM_CELINE_KIMI,Celine Kimi,Celine Kimi,160,66666666,1,4444444,4033332,2,5636,8303,479,444,144,166,44,444,166,166,10,12,2,1,28,0x6283695,100,768,1056,480,444444,616,10000,617,10000,22534,10000,22534,4000,18549,4000,7642,4000,19701,100,13442,100,712,10000,0,,0,0,0,0,0,
+2997,G_XM_CELINE_KIMI,Kimi's Phantom,Kimi's Phantom,160,66666666,1,0,0,2,6666,13332,479,444,144,166,44,444,166,166,10,12,2,1,28,0x6203695,100,768,1056,480,0,0,0,0,0,0,0,6683,10000,0,,0,,0,,0,,0,,0,,0,0,0,0,0,
 //2998,EP14_MORS_EVENT
 //2999,EP14_MORS_BOSSA
 //3000,EP14_MORS_BOSSB
@@ -2192,7 +2192,7 @@
 //3035,MUTANT_WRAITH_DEAD
 //3036,MUTANT_VERIT
 //3037,MUTANT_LUDE
-//3038,HIDDEN_MOB7
+3038,HIDDEN_MOB7,Hidden Mob 7,Monster 7,151,10000,1,0,0,1,2000,2000,200,100,100,100,100,100,100,100,12,12,0,0,88,0x6370004,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 //3039,B_MOROCC_1
 //3040,B_MOROCC_2
 //3041,B_MOROCC_4

+ 80 - 0
db/re/mob_skill_db.txt

@@ -10836,6 +10836,86 @@
 2923,Owl Marquees@NPC_EMOTION,chase,197,1,200,0,5000,yes,self,always,0,19,0x0081,,,,,
 2923,Owl Marquees@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 2923,Owl Marquees@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,2922,,,,,,
+
+// Horror Toy Factory
+2987,Decorated Evil Tree@AS_GRIMTOOTH,chase,137,5,2000,0,5000,yes,target,always,0,,,,,,,
+2987,Decorated Evil Tree@NPC_CURSEATTACK,attack,181,3,1000,0,5000,yes,target,always,0,,,,,,6,
+2987,Decorated Evil Tree@NPC_UNDEADATTACK,attack,347,3,500,0,5000,yes,target,always,0,,,,,,6,
+2987,Decorated Evil Tree@MG_THUNDERSTORM,attack,21,20,2000,1500,10000,yes,target,always,0,,,,,,,
+2987,Decorated Evil Tree@TF_SPRINKLESAND,attack,149,1,500,0,5000,yes,target,always,0,,,,,,6,
+2987,Decorated Evil Tree@MG_LIGHTNINGBOLT,chase,20,10,2000,1500,30000,yes,target,always,0,,,,,,,
+2988,Wicked Vice Plant Manager@AL_TELEPORT,attack,26,1,500,0,5000,yes,self,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@AL_TELEPORT,idle,26,1,1000,0,5000,yes,self,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@NPC_RUN,attack,354,1,10000,0,0,yes,self,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@NPC_RUN,chase,354,1,10000,0,0,yes,self,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@SA_REVERSEORCISH,chase,294,1,500,0,30000,yes,target,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@SA_REVERSEORCISH,attack,294,1,500,0,30000,yes,target,always,0,,,,,,29,
+2988,Wicked Vice Plant Manager@MG_SAFETYWALL,attack,12,10,1000,1000,10000,no,self,always,0,,,,,,18,
+2988,Wicked Vice Plant Manager@AL_INCAGI,chase,29,1,500,700,60000,no,self,always,0,,,,,,6,
+2989,Vicious Cookie@MG_COLDBOLT,attack,14,3,500,500,5000,yes,target,always,0,,,,,,21,
+2989,Vicious Cookie@MG_COLDBOLT,chase,14,3,500,500,5000,yes,target,always,0,,,,,,21,
+2989,Vicious Cookie@NPC_ENERGYDRAIN,attack,200,1,500,0,5000,yes,target,always,0,,,,,,30,
+2989,Vicious Cookie@NPC_ENERGYDRAIN,chase,200,1,500,0,5000,yes,target,always,0,,,,,,30,
+2989,Vicious Cookie@PR_LEXAETERNA,attack,78,1,500,1000,5000,yes,target,always,0,,,,,,6,
+2989,Vicious Cookie@PR_LEXAETERNA,chase,78,1,500,1000,5000,yes,target,always,0,,,,,,6,
+2989,Vicious Cookie@SA_REVERSEORCISH,attack,294,1,50,0,30000,yes,target,always,0,,,,,,18,
+2989,Vicious Cookie@SA_REVERSEORCISH,chase,294,1,50,0,30000,yes,target,always,0,,,,,,18,
+2990,Corrupt Cruiser@NPC_COMBOATTACK,attack,171,2,500,0,5000,yes,target,always,0,,,,,,24,
+2990,Corrupt Cruiser@AC_CHARGEARROW,chase,148,1,2000,1000,5000,yes,target,always,0,,,,,,27,
+2990,Corrupt Cruiser@AC_CHARGEARROW,attack,148,1,2000,1000,5000,yes,target,always,0,,,,,,,
+2990,Corrupt Cruiser@AC_DOUBLE,attack,46,7,2000,1200,5000,yes,target,always,0,,,,,,,
+2991,Evil Dwelling Box@NPC_WIDESILENCE,attack,663,1,500,1200,5000,yes,self,always,0,,,,,,,
+2991,Evil Dwelling Box@BS_HAMMERFALL,attack,110,5,500,1500,5000,yes,target,always,0,,,,,,8,
+2991,Evil Dwelling Box@NPC_CURSEATTACK,attack,181,4,500,0,5000,yes,target,always,0,,,,,,,
+2991,Evil Dwelling Box@NPC_HALLUCINATION,attack,207,1,500,0,5000,yes,target,always,0,,,,,,6,
+2991,Evil Dwelling Box@NPC_HALLUCINATION,chase,207,1,500,0,5000,yes,target,always,0,,,,,,6,
+2992,Creepy Demon@AS_CLOAKING,attack,135,1,2000,0,5000,yes,self,always,0,,,,,,,
+2992,Creepy Demon@AS_CLOAKING,idle,135,1,2000,0,5000,yes,self,always,0,,,,,,,
+2992,Creepy Demon@AS_CLOAKING,chase,135,1,2000,0,5000,yes,self,always,0,,,,,,,
+2992,Creepy Demon@MO_BODYRELOCATION,chase,264,1,2000,0,5000,yes,target,always,0,,,,,,28,
+2992,Creepy Demon@MO_BODYRELOCATION,attack,264,1,2000,0,5000,yes,target,always,0,,,,,,28,
+2993,Malicious Baby Ghost@NPC_SILENCEATTACK,attack,178,4,500,0,5000,yes,target,always,0,,,,,,29,
+2993,Malicious Baby Ghost@NPC_HALLUCINATION,chase,207,1,500,0,10000,yes,target,always,0,,,,,,9,
+2993,Malicious Baby Ghost@NPC_HALLUCINATION,attack,207,1,500,0,10000,yes,target,always,0,,,,,,9,
+2993,Malicious Baby Ghost@MO_BODYRELOCATION,chase,264,1,2000,0,5000,yes,target,always,0,,,,,,,
+2993,Malicious Baby Ghost@AS_CLOAKING,idle,135,1,2000,0,10000,yes,self,always,0,,,,,,,
+2993,Malicious Baby Ghost@AS_CLOAKING,chase,135,1,2000,0,10000,yes,self,always,0,,,,,,,
+2993,Malicious Baby Ghost@NPC_TELEKINESISATTACK,attack,191,8,500,0,5000,yes,target,always,0,,,,,,,
+2994,Dancing Marionette@AS_CLOAKING,idle,135,1,2000,0,10000,yes,self,always,0,,,,,,,
+2994,Dancing Marionette@AS_CLOAKING,chase,135,1,2000,0,10000,yes,self,always,0,,,,,,,
+2994,Dancing Marionette@MG_FIREBALL,attack,17,8,2000,800,5000,yes,target,always,0,,,,,,,
+2994,Dancing Marionette@MG_FIREWALL,chase,18,8,500,500,5000,yes,target,always,0,,,,,,2,
+2994,Dancing Marionette@NPC_TELEKINESISATTACK,attack,191,8,500,0,5000,yes,target,always,0,,,,,,6,
+2995,Abandoned Teddy Bear@NPC_CURSEATTACK,attack,181,4,500,0,5000,yes,target,always,0,,,,,,2,
+2995,Abandoned Teddy Bear@NPC_CURSEATTACK,chase,181,4,500,0,5000,yes,target,always,0,,,,,,2,
+2995,Abandoned Teddy Bear@NPC_CRITICALSLASH,attack,170,1,500,0,5000,yes,target,always,0,,,,,,6,
+2995,Abandoned Teddy Bear@SA_DISPELL,attack,289,1,50,1000,15000,yes,target,always,0,,,,,,6,
+2995,Abandoned Teddy Bear@BS_HAMMERFALL,attack,110,5,500,1500,5000,yes,target,always,0,,,,,,8,
+2996,Celine Kimi@AL_HEAL,idle,28,11,10000,500,5000,yes,self,myhpltmaxrate,90,,,,,,,
+2996,Celine Kimi@NPC_CRITICALWOUND,attack,673,2,1000,0,10000,yes,target,always,0,,,,,,,
+2996,Celine Kimi@NPC_PULSESTRIKE,attack,661,3,10000,0,20000,yes,self,always,0,,,,,,,
+2996,Celine Kimi@NPC_DARKSTRIKE,attack,340,10,500,0,10000,yes,target,always,0,,,,,,,
+2996,Celine Kimi@NPC_DARKTHUNDER,attack,341,9,500,1000,20000,yes,target,always,0,,,,,,,
+2996,Celine Kimi@NPC_WIDESTONE,attack,666,5,10000,1000,30000,no,self,myhpltmaxrate,20,,,,,,,
+2996,Celine Kimi@NPC_WIDESLEEP,attack,668,5,10000,1000,30000,no,self,myhpltmaxrate,20,,,,,,,
+2996,Celine Kimi@NPC_WIDESOULDRAIN,attack,680,5,10000,5000,50000,no,self,myhpltmaxrate,10,,,,,,42,
+2996,Celine Kimi@NPC_MAXPAIN,attack,716,9,10000,3000,50000,no,self,myhpltmaxrate,10,,,,,,,
+2996,Celine Kimi@NPC_POWERUP,attack,349,5,10000,0,50000,no,self,myhpltmaxrate,5,,,,,,6,
+2997,Kimi's Phantom@AL_HEAL,idle,28,11,10000,500,5000,yes,self,myhpltmaxrate,90,,,,,,,
+2997,Kimi's Phantom@NPC_CRITICALWOUND,attack,673,1,1000,0,10000,yes,target,always,0,,,,,,,
+2997,Kimi's Phantom@NPC_PULSESTRIKE,attack,661,1,10000,0,20000,yes,self,always,0,,,,,,,
+2997,Kimi's Phantom@NPC_DARKSTRIKE,attack,340,5,500,0,10000,yes,target,always,0,,,,,,,
+2997,Kimi's Phantom@NPC_DARKTHUNDER,attack,341,4,500,1000,20000,yes,target,always,0,,,,,,,
+2997,Kimi's Phantom@NPC_WIDESTONE,attack,666,1,10000,1000,30000,no,self,myhpltmaxrate,20,,,,,,,
+2997,Kimi's Phantom@NPC_WIDESLEEP,attack,668,1,10000,1000,30000,no,self,myhpltmaxrate,20,,,,,,,
+2997,Kimi's Phantom@NPC_WIDESOULDRAIN,attack,680,3,10000,5000,50000,no,self,myhpltmaxrate,10,,,,,,42,
+2997,Kimi's Phantom@NPC_MAXPAIN,attack,716,3,10000,3000,50000,no,self,myhpltmaxrate,10,,,,,,,
+2997,Kimi's Phantom@NPC_POWERUP,attack,349,1,10000,0,50000,no,self,myhpltmaxrate,5,,,,,,6,
+3038,Hidden Mob 7@NPC_INVISIBLE,idle,353,1,10000,0,30000,yes,self,always,0,,,,,,,
+3038,Hidden Mob 7@NPC_INVISIBLE,attack,353,1,10000,0,30000,yes,self,always,0,,,,,,,
+// 3038,Hidden Mob 7@NPC_HELLBURNING,idle,719,1,10000,0,3000,yes,self,always,0,,,,,,,
+// 3038,Hidden Mob 7@NPC_HELLBURNING,attack,719,1,10000,0,3000,yes,self,always,0,,,,,,,
+
 3074,Time Holder@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
 3074,Time Holder@AL_TELEPORT,idle,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,
 3074,Time Holder@AL_TELEPORT,walk,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,

+ 4 - 0
db/re/quest_db.txt

@@ -2579,6 +2579,10 @@
 12321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Time Conqueror"
 12322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Space Distortion"
 
+// Horror Toy Factory - Ep 14.2
+12330,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Skull-faced Girl"
+12331,82800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Trail of Toy Factory"
+
 12334,82800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Trace of Time Travel"
 12335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Space Distortion"
 //12336,0,3151,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Corrupted Soul Hunt"

+ 4 - 1
db/re/skill_cast_db.txt

@@ -1012,7 +1012,7 @@
 678,0,0,0,0,5000,0,-1
 //==========================================
 
-//===== New Monster Skills (12.1) ==========
+//===== New Monster Skills (14.2) ==========
 //-- NPC_HELLPOWER
 683,0,0,0,0,180000,0,-1
 //-- NPC_WIDEHELLDIGNITY
@@ -1042,6 +1042,9 @@
 698,0,20000,0,0,0,0,-1
 //==========================================
 
+//===== New Monster Skills (12.1) ==========
+//-- NPC_MAXPAIN
+716,0,0,0,10000,0,0,0
 //===== 2nd Jobs Quest Skills ==============
 //-- KN_CHARGEATK
 1001,250,0,0,0,0,0,250

+ 2 - 2
db/re/skill_db.txt

@@ -853,8 +853,8 @@
 //713,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DANCINGBLADE,Dancing Blade
 //714,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DANCINGBLADE_ATK,Dancing Blade Attack
 //715,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DARKPIERCING,Dark Piercing
-//716,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_MAXPAIN,Max Pain
-//717,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_MAXPAIN_ATK,Max Pain Attack
+716,0,6,4,0,0x1,0,10,0,no,0,0x2,0,none,0,0x0,		NPC_MAXPAIN,Max Pain
+717,0,6,1,0,0xD2,18,10,1,no,0,0x2,0,misc,0,0x0,		NPC_MAXPAIN_ATK,Max Pain Attack
 //718,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_DEATHSUMMON,Death Summon
 //719,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_HELLBURNING,Hell Burning
 //720,0,0,0,0,0,0,??,0,no,0,0,0,none,0,0x0,		NPC_JACKFROST,Jack Frost 2

+ 16 - 0
doc/script_commands.txt

@@ -5718,6 +5718,22 @@ Examples:
 
 --------------------------------------- 
 
+*pcblockskill <id>,<option>;
+*unitblockskill <id>,<option>;
+
+Prevents the given GID from casting skills when the option is 1, and enables
+the ID to cast skills again when the option is 0. This command will run for
+the attached unit if the given GID is zero.
+
+Examples:
+	// Prevents the current char from casting skills.
+	pcblockskill getcharid(3),1;
+
+	// Enables the current char to cast skills again.
+	pcblockskill getcharid(3),0;
+
+--------------------------------------- 
+
 ==================================
 |5.- Mob / NPC -related commands.|
 ==================================

+ 1 - 0
npc/other/gm_npcs.txt

@@ -88,6 +88,7 @@ List of GM Management NPCs (incomplete)
 - Purification Admin#nyd2
 - Bakonawa's Rage (RE)
 - Bangungot Gate (RE)
+- Horror Toy Factory (RE)
 
 [ Job-related ]
 ----- 3rd Class (RE) -----

+ 1735 - 0
npc/re/instances/HorrorToyFactory.txt

@@ -0,0 +1,1735 @@
+//===== rAthena Script =======================================
+//= Horror Toy Factory
+//===== Description: =========================================
+//= [Official Conversion]
+//= Horror Toy Factory Instance
+//===== Changelogs: ==========================================
+//= 1.0 First version. Uses official script structure and text
+//=     from iRO. [Capuche]
+//============================================================
+
+xmas,237,303,3	script	Catherine Jet Johnson	4_F_SKULL06GIRL,{
+	if (getstatus(SC_MONSTER_TRANSFORM,1) > 0) {
+		mes "[Catherine Jet Johnson]";
+		mes "Aaa.. Are you going to go into there?";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "You'd better release your transformation if you'd like to enter. It could be dangerous in some ways.";
+		close;
+	}
+
+	if (BaseLevel < 140) {
+		mes "[Catherine Jet Johnson]";
+		mes "Ah, wait! Please wait. This is not a good place for a promising young "+ ( Sex ? "man" : "woman" ) +" like you!";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "If you must, come back later after you become far stronger. Hmmm.. I would say.. Lv.140?";
+		close;
+	}
+
+	mes "^ff0000Be cautious taming or other ways than hunting monsters are not considered as normal killing counts.^000000";
+	next;
+	mes "[Catherine Jet Johnson]";
+	switch( isbegin_quest(12330) ) {
+	case 0:
+		mes "Do.. Don't be afraid of me. Now I look ugly, but I wasn't like this before.";
+		next;
+		mes "^0000ffThe skull-faced girl in front of you is speaking in a tearful voice. Void holes where there should be eyes are staring at you.^000000";
+		next;
+		select("What's wrong with your face?");
+		mes "[Catherine Jet Johnson]";
+		mes "This is a long story.. Would you mind if I talk to you? If you waste your time on someone like me?";
+		next;
+		if (select( "Quit.", "Please keep talking." ) == 1) {
+			mes "[Catherine Jet Johnson]";
+			mes "Okay, take care of yourself. And don't ever come near that odd entrance.";
+			close;
+		}
+		mes "[Catherine Jet Johnson]";
+		mes "Mmm.. Where should I start.. The story of this town first?...";
+		next;
+		mes "^0000ffWith a sigh, the girl begins to speak in a subdued tone like a bard who tells an old story.^000000";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "There was a toy factory in this town. All of the people in this town work there and I was one of the employees.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "We all were happy in the beginning. We used to gather around together and have a friendly chat having gingerbread and hot tea after work.";
+		next;
+		select("I couldn't even imagine, seeing this mood...");
+		mes "[Catherine Jet Johnson]";
+		mes "Yes, because we couldn't earn a livng by packaging toys forever. The situations got tough after the villagers left in ones and twos.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "I was the one who worked as an assistant beside the doll craftsman who made dolls to the end.";
+		next;
+		mes "^0000ffI could feel her slender jawbone is trembling due to the subtle change of her emotion.^000000";
+		next;
+		select("Ask her to continue.");
+		mes "[Catherine Jet Johnson]";
+		mes "On the day when the factory is decided to be closed, the doll maker dressed the last doll he made and shed tears.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "Perhaps he thought he wouldn't make a doll anymore.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "He named the last doll ^0000ffCeline Kimi^000000 and stopped all the lines in the factory.";
+		next;
+		select("Did he give a doll a name?");
+		mes "[Catherine Jet Johnson]";
+		mes "Sometimes there can be the work as if it were their child to doll makers. Kimi was the one for him.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "I guess his earnestness breathed life to Kimi.";
+		next;
+		select("Do you mean the doll is alive?");
+		mes "[Catherine Jet Johnson]";
+		mes "Yes, ^0000ffShe^000000 became a living creature. I don't know the reason, but she is striding in the toy factory with heavy sorrow and rage.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "When I first saw her, she was standing beside the doll maker who died and collapsed. She stood there with an unknowable expression.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "That's the end. I was outside when I woke up again after I had been blacked out. My face has become like this.";
+		next;
+		select("Did Kimi do that?");
+		mes "[Catherine Jet Johnson]";
+		mes "I don't know.. She would do it, or it could be a different problem. I have no memory with this.";
+		next;
+		select("Do you blame her?");
+		mes "[Catherine Jet Johnson]";
+		mes "Ah, no. I don't blame her! I just want to know what happened to the doll craftsman on that day.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "I don't think the scene I saw was everything. However, getting into the factory again is.. Re-entering there is...";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "Yes, I am scared and reluctant to do it. If there's someone who can help me..";
+		next;
+		if (select( "I am not very helpful to you.", "Maybe I can help you with it." ) == 1) {
+			mes "[Catherine Jet Johnson]";
+			mes "Thank you for.. for listening to me. Hope you will enjoy your trip..";
+			close;
+		}
+		mes "[Catherine Jet Johnson]";
+		mes "Heh? You would do me a favor?";
+		next;
+		select("Let's get into the factory with me.");
+		mes "[Catherine Jet Johnson]";
+		mes "We.. Well, I cannot help you at all except for providing you with directions. Besides, there can be a big danger to you.";
+		next;
+		select("You can reunite with Kimi, can't you?");
+		mes "[Catherine Jet Johnson]";
+		mes "Kimi, you mean Kimi..";
+		next;
+		mes "^0000ffShe is thinking about something intently with gaping eyes.^000000";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "I.. I've decided. It won't be a great help to you, but I can simply let you know the directions.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "Wait, please wait until I am prepared. I can guide you when I am ready.";
+		setquest 12330;// Skull-faced Girl
+		close;
+	case 1:
+		mes "Done. Let me try to open the closed door.";
+		completequest 12330;
+		break;
+	case 2:
+		mes "Kimi's soul is still staying in this ground. When I can let her rest in peace...";
+		break;
+	}
+	next;
+	if (getcharid(1) < 1) {
+		mes "^0000ffYou need to organize a party having more than a member to get into Horror Toy Factory.^000000";
+		close;
+	}
+	switch( checkquest(12331,PLAYTIME) ) {
+	case -1:
+		if (getpartyleader(getcharid(1),2) != getcharid(0)) {
+			mes "[Catherine Jet Johnson]";
+			mes "Eh.. Give me a second. I am talking to the person in charge. Please wait for a while.";
+			close;
+		}
+		if (select( "Unlock Horror Toy Factory", "Cancel" ) == 1) {
+			mes "Door will be.. opened soon.. Would you wait for a moment?";
+			if (instance_create("Horror Toy Factory") >= 0)
+				'xm_d_map$ = instance_mapname("1@xm_d");
+		}
+		close;
+	case 0:
+	case 1:
+		mes "[Catherine Jet Johnson]";
+		mes "The smell of preservative from the factory has not been going away. You cannot stand longer there under this state.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "I will keep you from entering before the scent of preservative is completely gone away.";
+		close;
+	case 2:
+		mes "^0000ffThe smell of preservative has gone away. You can talk to Catherine Jet Johnson.^000000";
+		erasequest 12331;
+		close;
+	}
+}
+
+xmas,233,305,4	script	Factory Dimension Telep	PORTAL,{
+	if (getstatus(SC_MONSTER_TRANSFORM,1) > 0) {
+		mes "[Factory Dimension Teleporter]";
+		mes "There are some work study programs as monster workers during the Horror Toy Factory tour. Therefore, ^ff0000You are limited to enter when you are in transformation.^000000";
+		close;
+	}
+	if (BaseLevel < 140) {
+		mes "[Factory Dimension Teleporter]";
+		mes "You are not eligible for dimensional shifting. You should be at least Lv.140.";
+		close;
+	}
+	if (getcharid(1) < 1) {
+		mes "[Factory Dimension Teleporter]";
+		mes "You don't have any fellows? Please organize a party and come again if you go alone.";
+		close;
+	}
+	switch( checkquest(12331,PLAYTIME) ) {
+	case -1:
+		switch( instance_enter("Horror Toy Factory") ) {
+		case 3:
+			mes "An unknown error has occurred.";
+			close;
+		case 2:
+			mes "The gateway for dimensional shifting has not been activated.";
+			close;
+		case 1:// dummy
+			mes "[Factory Dimension Teleporter]";
+			mes "You don't have any fellows? Please organize a party and come again if you go alone.";
+			close;
+		case 0:
+			mapannounce "xmas", getpartyname( getcharid(1) ) +" party's party member "+ strcharinfo(0) +" enters Horror Toy Factory.", bc_map, "0x00ff99";
+			setquest 12331;// Trail of Toy Factory
+			end;
+		}
+	case 0:
+	case 1:
+		mes "You already have a trail of dimensional shifting. Your access has been denied.";
+		close;
+	case 2:
+		mes "^0000ffThe trail of dimensional shifting disappeared. You are allowed to use Factory Dimension Teleporter.^000000";
+		erasequest 12331;
+		close;
+	}
+}
+
+1@xm_d,112,20,6	script	Catherine Jet Johnson#0	4_F_SKULL06GIRL,{
+	if (getstatus(SC_MONSTER_TRANSFORM,1) > 0) {
+		mes "[Catherine Jet Johnson]";
+		mes "You cannot come to here if you are under the effect of a monstre transformation.";
+		next;
+		mes "[Catherine Jet Johnson]";
+		mes "Please wait until the transformation is finished. You cannot move to another area before you become normal.";
+		close;
+	}
+	if (getpartyleader(getcharid(1),2) != getcharid(0)) {
+		mes "[Catherine Jet Johnson]";
+		mes "Eh.. Give me a second. I am talking to the person in charge. Please wait.";
+		close;
+	}
+	mes "[Catherine Jet Johnson]";
+	mes "Everyone is in their mortal corruptible state right?";
+	npctalk "Catherine Jet Johnson: Everyone is in their mortal corruptible state right?";
+	next;
+	switch( select( "Quit the story", "Listen to her story.", "I know your situation. Let's start quickly!" ) ) {
+	case 1:
+		mes "[Catherine Jet Johnson]";
+		mes "Oh, dear. Let me know when you are ready.";
+		close;
+	case 2:
+		donpcevent instance_npcname("Catherine Jet Johnson#01") + "::OnStart";
+		close;
+	case 3:
+		donpcevent instance_npcname("Catherine Jet Johnson#01") + "::OnStart2";
+		close;
+	}
+}
+
+1@xm_d,112,20,1	script	Catherine Jet Johnson#01	4_F_SKULL06GIRL,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#bgm01");
+	enablenpc instance_npcname("Catherine Jet Johnson#01");
+	disablenpc instance_npcname("Catherine Jet Johnson#0");
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: This area was Factory No.1. It used to be the place where the toys and dolls were stored before given as presents.";
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: Ah, I remember several things. If someone wasn't in the employee's uniform, the guards used to come and scold them....";
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: By the way...";
+	donpcevent instance_npcname("#fac1ct") + "::OnStart";
+	sleep 3000;
+	mapannounce 'xm_d_map$, "Factory announcement: Wake up, toy factory working time has come...", bc_map, "0x00ff44";
+	sleep 6000;
+	npctalk "Catherine Jet Johnson: Wh.. What happened? Toys and dolls are wandering instead of human workers. As if they are employees...";
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: I think other spirits have inhabited the empty factory for too long.";
+	sleep 3000;
+	mapannounce 'xm_d_map$, "Factory announcement: Waste and other debries should be kept clear from work areas. This is to keep you safe at all times.", bc_map, "0x00ff44";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: It's just like when humans worked here.";
+	sleep 3000;
+	mapannounce 'xm_d_map$, "Factory announcement: Let's make presents for every child's dream today.", bc_map, "0x00ff44";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: But, it's not the time to be happy. Once we find the last factory area, we will need to halt all production lines.";
+	sleep 1000;
+	mapannounce 'xm_d_map$, "Factory announcement: Please start product line No.1. Don't forget to wear a safety helmet! This means you Bob!", bc_map, "0x00ff44";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: Ah, maybe we should restore those toys and gift boxes to their original condition.";
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: Eh? I... I mean... To return them as they were.. Yes... We need to fight them? I don't how exactly.";
+	sleep 2000;
+	mapannounce 'xm_d_map$, "Factory announcement: All employees must wear a proper uniform and identification. Please check with security if you do not have yours.", bc_map, "0x00ff44";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: Good heavens, I home the guards are still human. There were boxes of uniforms near here in the past..";
+	enablenpc instance_npcname("Employees' Uniform Box#1");
+	enablenpc instance_npcname("Employees' Uniform Box#2");
+	enablenpc instance_npcname("Employees' Uniform Box#3");
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: Ah, they are behind me. You'd better change into the uniform. Fortunately, I still have my employee card.";
+	sleep 5000;
+	npctalk "Catherine Jet Johnson: I will find my way around here. Let's meet near the second production line. Cheer up its a toy factory. It can't be all that bad!!";
+	sleep 6000;
+	disablenpc instance_npcname("Catherine Jet Johnson#01");
+	disablenpc instance_npcname("#bgm01");
+	end;
+
+OnStart2:
+	enablenpc instance_npcname("#bgm01");
+	enablenpc instance_npcname("Catherine Jet Johnson#01");
+	disablenpc instance_npcname("Catherine Jet Johnson#0");
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: Ah.. We have explored here before? Okay, let's meet at the same spot again.";
+	sleep 6000;
+	disablenpc instance_npcname("Catherine Jet Johnson#01");
+	enablenpc instance_npcname("Employees' Uniform Box#1");
+	enablenpc instance_npcname("Employees' Uniform Box#2");
+	enablenpc instance_npcname("Employees' Uniform Box#3");
+	mapannounce 'xm_d_map$, "Factory announcement: Wake up, toy factory working time has come...", bc_map, "0x00ff44";
+	sleep 6000;
+	mapannounce 'xm_d_map$, "Factory announcement: Waste and other debries should be kept clear from work areas. This is to keep you safe at all times.", bc_map, "0x00ff44";
+	sleep 6000;
+	mapannounce 'xm_d_map$, "Factory announcement: Let's make presents for every child's dream today.", bc_map, "0x00ff44";
+	donpcevent instance_npcname("#fac1ct") + "::OnStart";
+	disablenpc instance_npcname("#bgm01");
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,112,20,0	script	#bgm01	-1,9,9,{
+	end;
+OnTouch:
+	playBGM "99";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,13,105,6	script	Employees' Uniform Box#1	4_NONMYSTCASE,{
+	progressbar "ffff00",1;
+	playBGM "52";
+	.@mob_id_transform = getstatus(SC_MONSTER_TRANSFORM,1);
+	if (.@mob_id_transform == 1246 || .@mob_id_transform < 1) {
+		mes "^0000ffYou put on a factory uniform. There still seem to be a few uniforms left in the box.^000000";
+		transform 1246,180000;// COOKIE_XMAS
+		close;
+	}
+	mes "^ff0000In transformation";
+	mes "You cannot use uniform box when already transformed.^000000";
+	close;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+1@xm_d,116,16,6	duplicate(Employees' Uniform Box#1)	Employees' Uniform Box#2	4_NONMYSTCASE
+1@xm_d,10,20,6	duplicate(Employees' Uniform Box#1)	Employees' Uniform Box#3	4_NONMYSTCASE
+
+1@xm_d,1,5,3	script	#fac1ct	CLEAR_NPC,{
+	end;
+OnStart:
+	.@event$ = instance_npcname("#fac1ct") + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	areamonster 'xm_d_map$,16,24,114,112, "Vicious Cookie",2989,31, .@event$;	// XM_COOKIE
+	areamonster 'xm_d_map$,16,24,114,112, "Evil Dwelling Box",2991,36, .@event$;// XM_MYSTCASE
+	end;
+
+OnMyMobDead:
+	if (mobcount( 'xm_d_map$, instance_npcname("#fac1ct") + "::OnMyMobDead" ) < 30)
+		initnpctimer;
+	end;
+
+OnTimer1000:
+	killmonster 'xm_d_map$, instance_npcname("#fac1ct") + "::OnMyMobDead";
+	enablenpc instance_npcname("#fac1bs");
+	mapannounce 'xm_d_map$, "Coordinator's announcement: Huh? Where's everyone! How dare workers to be absent from the line!", bc_map, "0xff8800";
+	for ( .@i = 61; .@i <= 89; .@i++ )
+		disablenpc instance_npcname( "alert#"+ .@i );
+	stopnpctimer;
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,71,129,3	script	#fac1bs	4_M_COOKIE,{
+	if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+		.@mob_id_transform = getstatus(SC_MONSTER_TRANSFORM,1);
+		mes "[Coordinator]";
+		if (.@mob_id_transform == 1246) {
+			mes "I can't find the other workers. We don't have time for dawdling. Children are waiting for presents.";
+			next;
+			mes "[Coordinator]";
+			mes "Hurry up! Carry ^ff0000the gift box over there^000000 and move to the east.";
+			enablenpc instance_npcname("#pck1");
+			npctalk "Coordinator: Hurry up! Carry the gift box over there and move to the east.";
+		}
+		else if (.@mob_id_transform == 1249)
+			mes "Why are you hanging around! Carry ^ff0000the gift box over here^000000 and move to the east.";
+		else {
+			mes "What!? Humans!!!";
+			donpcevent instance_npcname("#fac1bs") + "::OnAlert";
+		}
+		close;
+	}
+	end;
+
+OnAlert:
+	.@npc_name$ = instance_npcname("#fac1bs");
+	.@event$ = .@npc_name$ + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	npctalk "Coordinator: Guard! Where is guard! Humans are invading!!";
+	sleep 3000;
+	disablenpc .@npc_name$;
+	for ( .@i = 0; .@i <= 10; .@i++ ) {
+		areamonster 'xm_d_map$,61,118,71,128, "Guard",2990,1, .@event$;// XM_CRUISER
+		sleep 300;
+	}
+	initnpctimer;
+	end;
+OnMyMobDead:
+	end;
+
+OnTimer60000:
+	.@npc_name$ = instance_npcname("#fac1bs");
+	killmonster 'xm_d_map$, .@npc_name$ + "::OnMyMobDead";
+	enablenpc .@npc_name$;
+	npctalk "Coordinator: This kind of things happens a lot these days...";
+	stopnpctimer;
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,65,127,6	script	#pck1	4_NONMYSTCASE,{
+	progressbar "ffff00",1;
+	.@mob_id_transform = getstatus(SC_MONSTER_TRANSFORM,1);
+	if (.@mob_id_transform == 1246) {
+		mes "^0000ffYou are carrying the packaged present.^000000";
+		transform 1249,180000;// MYSTCASE
+	}
+	else if (.@mob_id_transform == 1249)
+		mes "^009900The box is in your hands. You cannot carry more than one boxe.^000000";
+	else
+		mes "^ff0000You are not in uniform. The Coordinator won't let you pick it up.^000000";
+	close;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,76,129,0	script	#fac1wp	WARPNPC,2,2,{
+OnTouch:
+	if (getstatus(SC_MONSTER_TRANSFORM,1) == 1249) {
+		warp 'xm_d_map$,88,129;
+		playBGM "54";
+	}
+	end;
+}
+
+1@xm_d,79,129,0	script	#fac1wp2	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,73,129;
+	end;
+}
+
+1@xm_d,179,129,0	script	#fac2wp	WARPNPC,2,2,{
+OnTouch:
+	if (getstatus(SC_MONSTER_TRANSFORM,1) == 1249) {
+		warp 'xm_d_map$,183,100;
+		playBGM "54";
+	}
+	end;
+}
+
+1@xm_d,184,109,0	script	#fac2wp2	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,170,129;
+	end;
+}
+
+1@xm_d,1,5,3	script	#alert1	CLEAR_NPC,{
+	end;
+OnStart:
+	.@r = rand(1,10);
+	if (.@r == 1)
+		mapannounce 'xm_d_map$, "Factory announcement: Outsiders are spotted on the product line. Guard, please move out immediately.",bc_map,"0x00ffff";
+	else if (.@r == 2)
+		mapannounce 'xm_d_map$, "Factory announcement: Invaders have been identified. Distinction Code AX0829. Type: Human. Chase them away.", bc_map, "0x00ffff";
+	else if (.@r == 3)
+		mapannounce 'xm_d_map$, "Guard's announcement: Please immediately leave here, outsiders.", bc_map, "0xffff00";
+	else if (.@r == 4)
+		mapannounce 'xm_d_map$, "Factory announcement: Outsiders, hold up your hands and surrender. Otherwise, I will shoot you.", bc_map, "0x00ffff";
+	else if (.@r == 5)
+		mapannounce 'xm_d_map$, "Factory announcement: Dispatch the guard. Suppress the invaders.", bc_map, "0x00ffff";
+	else if (.@r == 6)
+		mapannounce 'xm_d_map$, "CAUTION: The plant manger is coming to inspect. Wipe out the outsiders.", bc_map, "0xff4444";
+	else if (.@r == 7)
+		mapannounce 'xm_d_map$, "Factory announcement: Not good news. Outside creatures are detected. Guard, please mobilize.", bc_map, "0x00ff88";
+	else if (.@r == 8)
+		mapannounce 'xm_d_map$, "Factory announcement: Outsiders or invaders are obstacles to operate the factory. You can kill them if it is necessary.", bc_map, "0xff9999";
+	else if (.@r == 9)
+		mapannounce 'xm_d_map$, "Factory announcement: Okay that's it, party's over! Get out of my house!", bc_map, "0x00ffff";
+	else
+		mapannounce 'xm_d_map$, "Guard's announcement: Invaders are spotted! They seem human! I will blip them off!", bc_map, "0xffff00";
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,10,24,0	script	alert#61	-1,10,10,{
+OnTouch_:
+	if (getstatus(SC_MONSTER_TRANSFORM,1) != 1246) {
+		switch( atoi(strnpcinfo(2)) ) {
+			case 63: case 66:
+			case 69: case 72:
+			case 79: case 82:
+			case 85: case 88:
+				.@count = 4;
+				break;
+			case 61: case 64:
+			case 67: case 70:
+			case 73: case 75:
+			case 77: case 80:
+			case 83: case 86:
+			case 89:
+				.@count = 6;
+				break;
+			default:
+				.@count = 5;
+				break;
+		}
+		getmapxy .@map$, .@x, .@y, 0;
+		.@npc_name$ = instance_npcname( strnpcinfo(0) );
+		.@event$ = .@npc_name$ + "::OnMyMobDead";
+		playBGM "125";
+		specialeffect EF_VENOMDUST;
+		donpcevent instance_npcname("#alert1") + "::Onstart";
+		disablenpc .@npc_name$;
+		killmonster 'xm_d_map$, .@event$;
+		areamonster 'xm_d_map$,(.@x-10),(.@y-10),(.@x+10),(.@y+10), "Toy Factory Guard",2990,.@count, .@event$;// XM_CRUISER
+		initnpctimer;
+	}
+	end;
+
+OnTimer45000:
+	enablenpc instance_npcname( strnpcinfo(0) );
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) +"::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OnMyMobDead:
+	end;
+}
+1@xm_d,30,24,0	duplicate(alert#61)	alert#62	-1,10,10
+1@xm_d,50,24,0	duplicate(alert#61)	alert#63	-1,10,10
+1@xm_d,70,24,0	duplicate(alert#61)	alert#64	-1,10,10
+1@xm_d,90,24,0	duplicate(alert#61)	alert#65	-1,10,10
+1@xm_d,10,44,0	duplicate(alert#61)	alert#66	-1,10,10
+1@xm_d,30,44,0	duplicate(alert#61)	alert#67	-1,10,10
+1@xm_d,50,44,0	duplicate(alert#61)	alert#68	-1,10,10
+1@xm_d,70,44,0	duplicate(alert#61)	alert#69	-1,10,10
+1@xm_d,90,44,0	duplicate(alert#61)	alert#70	-1,10,10
+1@xm_d,110,44,0	duplicate(alert#61)	alert#71	-1,10,10
+1@xm_d,10,64,0	duplicate(alert#61)	alert#72	-1,10,10
+1@xm_d,30,64,0	duplicate(alert#61)	alert#73	-1,10,10
+1@xm_d,50,64,0	duplicate(alert#61)	alert#74	-1,10,10
+1@xm_d,70,64,0	duplicate(alert#61)	alert#75	-1,10,10
+1@xm_d,90,64,0	duplicate(alert#61)	alert#76	-1,10,10
+1@xm_d,110,64,0	duplicate(alert#61)	alert#77	-1,10,10
+1@xm_d,10,84,0	duplicate(alert#61)	alert#78	-1,10,10
+1@xm_d,30,84,0	duplicate(alert#61)	alert#79	-1,10,10
+1@xm_d,50,84,0	duplicate(alert#61)	alert#80	-1,10,10
+1@xm_d,70,84,0	duplicate(alert#61)	alert#81	-1,10,10
+1@xm_d,90,84,0	duplicate(alert#61)	alert#82	-1,10,10
+1@xm_d,110,84,0	duplicate(alert#61)	alert#83	-1,10,10
+1@xm_d,10,104,0	duplicate(alert#61)	alert#84	-1,10,10
+1@xm_d,30,104,0	duplicate(alert#61)	alert#85	-1,10,10
+1@xm_d,50,104,0	duplicate(alert#61)	alert#86	-1,10,10
+1@xm_d,70,104,0	duplicate(alert#61)	alert#87	-1,10,10
+1@xm_d,90,104,0	duplicate(alert#61)	alert#88	-1,10,10
+1@xm_d,110,104,0	duplicate(alert#61)	alert#89	-1,10,10
+1@xm_d,155,20,0	duplicate(alert#61)	alert#90	-1,10,10
+1@xm_d,180,50,0	duplicate(alert#61)	alert#91	-1,10,10
+1@xm_d,205,80,0	duplicate(alert#61)	alert#92	-1,10,10
+1@xm_d,230,110,0	duplicate(alert#61)	alert#93	-1,10,10
+1@xm_d,180,20,0	duplicate(alert#61)	alert#94	-1,10,10
+1@xm_d,180,50,0	duplicate(alert#61)	alert#95	-1,10,10
+1@xm_d,180,80,0	duplicate(alert#61)	alert#96	-1,10,10
+1@xm_d,205,20,0	duplicate(alert#61)	alert#97	-1,10,10
+1@xm_d,205,50,0	duplicate(alert#61)	alert#98	-1,10,10
+1@xm_d,205,80,0	duplicate(alert#61)	alert#99	-1,10,10
+1@xm_d,205,110,0	duplicate(alert#61)	alert#100	-1,10,10
+1@xm_d,230,20,0	duplicate(alert#61)	alert#101	-1,10,10
+1@xm_d,230,50,0	duplicate(alert#61)	alert#102	-1,10,10
+1@xm_d,230,80,0	duplicate(alert#61)	alert#103	-1,10,10
+1@xm_d,230,110,0	duplicate(alert#61)	alert#104	-1,10,10
+
+
+1@xm_d,185,100,6	script	Catherine Jet Johnson#2	4_F_SKULL06GIRL,{
+	if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+		mes "[Catherine Jet Johnson]";
+		mes "Lucky you got here safely.";
+		next;
+		switch( select( "Quit the story", "Listen to her tatics.", "I know what to do. Proceed quickly!" ) ) {
+		case 1:
+			mes "[Catherine Jet Johnson]";
+			mes "Oh, dear. Let me know when you are ready.";
+			close;
+		case 2:
+			donpcevent instance_npcname("Catherine Jet Johnson#21") + "::OnStart";
+			close;
+		case 3:
+			donpcevent instance_npcname("Catherine Jet Johnson#21") + "::OnStart2";
+			close;
+		}
+	}
+	mes "[Catherine Jet Johnson]";
+	mes "Hold on~ I am talking to your manager, so please wait.";
+	close;
+}
+
+1@xm_d,185,100,6	script	Catherine Jet Johnson#21	4_F_SKULL06GIRL,{
+	end;
+OnStart:
+	callsub S_Skip,0;
+OnStart2:
+	callsub S_Skip,1;
+S_Skip:
+	enablenpc instance_npcname("#bgm06");
+	enablenpc instance_npcname("Catherine Jet Johnson#21");
+	disablenpc instance_npcname("Catherine Jet Johnson#2");
+	sleep 3000;
+	if (getarg(0) == 1)
+		npctalk "Catherine Jet Johnson: If you find all clues, search other places. I will look for the spot where I met the doll maker last time I was here.";
+	else {
+		npctalk "Catherine Jet Johnson: This place was Factory No.2.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: It used to be filled with people, but now it isn't.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: Ah, I realized something while coming here. Some...Children...";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: How can I say.. There were lots of souls looking very scary, but awfully sad.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: How pitiful they are, but please make them rest if they attack you. Fortunately, they won't come at me.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: If you see a worker toy on duty while searching here, would you ask it about the doll maker?";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: He might be sent to Heaven if they recall the memory of doll maker. That the only hope.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: If you find all clues, search other places. I will look for the spot where I met the doll maker last time I was here.";
+		sleep 5000;
+		npctalk "Catherine Jet Johnson: Sorry that I can't be a big help to you. See you in a minute.";
+	}
+	sleep 6000;
+	disablenpc instance_npcname("Catherine Jet Johnson#21");
+	enablenpc instance_npcname("Employees' Uniform Box#4");
+	donpcevent instance_npcname("#fac2ct") + "::OnStart";
+
+	for ( .@i = 1; .@i <= 10; .@i++ )
+		enablenpc instance_npcname( "Worker#"+ .@i );
+	disablenpc instance_npcname("#bgm06");
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,185,100,0	script	#bgm06	-1,9,9,{
+OnTouch:
+	playBGM "99";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,185,94,6	script	Employees' Uniform Box#4	4_NONMYSTCASE,{
+	progressbar "ffff00",1;
+	playBGM "128";
+	.@mob_id_transform = getstatus(SC_MONSTER_TRANSFORM,1);
+	if (.@mob_id_transform == 1246 || .@mob_id_transform == 1249 || .@mob_id_transform < 1) {
+		mes "^0000ff>You changed into uniform.^000000";
+		transform 1246,300000;// COOKIE_XMAS
+		close;
+	}
+	mes "^ff0000You transformed into a different form.";
+	mes "You can't seem to put on the uniform over your fangs.^000000";
+	close;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#fac2ct	CLEAR_NPC,{
+	end;
+OnEnd:
+	killmonster 'xm_d_map$, instance_npcname("#fac2ct") + "::OnMyMobDead";
+	end;
+
+OnStart:
+	.@event$ = instance_npcname("#fac2ct") + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	areamonster 'xm_d_map$,140,18,240,120, "Malicious Baby Ghost",2993,19, .@event$;	// XM_HYLOZOIST
+	areamonster 'xm_d_map$,140,18,240,120, "Evil Dwelling Box",2991,16, .@event$;		// XM_MYSTCASE
+	areamonster 'xm_d_map$,140,18,240,120, "Abandoned Teddy bear",2995,22, .@event$;	// XM_TEDDY_BEAR
+	areamonster 'xm_d_map$,140,18,240,120, "Creepy Demon",2992,16, .@event$;			// XM_LUDE
+	end;
+OnMyMobDead:
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,130,178,0	script	#fac3wp	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,130,193;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,130,184,0	script	#fac3wp2	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,129,173;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,2,3	script	#fac2wpc	CLEAR_NPC,{
+	end;
+OnStart:
+	.@fac_open = 'worker[1] + 'worker[2] + 'worker[3] + 'worker[4] + 'worker[5] + 'worker[6] + 'worker[7] + 'worker[8] + 'worker[9] + 'worker[10];
+	if (.@fac_open == 10) {
+		enablenpc instance_npcname("#fac3wp");
+		enablenpc instance_npcname("#fac3wp2");
+		donpcevent instance_npcname("#fac2ct") + "::OnEnd";
+		mapannounce 'xm_d_map$, "Factory announcement: Everyone has gone home. The line is shut down and the employee's lounge is open.", bc_map, "0x00ff44";
+		for ( .@i = 90; .@i <= 104; .@i++ )
+			disablenpc instance_npcname( "alert#"+ .@i );
+	}
+	else
+		mapannounce 'xm_d_map$, "Factory announcement: Now there are " + (10 - .@fac_open) + " people on the packaging line. Take care of yourself.", bc_map, "0x00ff44";
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,155,98,3	script	Worker#1	4_M_COOKIE,{
+	if (getstatus(SC_MONSTER_TRANSFORM,1) == 1246) {
+		.@num = atoi(strnpcinfo(2));
+		mes "[Worker]";
+		mes "Huh? What happened?";
+		next;
+		if (select( "No, nothing special", "Do you know about the doll maker?" ) == 1) {
+			mes "[Worker]";
+			if (.@num == 8)
+				mes "I'm working now! I'm very busy!";
+			else
+				mes "I'm very busy with working, so could you stop chatting?";
+			close;
+		}
+		close2;
+		pcblockmove getcharid(3),1;// todo : not able to talk to npc
+		pcblockskill getcharid(3),1;
+		switch(.@num) {
+		case 1:
+			npctalk "Worker: Ah! Grandpa? He's a real good man. He oiled us everyday and cleaned the dust very often.";
+			sleep2 3000;
+			npctalk "Worker: I wish he wouldn't pass away. Ah... Ahah... I feel better.";
+			break;
+		case 2:
+			npctalk "Worker: Did Kimi kill the craftman grandpa? Who said that? That's not true. Kimi was going to save him!";
+			sleep2 3000;
+			npctalk "Worker: Ah... B.. By the way, why my body becomes...";
+			break;
+		case 3:
+			npctalk "Worker: He had chronic cardiac disease, but it suddenly started to fit on the day he died. Kimi found him and gave him first aid, but..";
+			sleep2 3000;
+			npctalk "Worker: Ah.. Did you do something to me? I feel strange...";
+			break;
+		case 4:
+			npctalk "Worker: Kimi didn't move at all for sometime and sat down like ordinary dolls.";
+			sleep2 3000;
+			npctalk "Worker: She was about to fly her soul forever... Like me now... Oh, my... What happened to me?";
+			break;
+		case 5:
+			npctalk "Worker: Oh, Kimi.. My dear.. She thought the doll maker passed away because she startled him.";
+			sleep2 3000;
+			npctalk "Worker: Grandpa was just very pleased that Kimi was moving..";
+			break;
+		case 6:
+			npctalk "Worker: He could see a living doll for a while. That's what Kimi first did.";
+			sleep2 3000;
+			npctalk "Worker: And what she first saw was his death. What a misery.";
+			break;
+		case 7:
+			npctalk "Worker: Kimi was able to hear the Grandpa's voice and feel before she was indwelled.";
+			sleep2 3000;
+			npctalk "Worker: Perhaps Grandpa's affection made her move and become alive. Ahah.. I'm sleepy..";
+			break;
+		case 8:
+			npctalk "Worker: Grandpa good man! Kimi pity! Kimi loves Grandpa! Granpa died. I'm sad!";
+			sleep2 3000;
+			break;
+		case 9:
+			npctalk "Worker: He was so amazed to see Kimi's opening eyes and his heart... It became like that.";
+			sleep2 3000;
+			npctalk "Worker: Anyhow, why my body... It's likely to float in the air.... Something strange.";
+			break;
+		case 10:
+			npctalk "Worker: Kimi didn't hurt Grandpa! Kimi's wanted to save Grandpa! People are scared of Kimi Kimi is kind! Kimi is a good girl!";
+			sleep2 3000;
+			npctalk "Worker: Grandpa... I miss him. Grandpa, Grandpa...";
+			break;
+		}
+		sleep2 3000;
+		disablenpc instance_npcname( strnpcinfo(0) );
+		if ('worker[.@num] == 0) {
+			'worker[.@num] = 1;
+			donpcevent instance_npcname("#fac2wpc") + "::OnStart";
+		}
+		pcblockmove getcharid(3),0;
+		pcblockskill getcharid(3),0;
+		end;
+	}
+	mes "[Worker]";
+	mes "What!? You are not one of us!!";
+	donpcevent instance_npcname( strnpcinfo(0) ) + "::OnAlert";
+	close;
+
+OnAlert:
+	.@npc_name$ = instance_npcname( strnpcinfo(0) );
+	killmonster 'xm_d_map$, .@npc_name$ + "::OnMyMobDead";
+	.@num = atoi(strnpcinfo(2));
+	if (.@num == 8)
+		npctalk "Worker: Guard! Guard!!";
+	else
+		npctalk "Worker: Guard, Guard! Where are you?! Humans are here!!";
+	sleep 3000;
+	switch(.@num) {
+	case 9:
+		setarray .@coord[0],233,27;
+		break;
+	case 10:
+		setarray .@coord[0],209,27;
+		break;
+	default:
+		getmapxy .@map$, .@coord[0], .@coord[1], UNITTYPE_NPC;
+		break;
+	}
+	areamonster 'xm_d_map$,(.@coord[0]-8),(.@coord[1]-8),(.@coord[0]+8),(.@coord[1]+8), "Guard",2990,21, .@npc_name$ + "::OnMyMobDead";
+	disablenpc .@npc_name$;
+	if ('worker[.@num] == 0) {
+		'worker[.@num] = 1;
+		donpcevent instance_npcname("#fac2wpc") + "::OnStart";
+	}
+	initnpctimer;
+	end;
+OnTimer60000:
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+OnMyMobDead:
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+1@xm_d,130,72,3	duplicate(Worker#1)	Worker#2	4_M_COOKIE
+1@xm_d,134,34,1	duplicate(Worker#1)	Worker#3	4_M_COOKIE
+1@xm_d,195,28,3	duplicate(Worker#1)	Worker#4	4_M_COOKIE
+1@xm_d,228,30,1	duplicate(Worker#1)	Worker#5	4_M_COOKIE
+1@xm_d,203,55,3	duplicate(Worker#1)	Worker#6	4_M_COOKIE
+1@xm_d,132,52,1	duplicate(Worker#1)	Worker#7	4_M_COOKIE
+1@xm_d,162,52,1	duplicate(Worker#1)	Worker#8	4_M_COOKIE
+1@xm_d,242,17,5	duplicate(Worker#1)	Worker#9	4_M_COOKIE
+1@xm_d,209,15,3	duplicate(Worker#1)	Worker#10	4_M_COOKIE
+
+
+// Note : aegis script have OnClick part
+1@xm_d,131,208,0	script	Captured Santa#2	4_M_SANTA,10,10,{
+	end;
+OnTouch_:
+	disablenpc instance_npcname("Captured Santa#2");
+	enablenpc instance_npcname("Captured Santa#3");
+	donpcevent instance_npcname("Antonio#1") + "::OnStart";
+	enablenpc instance_npcname("#bgm04");
+	end;
+}
+
+1@xm_d,131,208,8	script	Captured Santa#3	4_M_SANTA,{
+	mes "[Captured Santa]";
+	mes "Even if no one owns it, its not right to steal it from everyone.";
+	close;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,131,213,4	script	Antonio#1	4_M_ANTONIO,{
+	mes "[Antonio]";
+	mes "Hey, Santa. Stop being stuffy, you old man. Fair is fair after all, kekeke.";
+	close;
+
+OnStart:
+	.@antonio$ = instance_npcname("Antonio#1");
+	.@santa$ = instance_npcname("Captured Santa#3");
+	sleep 3000;
+	npctalk "Antonio: Listen to me, Santa~ I mean, I like this factory.", .@antonio$;
+	sleep 3000;
+	npctalk "Antonio: No one owns it~ And there are a number of things I can use.", .@antonio$;
+	sleep 3000;
+	npctalk "Captured Santa: You silly! Just to be sure, I followed you. Now you steal from everyones factory!", .@santa$;
+	sleep 4000;
+	npctalk "Antonio: Hey, is this a big deal if I have surplus presents? I don't know about that~", .@antonio$;
+	sleep 4000;
+	npctalk "Captured Santa: Whew... Okay, but think about that how children feel when they got them.", .@santa$;
+	sleep 4000;
+	npctalk "Captured Santa: How they feel if they know you distributed the masterless things to them?", .@santa$;
+	sleep 4000;
+	npctalk "Antonio: Hmm...", .@antonio$;
+	sleep 2000;
+	npctalk "Antonio: Maybe... I will be happy?! Anyway, that's a present, kekekeke.", .@antonio$;
+	sleep 5000;
+	npctalk "Captured Santa: Who said the present itself is the problem! You'd better stop this theft, Antonio!", .@santa$;
+	sleep 5000;
+	mapannounce 'xm_d_map$, "Factory announcement: The sending preparations have finished in Factory No.3.", bc_map, "0x00ff44";
+	sleep 5000;
+	mapannounce 'xm_d_map$, "Factory announcement: Delivery employees, please stand by.", bc_map, "0x00ff44";
+	sleep 3000;
+	npctalk "Antonio: Oh! Wohuhu! A bunch of presents are dealayed. Let's have a party today?!", .@antonio$;
+	sleep 4000;
+	npctalk "Antonio: Hey, human. You can follow me if you'd like to help. I'm okay unless you disturb me!", .@antonio$;
+	sleep 4000;
+	disablenpc .@antonio$;
+	sleep 2000;
+	npctalk "Captured Santa: Tha.. That dude has no ethics!", .@santa$;
+	sleep 4000;
+	npctalk "Captured Santa: Hey, would you go kick that Antonio out? He might run away if you hit several times.", .@santa$;
+	sleep 5000;
+	npctalk "Captured Santa: Its not right to steal from the community!", .@santa$;
+
+	disablenpc instance_npcname("#bgm04");
+	enablenpc instance_npcname("#fac4wp");
+	enablenpc instance_npcname("#fac4wp2");
+	donpcevent instance_npcname("#fac3ct") + "::OnStart";
+	donpcevent instance_npcname("#fac3ct2") + "::OnStart";
+	donpcevent instance_npcname("#fac3ct3") + "::OnStart";
+	sleep 3000;
+	enablenpc instance_npcname("#bgm05");
+	end;
+}
+
+1@xm_d,131,208,0	script	#bgm04	-1,9,9,{
+OnTouch:
+	playBGM "54";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,131,208,0	script	#bgm05	-1,9,9,{
+OnTouch:
+	playBGM "105";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,107,208,0	script	#fac4wp	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,87,208;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,95,208,0	script	#fac4wp2	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,115,208;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#fac3ct	CLEAR_NPC,{
+	end;
+OnEnd:
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	end;
+OnStart:
+	.@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	areamonster 'xm_d_map$,13,144,121,248, "Dancing Marionette",2994,37, .@event$;	// XM_MARIONETTE
+	areamonster 'xm_d_map$,13,144,121,248, "Decorated Evil Tree",2987,31, .@event$;	// XM_TREE
+	areamonster 'xm_d_map$,13,144,121,248, "Abandoned Teddy bear",2995,43, .@event$;// XM_TEDDY_BEAR
+	areamonster 'xm_d_map$,13,144,121,248, "Creepy Demon",2992,31, .@event$;		// XM_LUDE
+	end;
+OnMyMobDead:
+	end;
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#fac3ct2	CLEAR_NPC,{
+	end;
+OnEnd:
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	end;
+OnStart:
+	.@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	areamonster 'xm_d_map$,159,215,241,247, "Malicious Baby Ghost",2993,13, .@event$;	// XM_HYLOZOIST
+	areamonster 'xm_d_map$,159,215,241,247, "Decorated Evil Tree",2987,11, .@event$;	// XM_TREE
+	areamonster 'xm_d_map$,159,215,241,247, "Abandoned Teddy bear",2995,15, .@event$;	// XM_TEDDY_BEAR
+	areamonster 'xm_d_map$,159,215,241,247, "Creepy Demon",2992,11, .@event$;			// XM_LUDE
+	end;
+OnMyMobDead:
+	end;
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#fac3ct3	CLEAR_NPC,{
+	end;
+OnStart:
+	if (rand(1,10) > 3)
+		areamonster 'xm_d_map$,13,144,121,248 ,"Antonio",2988,1, instance_npcname("#fac3ct3")+"::OnMyMobDead";// ANTONIO
+	else
+		areamonster 'xm_d_map$,159,215,241,247, "Antonio",2988,1, instance_npcname("#fac3ct3")+"::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	if (mobcount( 'xm_d_map$, instance_npcname("#fac3ct3") + "::OnMyMobDead" ) < 1)
+		initnpctimer;
+	end;
+
+OnTimer1000:
+OnEnd:
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	donpcevent instance_npcname("#fac3ct") + "::OnEnd";
+	donpcevent instance_npcname("#fac3ct2") + "::OnEnd";
+	donpcevent instance_npcname("#finalbs") + "::OnStart";
+	disablenpc instance_npcname("Captured Santa#3");
+	mapannounce 'xm_d_map$, "???: I won't harm you if you leave quietly without spoiling it for me.", bc_map, "0xff8800";
+	stopnpctimer;
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#finalbs	CLEAR_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("Catherine Jet Johnson#5");
+	enablenpc instance_npcname("Celine Kimi#0");
+	enablenpc instance_npcname("#fac5wp");
+	// enablenpc instance_npcname("#fac5wp2");// never enabled
+	enablenpc instance_npcname("#jeton1");
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,152,208,0	script	#fac5wp	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,167,208;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+/*
+// never enabled
+1@xm_d,160,208,0	script	#fac5wp2	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,145,208;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+*/
+
+1@xm_d,233,183,3	script	Celine Kimi#0	4_F_KIMI,{
+	mes "[Celine Kimi]";
+	mes "Did you come here as well? Why all the humans are anxious to destroy what we built?";
+	close;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,222,183,0	script	#jeton1	-1,7,7,{
+OnTouch_:
+	disablenpc instance_npcname("#jeton1");
+	donpcevent instance_npcname("Catherine Jet Johnson#5") + "::OnStart";
+	enablenpc instance_npcname("#bgm02");
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,222,183,0	script	#bgm02	-1,9,9,{
+OnTouch:
+	playBGM "101";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,222,183,6	script	Catherine Jet Johnson#5	4_F_SKULL06GIRL,{
+	mes "[Catherine Jet Johnson]";
+	mes "Wa.. Watch out! Kimi isn't under the normal status.";
+	close;
+
+OnStart:
+	.@kimi$ = instance_npcname("Celine Kimi#0");
+	sleep 2000;
+	npctalk "Catherine Jet Johnson: Kimi! Listen to me. I didn't come to blame you here.";
+	sleep 3000;
+	npctalk "Celine Kimi: Everyone hates me!... You don't like me as well? This ugly and creepy doll likes me...", .@kimi$;
+	sleep 4000;
+	npctalk "Catherine Jet Johnson: Kimi, I heard about you from dolls here. The doll maker adored you so much!";
+	sleep 4000;
+	mapannounce 'xm_d_map$, "Phantom's yell: Lie!", bc_map, "0xff8800";
+	sleep 1000;
+	npctalk "Celine Kimi: Don't lie. If that's true, why didn't he see me with love in his eyes?", .@kimi$;
+	sleep 4000;
+	npctalk "Celine Kimi: Why didn't call my name? [Kimi] [Kimi!] I was anxious to hear the Grandpa's voice.", .@kimi$;
+	sleep 4000;
+	mapannounce 'xm_d_map$, "Phantom's yell: Yes, Kimi~ Father was frightened! He was scared of you~", bc_map, "0xff8800";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: No, don't listen to it, Kimi! He really cherished you.";
+	sleep 3000;
+	npctalk "Celine Kimi: Did he... cherish me?", .@kimi$;
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: Yes, when you start to move, he was so plea...";
+	sleep 1000;
+	mapannounce 'xm_d_map$, "Phantom's yell: He was scared of your appearance and his heart stopped, Kimi~ You killed him!", bc_map, "0xff8800";
+	sleep 3000;
+	npctalk "Celine Kimi: D.. Did I.. kill him?...", .@kimi$;
+	sleep 2000;
+	npctalk "Catherine Jet Johnson: No, Kimi! I've realized that. I misunderstood you. Just he had a disease!";
+	sleep 3000;
+	npctalk "Celine Kimi: D.. Di.. Did I... kill... him?", .@kimi$;
+	sleep 2000;
+	mapannounce 'xm_d_map$, "Phantom's yell: See how you look, Kimi~ See the mirror~ How do yo feel? ", bc_map, "0xff8800";
+	sleep 3000;
+	npctalk "Celine Kimi: I... I...", .@kimi$;
+	sleep 1000;
+	mapannounce 'xm_d_map$, "Phantom's yell: Don't you agree you are frightening? No one loves you, Kimi~", bc_map, "0xff8800";
+	sleep 3000;
+	npctalk "Celine Kimi: Because of me, granpa was dead...", .@kimi$;
+	specialeffect EF_MAPPILLAR2, AREA, .@kimi$;
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: It became serious. Kimi is suffering. It would be dangerous under this condition!";
+	specialeffect EF_MAPPILLAR2, AREA, .@kimi$;
+	sleep 1000;
+	mapannounce 'xm_d_map$, "Phantom's yell: Rage~ Sorrow~ No one cries for you, Kimi~", bc_map, "0xff8800";
+	sleep 3000;
+	npctalk "Catherine Jet Johnson: I will find the emergency exit to escape. Run away, adventurer!";
+	sleep 3000;
+	disablenpc instance_npcname("Catherine Jet Johnson#5");
+	sleep 2000;
+	disablenpc .@kimi$;
+	donpcevent instance_npcname("#finalbs2") + "::OnStart";
+	disablenpc instance_npcname("#bgm02");
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#finalbs2	CLEAR_NPC,{
+	end;
+OnStart:
+	stopnpctimer;
+	enablenpc instance_npcname("#bgm03");
+	.@event$ = instance_npcname("#finalbs2") + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	monster 'xm_d_map$,231,184, "Celine Kimi",2996,1, .@event$;// XM_CELINE_KIMI
+	'celene_id = $@mobid[0];
+	monster 'xm_d_map$,226,190, "Kimi's Phantom",2997,1, .@event$;// G_XM_CELINE_KIMI
+	'phantom_id = $@mobid[0];
+	setunitdata 'celene_id, UMOB_HP,20000000;
+	setunitdata 'phantom_id,UMOB_HP,20000000;
+
+	unittalk 'celene_id, "I don't want to be deserted. I don't want to be abandoned.";
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( 'xm_d_map$, instance_npcname("#finalbs2") + "::OnMyMobDead" ) < 1)
+		donpcevent instance_npcname("#finalbs2") + "::OnEnd";
+	end;
+
+OnEnd:
+	stopnpctimer;
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	disablenpc instance_npcname("#bgm03");
+	donpcevent instance_npcname("#finalbs_e") + "::OnStart";
+	end;
+
+OnTalk:
+	.@chat_r = rand(1,10);
+	if (.@chat_r == 1)
+		unittalk 'celene_id, "I will burn you with hell inferno.";
+	else if (.@chat_r == 2)
+		unittalk 'celene_id, "Will you bear this flame?!";
+	else if (.@chat_r == 3)
+		unittalk 'celene_id, "I shouldn't have done, but...";
+	else if (.@chat_r == 4)
+		unittalk 'celene_id, "It's boiling!... Bear it if you can.";
+	else if (.@chat_r == 5)
+		unittalk 'celene_id, "Breathe as much as you can. It'll be the last breath you make.";
+	else if (.@chat_r == 6)
+		unittalk 'celene_id, "Frankly, I don't like fire.";
+	else
+		unittalk 'celene_id, "Everyone is afraid of me! What have I done so wrong?!";
+	end;
+
+OnTimer1000:
+	getunitdata 'celene_id, .@data;
+	if ((.@data[UMOB_X] < 211 || .@data[UMOB_X] > 241 || .@data[UMOB_Y] < 166 || .@data[UMOB_Y] > 201) && (.@data[UMOB_X] > 0 || .@data[UMOB_Y] > 0)) {
+		mapannounce 'xm_d_map$, "Celine Kimi: No! I should keep my place!",bc_map,"0xff6666",FW_NORMAL,15;
+		donpcevent instance_npcname("#finalbs2") + "::Onfail";
+	}
+	end;
+
+Onfail:
+	stopnpctimer;
+	killmonster 'xm_d_map$, instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	enablenpc instance_npcname("Celine Kimi#2");
+	disablenpc instance_npcname("#bgm03");
+	enablenpc instance_npcname("#kimion1");
+	end;
+
+OnTimer5000:
+	donpcevent instance_npcname("#bssk01") + "::OnStart";
+	end;
+
+OnTimer10000:
+	if (mobcount( 'xm_d_map$, instance_npcname("#finalbs2") + "::OnMyMobDead" ) > 1) {
+		.@npc_name$ = instance_npcname("#finalbs2");
+		getunitdata 'celene_id, .@MOB_HP1;
+		getunitdata 'phantom_id, .@MOB_HP2;
+		if (.@MOB_HP1[UMOB_HP] > .@MOB_HP2[UMOB_HP]) {
+			setarray .@mob_hp[0], .@MOB_HP1[UMOB_HP], .@MOB_HP2[UMOB_HP];
+			setarray .@string$[0],
+				"You and I are the one! I will recover you!",
+				"Celine Kimi recovers herself and her phantom ";
+			.@talk = 'celene_id;
+		}
+		else if (.@MOB_HP2[UMOB_HP] > .@MOB_HP1[UMOB_HP]) {
+			setarray .@mob_hp[0], .@MOB_HP2[UMOB_HP], .@MOB_HP1[UMOB_HP];
+			setarray .@string$[0],
+				"I will restore you!!",
+				"Celine Kimi's phantom recovers herself and her master ";
+			.@talk = 'phantom_id;
+		}
+		.@diff_hp = .@mob_hp[0] - .@mob_hp[1];
+		if (.@diff_hp > 100000) {
+			.@set_bs_hp = (.@diff_hp * 5) / 10;
+			.@MOB_HP3 = .@mob_hp[0] + .@set_bs_hp;
+			if (.@MOB_HP3 > 66666666)
+				.@MOB_HP3 = 66666666;
+			setunitdata 'celene_id, UMOB_HP, .@MOB_HP3;
+			setunitdata 'phantom_id, UMOB_HP, .@MOB_HP3;
+			donpcevent instance_npcname("#eff_f01") + "::OnStart";
+			unittalk .@talk, .@string$[0];
+			sleep 1000;
+			mapannounce 'xm_d_map$,  .@string$[1] + .@set_bs_hp +" HP has been recovered.", bc_map, "0xff6666";
+			donpcevent instance_npcname("#heal_c") + "::OnStart";
+		}
+		initnpctimer;
+	}
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,216,193,3	script	#eff_f01	CLEAR_NPC,{
+	end;
+OnStart:
+	for ( .@i = 1; .@i < 10; .@i++ )
+		specialeffect EF_HEARTCASTING, AREA, instance_npcname( "#eff_f0"+ .@i );
+	end;
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,226,193,3	script	#eff_f02	CLEAR_NPC,{
+	end;
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+1@xm_d,236,193,3	duplicate(#eff_f02)	#eff_f03	CLEAR_NPC
+1@xm_d,216,183,3	duplicate(#eff_f02)	#eff_f04	CLEAR_NPC
+1@xm_d,226,183,3	duplicate(#eff_f02)	#eff_f05	CLEAR_NPC
+1@xm_d,236,183,3	duplicate(#eff_f02)	#eff_f06	CLEAR_NPC
+1@xm_d,216,173,3	duplicate(#eff_f02)	#eff_f07	CLEAR_NPC
+1@xm_d,226,173,3	duplicate(#eff_f02)	#eff_f08	CLEAR_NPC
+1@xm_d,236,173,3	duplicate(#eff_f02)	#eff_f09	CLEAR_NPC
+
+1@xm_d,1,5,3	script	#bssk01	CLEAR_NPC,{
+	end;
+OnStart:
+	.@r = rand(1,3);
+	if (.@r == 1)
+		donpcevent instance_npcname("#bssk02") + "::OnStart";
+	else if (.@r == 2)
+		donpcevent instance_npcname("#bssk03") + "::OnStart";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#bssk02	CLEAR_NPC,{
+	end;
+OnStart:
+	donpcevent instance_npcname("#finalbs2") + "::OnTalk";
+	for ( .@i = 1; .@i < 5; .@i++ )
+		donpcevent instance_npcname( "#crssk"+ .@i ) + "::OnStart";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#bssk03	CLEAR_NPC,{
+	end;
+OnStart:
+	.@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	while (1) {
+		getunitdata 'celene_id, .@data;
+		.@x = .@data[UMOB_X] + rand(1,20) - 10;
+		.@y = .@data[UMOB_Y] + rand(1,20) - 10;
+		monster 'xm_d_map$,.@x,.@y, "#f_w_1",3038,1, .@event$;// HIDDEN_MOB7
+		.@mon_num++;
+		if (.@mon_num > 20)
+			break;
+		sleep2 200;
+	}
+	sleep 6000;
+	killmonster 'xm_d_map$, .@event$;
+	end;
+
+OnMyMobDead:
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#crssk1	CLEAR_NPC,{
+	end;
+OnStart:
+	.@event$ = instance_npcname( strnpcinfo(0) ) + "::OnMyMobDead";
+	killmonster 'xm_d_map$, .@event$;
+	getunitdata 'celene_id, .@data;
+	setarray .@coord[0], .@data[UMOB_X], .@data[UMOB_Y];
+	.@num = atoi(strnpcinfo(2));
+	.@index = ( .@num > 2 ? 1 : 0 );// x or y
+	.@signe = pow(-1,.@num+1);
+	while(1) {
+		.@coord[.@index] = .@coord[.@index] + (2 * .@signe);
+		.@coord[!.@index] = .@coord[!.@index] + rand(0,2) - 1;
+		monster 'xm_d_map$,.@coord[0], .@coord[1], "#f_w_1",3038,1, .@event$;
+		if (.@coord[0] < 211 || .@coord[0] > 241 || .@coord[1] < 166 || .@coord[1] > 201)
+			break;
+		sleep 200;
+	}
+	sleep 6000;
+	killmonster 'xm_d_map$, .@event$;
+	end;
+OnMyMobDead:
+	end;
+
+OnInstanceInit:
+	hideonnpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+1@xm_d,1,5,3	duplicate(#crssk1)	#crssk2	CLEAR_NPC
+1@xm_d,1,5,3	duplicate(#crssk1)	#crssk3	CLEAR_NPC
+1@xm_d,1,5,3	duplicate(#crssk1)	#crssk4	CLEAR_NPC
+
+1@xm_d,233,183,0	script	#kimion1	-1,7,7,{
+OnTouch_:
+	disablenpc instance_npcname("#kimion1");
+	donpcevent instance_npcname("Celine Kimi#2") + "::OnStart";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,233,183,3	script	Celine Kimi#2	4_F_KIMI,{
+	mes "[Celine Kimi]";
+	mes "You also... come here to kill me?";
+	close;
+
+OnStart:
+	npctalk "Celine Kimi: You also... come here to kill me?";
+	specialeffect EF_MAPPILLAR2;
+	sleep 5000;
+	disablenpc instance_npcname("Celine Kimi#2");
+	donpcevent instance_npcname("#finalbs2") + "::OnStart";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,228,183,0	script	#bgm03	-1,25,25,{
+OnTouch:
+	playBGM "123";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#heal_c	CLEAR_NPC,{
+	end;
+OnStart:
+	if (rand(1,10) > 4)
+		initnpctimer;
+	end;
+OnTimer3000:
+	mapannounce 'xm_d_map$, "Celine Kimi and her phantom are shared their strength. They will be stronger than ever!",bc_map,"0xff6666";
+	stopnpctimer;
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,1,5,3	script	#finalbs_e	CLEAR_NPC,{
+	end;
+OnStart:
+	mapannounce 'xm_d_map$, "Celine Kimi: It is no use to defeat me! My body will be restored.",bc_map,"0xff6666",FW_NORMAL,15;
+	enablenpc instance_npcname("#fac6wp");
+	enablenpc instance_npcname("#jeton2");
+	enablenpc instance_npcname("Catherine Jet Johnson#6");
+	for ( .@i = 1; .@i <= 10; .@i++ )
+		enablenpc instance_npcname("Packaged Present#"+ .@i);
+	sleep 6000;
+	mapannounce 'xm_d_map$, "Catherine Jet Johnson's yell: Are you okay? Flee to the south emergency exit!",bc_map,"0xffff00";
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,205,159,0	script	#fac6wp	WARPNPC,2,2,{
+OnTouch:
+	warp 'xm_d_map$,205,147;
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,218,145,0	script	#jeton2	-1,4,4,{
+OnTouch_:
+	disablenpc instance_npcname("#jeton2");
+	donpcevent instance_npcname("Catherine Jet Johnson#6") + "::OnStart";
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,218,145,5	script	Catherine Jet Johnson#6	4_F_SKULL06GIRL,{
+	end;
+OnStart:
+	sleep 1000;
+	npctalk "Catherine Jet Johnson: Unfortunately, I am failed to persuade Kimi.";
+	sleep2 3000;
+	npctalk "Catherine Jet Johnson: What was the voice of phantom? Why it torments Kimi so harshly...";
+	sleep2 4000;
+	npctalk "Catherine Jet Johnson: I guess that the curse of my face was form the unidentified voice.";
+	sleep2 4000;
+	npctalk "Catherine Jet Johnson: Anyway, even Kimi, saying hates everyone, has collected her recollections here a lot.";
+	sleep2 6000;
+	npctalk "Catherine Jet Johnson: I will put this thing safely even if her soul will return and she won't be disappointed.";
+	sleep2 5000;
+	npctalk "Catherine Jet Johnson: Thanks to you, everything that I have wondered is completely resolved. Please call me again if you are going to send her to Heaven next time.";
+	sleep2 5000;
+	npctalk "Catherine Jet Johnson: I will open the exit way out. I will go outside first, so just follow me.";
+	sleep2 3000;
+	disablenpc instance_npcname("Catherine Jet Johnson#6");
+	enablenpc instance_npcname("#exwp1");
+	end;
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,218,150,5	script	#exwp1	PORTAL,{
+	mes "Will you exit?";
+	next;
+	if (select( "Take a look around", "Go outside" ) == 1) {
+		mes "Stop the machine.";
+		close;
+	}
+	close2;
+	warp "xmas",233,300;
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+
+1@xm_d,210,141,3	script	Packaged Present#1	4_TREASURE_BOX,{
+	specialeffect EF_COIN;
+	disablenpc instance_npcname( strnpcinfo(0) );
+	initnpctimer;
+	end;
+
+OnTimer1000:
+	switch( atoi(strnpcinfo(2)) ) {
+	case 1:
+		.@num = rand(4,8);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(208,212), rand(139,143);// Bloody_Coin
+		if (rand(1,1000) > 150)
+			makeitem 644,1, 'xm_d_map$,209,141;// Gift_Box;
+		if (rand(1,1000) > 600)
+			makeitem 617,1, 'xm_d_map$,210,141;// Old_Violet_Box;
+		if (rand(1,1000) > 900)
+			makeitem 22534,1, 'xm_d_map$,211,141;// Closedmind_Box
+		break;
+	case 2:
+		.@num = rand(3,7);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(212,216), rand(139,143);// Bloody_Coin
+		if (rand(1,1000) > 400)
+			makeitem 603,1, 'xm_d_map$,213,141;// Old_Blue_Box
+		if (rand(1,1000) > 700)
+			makeitem 616,1, 'xm_d_map$,214,141;// Old_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 13442,1, 'xm_d_map$,215,141;// Old_Parasol
+		break;
+	case 3:
+		.@num = rand(2,6);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(216,220), rand(139,143);// Bloody_Coin
+		if (rand(1,1000) > 850)
+			makeitem 7229,1, 'xm_d_map$,217,141;// Silver_Bullion
+		if (rand(1,1000) > 800)
+			makeitem 12246,1, 'xm_d_map$,218,141;// Magic_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 2486,1, 'xm_d_map$,219,141;// Shadow_Walk_
+		break;
+	case 4:
+		.@num = rand(4,8);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(220,224), rand(139,143);// Bloody_Coin
+		if (rand(1,1000) > 700)
+			makeitem 7228,1, 'xm_d_map$,221,141;// Gold_Bullion
+		if (rand(1,1000) > 600)
+			makeitem 617,1, 'xm_d_map$,222,141;// Old_Violet_Box
+		if (rand(1,1000) > 900)
+			makeitem 22534,1, 'xm_d_map$,223,141;// Closedmind_Box
+		break;
+	case 5:
+		.@num = rand(3,7);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(224,228), rand(139,143);// Bloody_Coin
+		if (rand(1,1000) > 150)
+			makeitem 644,1, 'xm_d_map$,225,141;// Gift_Box
+		if (rand(1,1000) > 700)
+			makeitem 616,1, 'xm_d_map$,226,141;// Old_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 2976,1, 'xm_d_map$,227,141;// Red_Lantern
+		break;
+	case 6:
+		.@num = rand(2,6);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 2976,1, 'xm_d_map$, rand(208,212), rand(134,138);// Red_Lantern
+		if (rand(1,1000) > 400)
+			makeitem 603,1, 'xm_d_map$,209,136;// Old_Blue_Box
+		if (rand(1,1000) > 800)
+			makeitem 12246,1, 'xm_d_map$,210,136;// Magic_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 2977,1, 'xm_d_map$,211,136;// Hurt_Mind
+		break;
+	case 7:
+		.@num = rand(4,8);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(212,216), rand(134,138);// Bloody_Coin
+		if (rand(1,1000) > 850)
+			makeitem 7229,1, 'xm_d_map$,213,136;// Silver_Bullion
+		if (rand(1,1000) > 600)
+			makeitem 617,1, 'xm_d_map$,214,136;// Old_Violet_Box
+		if (rand(1,1000) > 900)
+			makeitem 22534,1, 'xm_d_map$,215,136;// Closedmind_Box
+		break;
+	case 8:
+		.@num = rand(3,7);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(216,220), rand(134,138);// Bloody_Coin
+		if (rand(1,1000) > 700)
+			makeitem 7228,1, 'xm_d_map$,217,136;// Gold_Bullion
+		if (rand(1,1000) > 700)
+			makeitem 616,1, 'xm_d_map$,218,136;// Old_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 2978,1, 'xm_d_map$,219,136;// KindHeart
+		break;
+	case 9:
+		.@num = rand(2,6);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(220,224), rand(134,138);// Bloody_Coin
+		if (rand(1,1000) > 150)
+			makeitem 644,1, 'xm_d_map$,221,136;// Gift_Box
+		if (rand(1,1000) > 800)
+			makeitem 12246,1, 'xm_d_map$,222,136;// Magic_Card_Album
+		if (rand(1,1000) > 950)
+			makeitem 18848,1, 'xm_d_map$,223,136;// Lush_Rose
+		break;
+	case 10:
+		.@num = rand(4,8);
+		for ( .@i = 0; .@i < .@num; .@i++ )
+			makeitem 7642,1, 'xm_d_map$, rand(224,228), rand(134,138);// Bloody_Coin
+		if (rand(1,1000) > 400)
+			makeitem 603,1, 'xm_d_map$,225,136;// Old_Blue_Box
+		if (rand(1,1000) > 600)
+			makeitem 617,1, 'xm_d_map$,226,136;// Old_Violet_Box
+		if (rand(1,1000) > 900)
+			makeitem 22534,1, 'xm_d_map$,227,136;// Closedmind_Box
+		break;
+	}
+	stopnpctimer;
+	end;
+
+OnInstanceInit:
+	disablenpc instance_npcname( strnpcinfo(0) );
+	end;
+}
+1@xm_d,214,141,3	duplicate(Packaged Present#1)	Packaged Present#2	4_TREASURE_BOX
+1@xm_d,218,141,3	duplicate(Packaged Present#1)	Packaged Present#3	4_TREASURE_BOX
+1@xm_d,222,141,3	duplicate(Packaged Present#1)	Packaged Present#4	4_TREASURE_BOX
+1@xm_d,226,141,3	duplicate(Packaged Present#1)	Packaged Present#5	4_TREASURE_BOX
+1@xm_d,210,136,3	duplicate(Packaged Present#1)	Packaged Present#6	4_TREASURE_BOX
+1@xm_d,214,136,3	duplicate(Packaged Present#1)	Packaged Present#7	4_TREASURE_BOX
+1@xm_d,218,136,3	duplicate(Packaged Present#1)	Packaged Present#8	4_TREASURE_BOX
+1@xm_d,222,136,3	duplicate(Packaged Present#1)	Packaged Present#9	4_TREASURE_BOX
+1@xm_d,226,136,3	duplicate(Packaged Present#1)	Packaged Present#10	4_TREASURE_BOX
+
+// Instance GM Functions :: mx_xm_ad
+//==========================================
+1@xm_d,1,1,3	script	#adsw	CLEAR_NPC,{
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
+		mes "[Time Manager]";
+		mes "What time would you like to return?";
+		next;
+		switch (select("Cancel:Factory No.1 Complete:Factory No.2 Complete:Factory No.3 Complete:Boss Start:Boss Complete")) {
+		case 1:
+			break;
+		case 2:
+			transform 1246,180000;
+			enablenpc instance_npcname("#fac1bs");
+			mapannounce 'xm_d_map$, "Coordinator's announcement: Huh? Where's everyone! How dare you workers to be absent their line and muck around!",bc_map,"0xff8800";
+			warp 'xm_d_map$,70,125;
+			break;
+		case 3:
+			for ( .@i = 1; .@i <= 10; ++.@i )
+				disablenpc instance_npcname( "Worker#" + .@i );
+			donpcevent instance_npcname("#fac2wpc") + "::OnStart";
+			warp 'xm_d_map$,131,210;
+			break;
+		case 4:
+			donpcevent instance_npcname("#fac3ct3") + "::OnEnd";
+			warp 'xm_d_map$,131,210;
+			break;
+		case 5:
+			donpcevent instance_npcname("#finalbs2") + "::OnStart";
+			warp 'xm_d_map$,215,182;
+			break;
+		case 6:
+			donpcevent instance_npcname("#finalbs2") + "::OnEnd";
+			warp 'xm_d_map$,215,182;
+			break;
+		}
+	}
+	close;
+}
+
+1@xm_d,3,1,3	script	#adsw2	CLEAR_NPC,{
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
+		getunitdata 'Antonio, .@mob;
+		mapannounce 'xm_d_map$, "Factory announcement: Exist in " + .@mob[UMOB_X] + " - " + .@mob[UMOB_Y] + ".",bc_map,"0x00ff44";
+	}
+	end;
+}

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

@@ -87,6 +87,7 @@ ecl_in04	mapflag	nobranch
 1@ecl	mapflag	nobranch
 ecl_hub01	mapflag	nobranch
 que_avan01	mapflag	nobranch
+1@xm_d	mapflag	nobranch
 
 // Izlude duplicates ===========
 izlude_a	mapflag	nobranch

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

@@ -32,6 +32,9 @@
 // Inside Eclage ===========
 1@ecl	mapflag	noicewall
 
+// Horror Toy Factory
+1@xm_d	mapflag	noicewall
+
 // Heroes' Trail Part 1 =======
 1@sara	mapflag	noicewall
 1@face	mapflag	noicewall

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

@@ -110,6 +110,9 @@ gl_cas02_	mapflag	nomemo
 1@nyd	mapflag	nomemo
 2@nyd	mapflag	nomemo
 
+// Horror Toy Factory
+1@xm_d	mapflag	nomemo
+
 // Glast Heim Memorial Dungeon ===
 1@gl_k	mapflag	nomemo
 2@gl_k	mapflag	nomemo

+ 1 - 0
npc/re/mapflag/nopvp.txt

@@ -32,6 +32,7 @@
 1@face	mapflag	pvp	off
 1@sara	mapflag	pvp	off
 1@gef_in	mapflag	pvp	off
+1@xm_d	mapflag	pvp	off
 
 // Cities ========================
 moc_para01	mapflag	pvp	off

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

@@ -91,6 +91,9 @@ ma_zif09	mapflag	nosave	SavePoint
 que_avan01	mapflag	nosave	SavePoint
 1@ecl	mapflag	nosave	SavePoint
 
+// Horror Toy Factory
+1@xm_d	mapflag	nosave	SavePoint
+
 // Glast Heim Memorial Dungeon ====
 1@gl_k	mapflag	nosave	SavePoint
 2@gl_k	mapflag	nosave	SavePoint

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

@@ -65,6 +65,8 @@ ecl_in04	mapflag	noteleport
 1@ecl	mapflag	noteleport
 1@ecl	mapflag	monster_noteleport
 ecl_hub01	mapflag	noteleport
+1@xm_d	mapflag	monster_noteleport
+1@xm_d	mapflag	noteleport
 
 // Glast Heim Memorial Dungeon ===
 1@gl_k	mapflag	noteleport

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

@@ -31,6 +31,7 @@ que_lhz	mapflag	nowarpto
 
 // 14.2 Eclage ===================
 1@ecl	mapflag	nowarpto
+1@xm_d	mapflag	nowarpto
 
 // Pyramids Basement Nightmare Mode
 moc_prydn1	mapflag	nowarpto

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

@@ -52,3 +52,6 @@
 1@face	mapflag	partylock
 1@sara	mapflag	partylock
 1@gef_in	mapflag	partylock
+
+// Horror Toy Factory
+1@xm_d	mapflag	partylock

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

@@ -19,6 +19,7 @@
 1@ma_c	mapflag	restricted	6
 1@ma_b	mapflag	restricted	6
 1@ecl	mapflag	restricted	6
+1@xm_d	mapflag	restricted	6
 
 // Towns =========================
 brasilis	mapflag	restricted	7

+ 475 - 0
npc/re/merchants/HorrorToyFactory_merchants.txt

@@ -0,0 +1,475 @@
+//===== rAthena Script =======================================
+//= Horror Toy Factory merchants
+//===== Description: =========================================
+//= [Official Conversion]
+//= Horror Toy Factory enchants / exchange in xmas
+//===== Changelogs: ==========================================
+//= 1.0 First version. Uses official script structure and text
+//=     from iRO. [Capuche]
+//============================================================
+
+xmas,240,291,3	script	Billy The Golden Hands#1	4_F_05,{
+	disable_items;
+	if (checkweight(1201,1) == 0) {
+		mes "The kind of items you have is too various. Retry after reducing the sort of items.";
+		close;
+	}
+	if ((MaxWeight - Weight) < 10000) {
+		mes "You are overburdened, so you cannot proceed it anymore. Please try again after reduce the weight.";
+		close;
+	}
+	mes "[Billy The Golden Hands]";
+	mes "Huhu. Did you bring some coins? I would sell anything but my soul if you have coins.";
+	next;
+
+	setarray .@xm_item[0],
+		22534, 100,		// Closedmind_Box
+		18848, 500,		// Lush_Rose
+		19687, 1000,	// C_Lush_Rose
+		19686, 500,		// C_SantaHairband
+		19701, 500,		// C_Red_Bonnet
+		13442, 1000,	// Old_Parasol
+		11563, 7,		// Hot_Tee
+		11564, 5,		// Sweet_Canape
+		523,   1,		// Holy_Water
+		12020, 1;		// Water_Of_Darkness
+
+	.@s = ( select( "Cancel", "Closed Mind Box (100 Coins)", "Lush Rose (500 Coins)", "C Lush Rose (1000 Coins)", "C Santa Hairband (500 Coins)", "C Red Bonnet (500 Coins)", "Old Parasol (1000 Coins)", "Hot Tea (7 Coins)", "Sweet Canape (5 Coins)", "Holy Water (1 Coin)", "Water Of Darkness (1 Coin)" ) -2 ) * 2;
+	if (.@s == -2) {
+		mes "[Billy The Golden Hands]";
+		mes "Khaha, do you feel any scruples or something? Alright, then. Come again at anytime when you change your mind.";
+		close;
+	}
+	if (countitem(7642) >= .@xm_item[.@s+1]) {
+		mes "[Billy The Golden Hands]";
+		mes "You need ^0000ff" + .@xm_item[.@s+1] + "^000000 Bloody Coins to buy ^0000ff" + getitemname(.@xm_item[.@s]) + "^000000. Are you going to buy it?";
+		next;
+		if (select( "Cancel", "Purchase" ) == 1) {
+			mes "[Billy The Golden Hands]";
+			mes "Khaha, what a fickle friend you are. If you really decide to buy it, come again.";
+			close;
+		}
+		if (countitem(7642) >= .@xm_item[.@s+1]) {
+			delitem 7642,.@xm_item[.@s+1];// Bloody_Coin
+			getitem .@xm_item[.@s], 1;
+			mes "[Billy The Golden Hands]";
+			mes "You have paid for it. I look forward to seeing you again.!";
+			close;
+		}
+	}
+	mes "[Billy The Golden Hands]";
+	mes "You need ^0000ff" + .@xm_item[.@s+1] + "^000000 Bloody Coins to buy ^0000ff" + getitemname(.@xm_item[.@s]) + "^000000. You are short of them.";
+	close;
+}
+
+
+xmas,240,297,3	script	Vagrant Cain#1	4_M_06,{
+	disable_items;
+	if (checkweight(1201,1) == 0) {
+		mes "The kind of items you have is too various. Retry after reducing the sort of items.";
+		close;
+	}
+	if ((MaxWeight - Weight) < 10000) {
+		mes "You are overburdened, so you cannot proceed it anymore. Please try again after reduce the weight.";
+		close;
+	}
+	mes "[Vagrant Cain]";
+	mes "Oh, I'm sure that you came here because you don't like ordinaries. Just talk to me. I will make anything if you have prepared the reasonable charge and the proper materials.";
+	next;
+	.@s = select( "Nothing that I want.", "I want Celine's Ribbon.", "I'm seeking Noble Cross.", "I'd like to get Evilspirit Gloves." );
+	switch(.@s) {
+	case 1:
+		mes "[Vagrant Cain]";
+		mes "Yes, yes. Everyone says like you at first. See you later.";
+		close;
+	case 2:
+		.@string$[0] = "Ho~ You are looking for a very unique headgear, my friend. You have great discernment.";
+		.@string$[1] = "I need ^0000ff1000 ^000000Bloody Coins and ^0000ff+9 or greater Lush Rose^000000 for ^0000ffCeline's Ribbon^000000. Do you have enough materials?";
+		.@string$[2] = "You should prepare ^0000ff1000 ^000000Bloody Coins and one ^0000ff +9 or greater Lush Rose^000000 for ^0000ffCeline's Ribbon^000000. Don't forget!";
+		.@string$[3] = "Are you really going to trade them? ^ff0000The refine levels, effects, and card of the item will disappear and you cannot get a refund^000000. Please consider it!";
+		break;
+	case 3:
+		.@string$[0] = "Ho~ You are looking for a very precious weapon, my friend. You have great discernment.";
+		.@string$[1] = "I need ^0000ff2000 ^000000Bloody Coins and one ^0000ffGrand Cross (slot)^000000 for ^0000ffNoble Cross^000000. Do you have enough materials?";
+		.@string$[2] = "You should prepare ^0000ff 2000 ^000000Bloody Coins and one ^0000ff Grand Cross (slot)^000000 for ^0000ffNoble Cross^000000. Don't forget!";
+		.@string$[3] = "Are you really going to trade them? ^ff0000The refine levels, effects, and card of the item will disappear and you cannot get a refund^000000. Please consider it!";
+		break;
+	case 4:
+		.@string$[0] = "Ho~ You are looking for a very rare accessory, my friend. You have great discernment.";
+		.@string$[1] = "I need ^0000ff1000 ^000000Bloody Coins, one ^0000ffHurt Mind, Kind Heart, and Red Lantern ^000000each for ^0000ffEvilspirit Gloves^000000. Do you have enough materials?";
+		.@string$[2] = "You should prepare ^0000ff1000 ^000000Bloody Coins, one ^0000ffHurt Mind, Kind Heart, and Red Lantern ^000000each for ^0000ffEvilspirit Gloves^000000. Don't forget!";
+		.@string$[3] = "Are you really going to trade them? ^ff0000The effects, and card of the item will disappear and you cannot get a refund^000000. Besides, if you have the same sort of things, I don't know which one will be chosen. Think about that.";
+		break;
+	}
+	mes "[Vagrant Cain]";
+	mes .@string$[0];
+	next;
+	mes "[Vagrant Cain]";
+	mes .@string$[1];
+	next;
+	if (select( "I don't have them now", "I will trade it right away" ) == 1) {
+		mes "[Vagrant Cain]";
+		mes "Come back when you are ready. Let me remind you of the materials.";
+		next;
+		mes "[Vagrant Cain]";
+		mes .@string$[2];
+		close;
+	}
+	mes "[Vagrant Cain]";
+	mes .@string$[3];
+	next;
+	if (select( "I will try it next time", "Exchange them right away" ) == 1) {
+		mes "[Vagrant Cain]";
+		mes "Okay, you are determined. Hope we can see each other next time, huhu.";
+		close;
+	}
+	switch(.@s) {
+	case 2:
+		mes "[Vagrant Cain]";
+		if (getequipid(EQI_HEAD_TOP) != 18848)// Lush_Rose
+			mes "The hat you wear is not Lush Rose. Bring me the right material that I told you, kukuku.";
+		else if (getequiprefinerycnt(EQI_HEAD_TOP) < 9)
+			mes "The hat you wear is not refined to +9 or greater. You cannot trade with that.";
+		else if (countitem(7642) < 1000)
+			mes "Well, you are short of Bloody Coins. You need to gather exactly 1000 of them. Less than that.. It can't be helped.";
+		else {
+			delitem 7642,1000;// Bloody_Coin
+			delequip EQI_HEAD_TOP;
+			getitem 18849,1;// Celines_Ribbon
+			mes "The deal has completed. Take a look at it.";// custom
+		}
+		close;
+	case 3:
+		mes "[Vagrant Cain]";
+		if (getequipid(EQI_HAND_R) != 1540)// Grand_Cross_
+			mes "The thing on your right hand is not Grand Cross (slot). Bring me the right thing I told you, kuku.";
+		else if (countitem(7642) < 2000)
+			mes "Well, you are short of Bloody Coins. You need to gather exactly 2000 of them. Less than that.. It can't be helped.";
+		else {
+			delitem 7642,2000;// Bloody_Coin
+			delequip EQI_HAND_R;
+			getitem 16029,1;// Noble_Cross
+			mes "The deal has completed. Take a look at it.";// custom
+		}
+		close;
+	case 4:
+		mes "[Vagrant Cain]";
+		if (countitem(7642) > 999 && countitem(2977) > 0 && countitem(2978) > 0 && countitem(2976) > 0) {
+			delitem 7642,1000;// Bloody_Coin
+			delitem 2977,1;// Hurt_Mind
+			delitem 2978,1;// KindHeart
+			delitem 2976,1;// Red_Lantern
+			getitem 2980,1;// Evilspirit_Gloves
+			mes "The deal has completed. Take a look at it.";// custom
+		}
+		else {
+			mes "You don't have enough materials.";
+			next;
+			mes "[Vagrant Cain]";
+			mes "You should prepare ^0000ff1000 ^000000Bloody Coins, one ^0000ffHurt Mind, Kind Heart, and Red Lantern ^000000each for ^0000ffEvilspirit Gloves^000000.";
+		}
+		close;
+	}
+}
+
+xmas,240,294,3	script	Black Beard Joe#pa0829	4_M_05,{
+	disable_items;
+	if (checkweight(1201,1) == 0) {
+		mes "The kind of items you have is too various. Retry after reducing the sort of items.";
+		close;
+	}
+	if ((MaxWeight - Weight) < 10000) {
+		mes "You are overburdened, so you cannot proceed it anymore. Please try again after reduce the weight.";
+		close;
+	}
+	mes "[Black Beard Joe]";
+	mes "Huhu, humanbeing's greed is naturally wantless. What do you want me to do?";
+	next;
+	switch( select( "What can you do for me?", "Enchant accessory of Toy Factory", "Enchant weapon of Toy Factory", "Enchant headgear of Toy Factory", "Enchant footwear of Toy Factory" ) ) {
+	case 1:
+		mes "[Black Beard Joe]";
+		mes "What do I do? That's really simple. You just bring me Bloody Coins and I will get them and enchant your accessory.";
+		next;
+		mes "[Black Beard Joe]";
+		mes "I will take 15 Bloody Coins for each try. I will enchant one slot amount for every 15 Coins. Of course, 3 is the maximum.";
+		next;
+		mes "[Black Beard Joe]";
+		mes "Well, it is so natural that the destruction rate will get higher as the upgrade level increases. I would recommend you to stop first or second try, tee-hee.";
+		close;
+	case 2:
+		.@eq_num = EQI_ACC_R;
+		break;
+	case 3:
+		.@eq_num = EQI_HAND_R;
+		break;
+	case 4:
+		.@eq_num = EQI_HEAD_TOP;
+		break;
+	case 5:
+		.@eq_num = EQI_SHOES;
+		break;
+	}
+	.@item_id = getequipid(.@eq_num);
+	.@refine = getequiprefinerycnt(.@eq_num);
+	setarray .@card[0],
+		getequipcardid(.@eq_num,0),
+		getequipcardid(.@eq_num,1),
+		getequipcardid(.@eq_num,2),
+		getequipcardid(.@eq_num,3);
+
+	switch(.@item_id) {
+	case 2976:	// Red_Lantern
+	case 2977:	// Hurt_Mind
+	case 2978:	// KindHeart
+	case 2980:	// Evilspirit_Gloves
+		.@sc_type = 1;// acc
+		break;
+	case 2486:	// Shadow_Walk_
+	case 18848:	// Lush_Rose
+	case 18849:	// Celines_Ribbon
+		.@sc_type = 2;// armor
+		break;
+	case 13442:	// Old_Parasol
+		.@sc_type = 3;// weapon
+		break;
+	case 16029:	// Noble_Cross
+		mes "[Black Beard Joe]";// custom
+		mes "Oh, you are equipped with ^0000ffNoble Cross^000000! This thing need to find someone else to enchant it.";
+		next;
+		mes "[Black Beard Joe]";
+		mes "I've tried several times, but have no luck.";
+		next;
+		mes "[Black Beard Joe]";
+		mes "If you want to enchant this weapon, find ^0000ffMayomayo^000000 in Malangdo island! He should be able to do it.";
+		close;
+	default:
+		break;
+	}
+	switch(.@eq_num) {
+	case EQI_ACC_R:
+		mes "[Black Beard Joe]";
+		mes "You can choose one of 2 types and the fee for each try is 15 Bloody Coins.. I will get them right before enchanting it.";
+		next;
+		.@enchant_type = select( "Quit", "A random stat one among STR/AGI/DEX", "A random stat among INT/VIT/DEX" ) - 1;// enchant_type [1-2]
+		mes "[Black Beard Joe]";
+		if (.@enchant_type == 0) {
+			mes "Okay, come again when you are willing to, kuku.";
+			close;
+		}
+		if (.@sc_type < 1) {
+			mes "This equipment is not from Toy Factory. I can handle the items from Toy Factory only.";
+			close;
+		}
+		if (.@card[3] == 0) {
+			.@slot_num = 3;
+			mes "Okay, let's try the first enchantment. Usually, they are not broken. About 95% success rate?";
+			.@string$ = "You blow hot and cold, this fickle friend.!";
+		}
+		else if (.@card[2] == 0) {
+			.@slot_num = 2;
+			mes "Ho~ Second enchantment. Now it became dangerous. The success rate is about 70%. Do you want continue? The whole accessory will be blown if fail.";// custom
+			.@string$ = "You blow hot and cold, this fickle friend.!";
+		}
+		else if (.@card[1] == 0) {
+			.@slot_num = 1;
+			mes "This is the last enchantment. Will you keep going? At this time, ^ff0000the success rate is below 50%^000000. Of course, it would be great if it is successfull... Hmm, I will follow your descision, but keep that in mind.";// custom
+			.@string$ = "Wise! The third enchantment is too greedy.";// custom translation
+		}
+		else {
+			mes "Ho~ This has already reached the peak. It is impossible to higher enchant, so be content and use it well.";// custom
+			close;
+		}
+		break;
+	case EQI_HAND_R:
+		mes "[Black Beard Joe]";
+		if (.@sc_type < 1) {
+			mes "This equipment is not from Toy Factory. I can handle the items from Toy Factory only.";
+			close;
+		}
+		.@enchant_type = 3;
+		.@slot_num = 3;
+		mes "I enchant weapons only once. There's no failure, so you can just think of it as the bonus effect, tee-hee.";
+		.@string$ = "You blow hot and cold, this fickle friend.!";
+		break;
+	case EQI_HEAD_TOP:
+	case EQI_SHOES:
+		mes "[Black Beard Joe]";
+		if (.@sc_type < 1) {
+			mes "This equipment is not from Toy Factory. I can handle the items from Toy Factory only.";
+			close;
+		}
+		if (.@card[3] == 0) {
+			.@slot_num = 3;
+			.@enchant_type = 4;
+			mes "Good. Let's start the first enchantment. I will add one of the special battle effects. Of course, you don't have to be afraid because there's no failure, kuku.";
+		}
+		else if (.@card[2] == 0) {
+			.@slot_num = 2;
+			.@enchant_type = 5;
+			mes "The second enchantment. I will buff one of the previous states. There also is no failure, so don't worry, kukuku";// custom
+		}
+		else {
+			mes "Ho~ This has already reached the peak. It is impossible to higher enchant, so be content and use it well.";// custom
+			close;
+		}
+		.@string$ = "You blow hot and cold, this fickle friend.!";
+		break;
+	default:
+		mes "[Black Beard Joe]";
+		mes "I don't enchant this!";// custom
+		close;
+	}
+	next;
+	if (select( "I will com back later", "Please do it" ) == 1) {
+		mes "[Black Beard Joe]";
+		mes .@string$;
+		close;
+	}
+	mes "[Black Beard Joe]";
+	if (.@slot_num == 3)
+		setarray .@range[0],550,1050;
+	else if (.@slot_num == 2)
+		setarray .@range[0],450,1125;
+	else if (.@slot_num == 1)
+		setarray .@range[0],1,1161;
+	else {
+		mes "There is a problem, please come back again!";// custom
+		close;
+	}
+	.@enchant = 9;
+	switch(.@enchant_type) {
+	case 1:
+		.@r = rand(.@range[0],.@range[1]);
+			 if (.@r < 601)  .@enchant = 0;
+		else if (.@r < 701)  .@enchant = 4700;	// Strength1
+		else if (.@r < 801)  .@enchant = 4730;	// Agility1
+		else if (.@r < 901)  .@enchant = 4720;	// Dexterity1
+		else if (.@r < 951)  .@enchant = 4701;	// Strength2
+		else if (.@r < 1001) .@enchant = 4731;	// Agility2
+		else if (.@r < 1051) .@enchant = 4721;	// Dexterity2
+		else if (.@r < 1076) .@enchant = 4702;	// Strength3
+		else if (.@r < 1101) .@enchant = 4732;	// Agility3
+		else if (.@r < 1126) .@enchant = 4722;	// Dexterity3
+		else if (.@r < 1138) .@enchant = 4703;	// Strength4
+		else if (.@r < 1150) .@enchant = 4733;	// Agility4
+		else if (.@r < 1162) .@enchant = 4723;	// Dexterity4
+		else .@enchant = 9;
+		break;
+	case 2:
+		.@r = rand(.@range[0],.@range[1]);
+			 if (.@r < 601)  .@enchant = 0;
+		else if (.@r < 701)  .@enchant = 4710;	// Inteligence1
+		else if (.@r < 801)  .@enchant = 4740;	// Vitality1
+		else if (.@r < 901)  .@enchant = 4720;	// Dexterity1
+		else if (.@r < 951)  .@enchant = 4711;	// Inteligence2
+		else if (.@r < 1001) .@enchant = 4741;	// Vitality2
+		else if (.@r < 1051) .@enchant = 4721;	// Dexterity2
+		else if (.@r < 1076) .@enchant = 4712;	// Inteligence3
+		else if (.@r < 1101) .@enchant = 4742;	// Vitality3
+		else if (.@r < 1126) .@enchant = 4722;	// Dexterity3
+		else if (.@r < 1138) .@enchant = 4713;	// Inteligence4
+		else if (.@r < 1150) .@enchant = 4743;	// Vitality4
+		else if (.@r < 1162) .@enchant = 4723;	// Dexterity4
+		else .@enchant = 9;
+		break;
+	case 3:
+		.@r = rand(1,2555);
+			 if (.@r < 301)  .@enchant = 4820;	// Fighting_Spirit5
+		else if (.@r < 501)  .@enchant = 4821;	// Fighting_Spirit6
+		else if (.@r < 601)  .@enchant = 4822;	// Fighting_Spirit7
+		else if (.@r < 651)  .@enchant = 4823;	// Fighting_Spirit8
+		else if (.@r < 676)  .@enchant = 4824;	// Fighting_Spirit9
+		else if (.@r < 686)  .@enchant = 4825;	// Fighting_Spirit10
+		else if (.@r < 986)  .@enchant = 4816;	// Sharp3
+		else if (.@r < 1086) .@enchant = 4843;	// Sharp4
+		else if (.@r < 1096) .@enchant = 4844;	// Sharp5
+		else if (.@r < 1396) .@enchant = 4760;	// Matk1
+		else if (.@r < 1496) .@enchant = 4761;	// Matk2
+		else if (.@r < 1506) .@enchant = 4806;	// Matk3
+		else if (.@r < 1806) .@enchant = 4872;	// Attack_Delay_2
+		else if (.@r < 2006) .@enchant = 4873;	// Attack_Delay_3
+		else if (.@r < 2106) .@enchant = 4881;	// Attack_Delay_4
+		else if (.@r < 2116) .@enchant = 4807;	// Atk_Speed1
+		else if (.@r < 2416) .@enchant = 4827;	// Spell6
+		else if (.@r < 2516) .@enchant = 4828;	// Spell7
+		else if (.@r < 2546) .@enchant = 4829;	// Spell8
+		else if (.@r < 2556) .@enchant = 4830;	// Spell9
+		else .@enchant = 9;
+		break;
+	case 4:
+		.@r = rand(1,1950);
+			 if (.@r < 301)  .@enchant = 4810;	// Fighting_Spirit2
+		else if (.@r < 401)  .@enchant = 4809;	// Fighting_Spirit3
+		else if (.@r < 451)  .@enchant = 4808;	// Fighting_Spirit4
+		else if (.@r < 471)  .@enchant = 4820;	// Fighting_Spirit5
+		else if (.@r < 771)  .@enchant = 4818;	// Sharp1
+		else if (.@r < 871)  .@enchant = 4817;	// Sharp2
+		else if (.@r < 891)  .@enchant = 4816;	// Sharp3
+		else if (.@r < 991)  .@enchant = 4760;	// Matk1
+		else if (.@r < 1011) .@enchant = 4761;	// Matk2
+		else if (.@r < 1311) .@enchant = 4869;	// Attack_Delay_1
+		else if (.@r < 1411) .@enchant = 4872;	// Attack_Delay_2
+		else if (.@r < 1461) .@enchant = 4873;	// Attack_Delay_3
+		else if (.@r < 1481) .@enchant = 4881;	// Attack_Delay_4
+		else if (.@r < 1781) .@enchant = 4813;	// Spell3
+		else if (.@r < 1881) .@enchant = 4812;	// Spell4
+		else if (.@r < 1931) .@enchant = 4826;	// Spell5
+		else if (.@r < 1951) .@enchant = 4827;	// Spell6
+		else .@enchant = 9;
+		break;
+	case 5:
+		.@r = rand(1,1970);
+			 if (.@r < 301)  .@enchant = 4700;	// Strength1
+		else if (.@r < 401)  .@enchant = 4701;	// Strength2
+		else if (.@r < 451)  .@enchant = 4702;	// Strength3
+		else if (.@r < 471)  .@enchant = 4730;	// Agility1
+		else if (.@r < 771)  .@enchant = 4731;	// Agility2
+		else if (.@r < 871)  .@enchant = 4732;	// Agility3
+		else if (.@r < 891)  .@enchant = 4710;	// Inteligence1
+		else if (.@r < 991)  .@enchant = 4711;	// Inteligence2
+		else if (.@r < 1011) .@enchant = 4712;	// Inteligence3
+		else if (.@r < 1311) .@enchant = 4720;	// Dexterity1
+		else if (.@r < 1411) .@enchant = 4721;	// Dexterity2
+		else if (.@r < 1461) .@enchant = 4722;	// Dexterity3
+		else if (.@r < 1481) .@enchant = 4740;	// Vitality1
+		else if (.@r < 1781) .@enchant = 4741;	// Vitality2
+		else if (.@r < 1881) .@enchant = 4742;	// Vitality3
+		else if (.@r < 1931) .@enchant = 4750;	// Luck1
+		else if (.@r < 1951) .@enchant = 4751;	// Luck2
+		else if (.@r < 1971) .@enchant = 4752;	// Luck3
+		else .@enchant = 9;
+		break;
+	default:
+		break;
+	}
+	if (.@enchant == 9) {
+		mes "There is a problem, please come back again!";// custom
+		close;
+	}
+	if (.@card[3] == 0 && .@sc_type < 4) 
+		.@card[3] = .@enchant;
+	else if (.@card[2] == 0 && .@sc_type < 3)
+		.@card[2] = .@enchant;
+	else if (.@card[1] == 0 && .@sc_type < 2)
+		.@card[1] = .@enchant;
+	else {
+		mes "I don't know what this is, but I think this isn't thing I could handle.";// custom
+		close;
+	}
+	if (countitem(7642) > 14) {// Bloody_Coin
+		delitem 7642,15;// Bloody_Coin
+		delequip .@eq_num;
+		if (.@enchant == 0) {
+			mes "Ouch! Poor you, the enchantment has failed and your gear is broken, Geez!";
+			close2;
+			specialeffect2 EF_LORD;
+			end;
+		}
+		getitem2 .@item_id,1,1,.@refine,0,.@card[0],.@card[1],.@card[2],.@card[3];
+		mes "Hmm.. It was successful. Take a look at it.";
+		specialeffect2 EF_REPAIRWEAPON;
+		close;
+	}
+	mes "Hmm.. By the way, you need to fill up Bloody Coins. You cannot even pay for the fee.";
+	close;
+}

+ 2 - 0
npc/re/scripts_athena.conf

@@ -55,6 +55,7 @@ npc: npc/re/instances/BakonawaLake.txt
 npc: npc/re/instances/BangungotHospital.txt
 npc: npc/re/instances/BuwayaCave.txt
 npc: npc/re/instances/HazyForest.txt
+npc: npc/re/instances/HorrorToyFactory.txt
 npc: npc/re/instances/MalangdoCulvert.txt
 npc: npc/re/instances/OctopusCave.txt
 npc: npc/re/instances/OldGlastHeim.txt
@@ -84,6 +85,7 @@ npc: npc/re/merchants/enchan_mal.txt
 npc: npc/re/merchants/enchan_mora.txt
 npc: npc/re/merchants/flute.txt
 npc: npc/re/merchants/hd_refiner.txt
+npc: npc/re/merchants/HorrorToyFactory_merchants.txt
 npc: npc/re/merchants/inn.txt
 npc: npc/re/merchants/quivers.txt
 npc: npc/re/merchants/refine.txt

+ 20 - 1
src/map/battle.c

@@ -1043,6 +1043,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
 	if( sc && sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
 		return 1;
 
+	if (sc && sc->data[SC_MAXPAIN])
+		return 0;
+
 	if (skill_id == PA_PRESSURE || skill_id == HW_GRAVITATION)
 		return damage; //These skills bypass everything else.
 
@@ -5198,7 +5201,12 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr
 		if( rdamage > 0 ) {
 			struct block_list *d_bl = battle_check_devotion(src);
 
-			if( attack_type == BF_WEAPON && tsc->data[SC_REFLECTDAMAGE] ) // Don't reflect your own damage (Grand Cross)
+			if (tsc->data[SC_MAXPAIN]) {
+				tsc->data[SC_MAXPAIN]->val2 = (int)rdamage;
+				skill_castend_damage_id(target, src, NPC_MAXPAIN_ATK, tsc->data[SC_MAXPAIN]->val1, tick, wd->flag);
+				tsc->data[SC_MAXPAIN]->val2 = 0;
+			}
+			else if( attack_type == BF_WEAPON && tsc->data[SC_REFLECTDAMAGE] ) // Don't reflect your own damage (Grand Cross)
 				map_foreachinshootrange(battle_damage_area,target,skill_get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,tick,target,wd->amotion,sstatus->dmotion,rdamage,wd->flag);
 			else if( attack_type == BF_WEAPON || attack_type == BF_MISC) {
 				rdelay = clif_damage(src, (!d_bl) ? src : d_bl, tick, wd->amotion, sstatus->dmotion, rdamage, 1, DMG_ENDURE, 0, false);
@@ -6307,6 +6315,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 	struct Damage md; //DO NOT CONFUSE with md of mob_data!
 	struct status_data *sstatus = status_get_status_data(src);
 	struct status_data *tstatus = status_get_status_data(target);
+	struct status_change *ssc = status_get_sc(src);
 
 	memset(&md,0,sizeof(md));
 
@@ -6577,6 +6586,12 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
 		case MH_EQC:
 			md.damage = max(tstatus->hp - sstatus->hp, 0);
 			break;
+		case NPC_MAXPAIN_ATK:
+			if (ssc && ssc->data[SC_MAXPAIN])
+				md.damage = ssc->data[SC_MAXPAIN]->val2;
+			else
+				md.damage = 0;
+			break;
 	}
 
 	if (nk&NK_SPLASHSPLIT) { // Divide ATK among targets
@@ -6833,6 +6848,10 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i
 	if (sc && sc->data[SC_KYOMU] && (!ssc || !ssc->data[SC_SHIELDSPELL_DEF])) // Nullify reflecting ability except for Shield Spell - Def
 		rdamage = 0;
 
+	if (sc && sc->data[SC_MAXPAIN]) {
+		rdamage = damage * sc->data[SC_MAXPAIN]->val1 * 10 / 100;
+	}
+
 	return cap_value(min(rdamage,max_damage),INT_MIN,INT_MAX);
 }
 

+ 30 - 1
src/map/script.c

@@ -16844,6 +16844,10 @@ BUILDIN_FUNC(rid2name)
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * Toggle a unit from moving.
+ * pcblockmove(<unit_id>,<option>);
+ */
 BUILDIN_FUNC(pcblockmove)
 {
 	struct block_list *bl = NULL;
@@ -16863,6 +16867,29 @@ BUILDIN_FUNC(pcblockmove)
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * Toggle a unit from casting skills.
+ * pcblockskill(<unit_id>,<option>);
+ */
+BUILDIN_FUNC(pcblockskill)
+{
+	struct block_list *bl = NULL;
+
+	if (script_getnum(st, 2))
+		bl = map_id2bl(script_getnum(st,2));
+	else
+		bl = map_id2bl(st->rid);
+
+	if (bl) {
+		struct unit_data *ud = unit_bl2ud(bl);
+
+		if (ud)
+			ud->state.blockedskill = script_getnum(st, 3) > 0;
+	}
+
+	return SCRIPT_CMD_SUCCESS;
+}
+
 BUILDIN_FUNC(pcfollow)
 {
 	int id, targetid;
@@ -22532,6 +22559,9 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(pcfollow,"ii"),
 	BUILDIN_DEF(pcstopfollow,"i"),
 	BUILDIN_DEF(pcblockmove,"ii"),
+	BUILDIN_DEF2(pcblockmove,"unitblockmove","ii"),
+	BUILDIN_DEF(pcblockskill,"ii"),
+	BUILDIN_DEF2(pcblockskill,"unitblockskill","ii"),
 	// <--- [zBuffer] List of player cont commands
 	// [zBuffer] List of unit control commands --->
 	BUILDIN_DEF(unitexists,"i"),
@@ -22547,7 +22577,6 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(unitattack,"iv?"),
 	BUILDIN_DEF(unitstopattack,"i"),
 	BUILDIN_DEF(unitstopwalk,"i"),
-	BUILDIN_DEF2(pcblockmove,"unitblockmove","ii"),
 	BUILDIN_DEF(unittalk,"is"),
 	BUILDIN_DEF(unitemote,"ii"),
 	BUILDIN_DEF(unitskilluseid,"ivi??"), // originally by Qamera [Celest]

+ 1 - 0
src/map/script_constants.h

@@ -1438,6 +1438,7 @@
 	export_constant(SC_GEFFEN_MAGIC1);
 	export_constant(SC_GEFFEN_MAGIC2);
 	export_constant(SC_GEFFEN_MAGIC3);
+	export_constant(SC_MAXPAIN);
 #ifdef RENEWAL
 	export_constant(SC_EXTREMITYFIST2);
 #endif

+ 4 - 0
src/map/skill.c

@@ -418,6 +418,8 @@ unsigned short skill_dummy2skill_id(unsigned short skill_id) {
 			return GN_SLINGITEM;
 		case RL_R_TRIP_PLUSATK:
 			return RL_R_TRIP;
+		case NPC_MAXPAIN_ATK:
+			return NPC_MAXPAIN;
 	}
 	return skill_id;
 }
@@ -4830,6 +4832,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
 	case NPC_PULSESTRIKE:
 	case NPC_HELLJUDGEMENT:
 	case NPC_VAMPIRE_GIFT:
+	case NPC_MAXPAIN_ATK:
 	case RK_IGNITIONBREAK:
 	case AB_JUDEX:
 	case WL_SOULEXPANSION:
@@ -6626,6 +6629,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case RL_E_CHAIN:
 	case SU_FRESHSHRIMP:
 	case SU_ARCLOUSEDASH:
+	case NPC_MAXPAIN:
 		clif_skill_nodamage(src,bl,skill_id,skill_lv,
 			sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
 		break;

+ 1 - 0
src/map/status.c

@@ -526,6 +526,7 @@ void initChangeTables(void)
 	set_sc( NPC_WIDEHELLDIGNITY	, SC_HELLPOWER		, SI_HELLPOWER		, SCB_NONE );
 	set_sc( NPC_INVINCIBLE		, SC_INVINCIBLE		, SI_INVINCIBLE		, SCB_SPEED );
 	set_sc( NPC_INVINCIBLEOFF	, SC_INVINCIBLEOFF	, SI_BLANK		, SCB_SPEED );
+	set_sc_with_vfx( NPC_MAXPAIN	,	 SC_MAXPAIN	, SI_MAXPAIN	, SCB_NONE );
 
 	set_sc( CASH_BLESSING		, SC_BLESSING		, SI_BLESSING		, SCB_STR|SCB_INT|SCB_DEX );
 	set_sc( CASH_INCAGI		, SC_INCREASEAGI	, SI_INCREASEAGI	, SCB_AGI|SCB_SPEED );

+ 2 - 0
src/map/status.h

@@ -793,6 +793,8 @@ typedef enum sc_type {
     SC_GEFFEN_MAGIC2,
     SC_GEFFEN_MAGIC3,
 
+	SC_MAXPAIN,
+
 #ifdef RENEWAL
 	SC_EXTREMITYFIST2, //! NOTE: This SC should be right before SC_MAX, so it doesn't disturb if RENEWAL is disabled
 #endif

+ 6 - 0
src/map/unit.c

@@ -1500,6 +1500,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
 	if(ud == NULL)
 		return 0;
 
+	if (ud && ud->state.blockedskill)
+		return 0;
+
 	sc = status_get_sc(src);
 
 	if (sc && !sc->count)
@@ -1959,6 +1962,9 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
 	if(ud == NULL)
 		return 0;
 
+	if (ud && ud->state.blockedskill)
+		return 0;
+
 	if(ud->skilltimer != INVALID_TIMER) // Normally not needed since clif.c checks for it, but at/char/script commands don't! [Skotlex]
 		return 0;
 

+ 1 - 0
src/map/unit.h

@@ -54,6 +54,7 @@ struct unit_data {
 		unsigned speed_changed : 1;
 		unsigned walk_script : 1;
 		unsigned blockedmove : 1;
+		unsigned blockedskill : 1;
 	} state;
 	char walk_done_event[EVENT_NAME_LENGTH];
 };