From b2a1d99ef0c77fbc96431d04132e9b343d3d5f6b Mon Sep 17 00:00:00 2001 From: Zarbony Date: Tue, 31 Mar 2020 15:35:45 +0200 Subject: [PATCH 1/6] Updated Horror Toy Factory with new Mob_Skill_DB Scheme. Just Use raw data from #1539 and updated setpcblock() script command with work from Kenpachi2k13 to use it now. ToDO: - Fix setunitdata() to work correctly - Add Skill IDs 716 and 719 --- db/quest_db.conf | 9 + db/re/item_db.conf | 258 +++ db/re/item_packages.conf | 62 + db/re/mob_db.conf | 544 ++++++- db/re/mob_skill_db.conf | 806 +++++++++ npc/re/instances/horror_toy_factory.txt | 1984 +++++++++++++++++++++++ npc/re/mapflag/zone.txt | 3 + npc/re/merchants/enchan_htf.txt | 703 ++++++++ npc/re/scripts.conf | 2 + 9 files changed, 4351 insertions(+), 20 deletions(-) create mode 100644 npc/re/instances/horror_toy_factory.txt create mode 100644 npc/re/merchants/enchan_htf.txt diff --git a/db/quest_db.conf b/db/quest_db.conf index 49952d94bb2..e14ec256a84 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -10946,6 +10946,15 @@ quest_db: ( Id: 12322 Name: "Space Distortion" }, +{ + Id: 12330 + Name: "Skull-faced Girl" +}, +{ + Id: 12331 + Name: "Trail of Toy Factory" + TimeLimit: 82800 +}, { Id: 12363 Name: "?????? ?? ??" diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 961fa102e3b..535d5dabe8d 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -41178,6 +41178,71 @@ item_db: ( bonus bMatkRate,7; "> }, +{ + Id: 2976 + AegisName: "Red_Lantern" + Name: "Red Lantern" + Type: 5 + Weight: 200 + Slots: 1 + Loc: 136 + EquipLv: 100 + Script: <" + bonus bMaxSP, -300; + skill MG_SIGHT, 1; + bonus2 bAddMonsterDropItem, Alchol, 100; + bonus2 bAddMonsterDropItem, Detrimindexta, 100; + bonus2 bAddMonsterDropItem, Karvodailnirol, 100; + "> + OnUnequipScript: <" sc_end SC_SIGHT; "> +}, +{ + Id: 2977 + AegisName: "Hurt_Mind" + Name: "Broken Heart" + Type: 5 + Weight: 100 + Slots: 1 + Loc: 136 + EquipLv: 110 + Script: <" + bonus bMaxSP, 200; + skill DC_SCREAM, 3; + "> +}, +{ + Id: 2978 + AegisName: "KindHeart" + Name: "Gentle Heart" + Type: 5 + Weight: 100 + Slots: 1 + Loc: 136 + EquipLv: 110 + Script: <" + bonus bMaxHP, 500; + bonus2 bHPRegenRate, 300, 10000; + "> +}, +{ + Id: 2980 + AegisName: "Evilspirit_Gloves" + Name: "Evilspirit Gloves" + Type: 5 + Weight: 100 + Slots: 1 + Loc: 136 + EquipLv: 110 + Script: <" + bonus bMaxSP, 200; + bonus bMaxHP, 500; + skill PF_SPIDERWEB, 1; + bonus4 bAutoSpell, WZ_FROSTNOVA, 10, 25, 0; + bonus4 bAutoSpell, SO_PSYCHIC_WAVE, 10, 15, 1; + bonus5 bAutoSpell, HW_MAGICPOWER, 1, 15, BF_MAGIC, 0; + bonus5 bAutoSpellWhenHit, DC_SCREAM, 1, 50, BF_WEAPON | BF_MAGIC, 0; + "> +}, { Id: 2981 AegisName: "RingOfHero" @@ -74495,6 +74560,13 @@ item_db: ( Name: "Cash Hair Coupon" Weight: 10 }, +{ + Id: 6683 + AegisName: "Dried_Flower" + Name: "Dried Flower" + Weight: 10 + BuyingStore: true +}, { Id: 6712 AegisName: "Lovely_Stick" @@ -80149,6 +80221,27 @@ item_db: ( Name: "Bloody Coin" Buy: 10 }, +{ + Id: 7642 + AegisName: "Bloody_Coin" + Name: "Bloody Coin" + BuyingStore: true +}, +{ + Id: 7643 + AegisName: "Bloody_Letter" + Name: "Bloody Letter" + Buy: 220 + Weight: 10 + BuyingStore: true +}, +{ + Id: 7644 + AegisName: "Draft_Letter" + Name: "Draft Letter" + Buy: 560 + BuyingStore: true +}, { Id: 7646 AegisName: "RO_Luk_Bookmark" @@ -85221,6 +85314,24 @@ item_db: ( Weight: 100 Script: <" itemheal rand(325,405),0; "> }, +{ + Id: 11563 + AegisName: "Hot_Tee" + Name: "Hot Tea" + Type: 0 + Weight: 20 + BuyingStore: true + Script: <" itemheal 0, rand(80, 100); "> +}, +{ + Id: 11564 + AegisName: "Sweet_Canape" + Name: "Sweet Pastry" + Type: 0 + Weight: 20 + BuyingStore: true + Script: <" itemheal rand(800, 1000), 0; "> +}, { Id: 11592 AegisName: "Trance_Candy_R" @@ -126057,6 +126168,32 @@ item_db: ( "> OnUnequipScript: <" heal -1000,0; "> }, +{ + Id: 16029 + AegisName: "Noble_Cross" + Name: "Noble Cross" + Type: 4 + Weight: 1500 + Atk: 195 + Matk: 150 + Range: 1 + Job: { + Acolyte: true + Priest: true + Monk: true + } + Upper: 58 + Loc: 2 + WeaponLv: 4 + EquipLv: 40 + View: 8 + Script: <" + bonus bAtkEle, Ele_Holy; + bonus3 bAutoSpell, PR_TURNUNDEAD, 6, 100; + bonus2 bSPDrainValueRace, RC_Undead, 1; + bonus2 bSPGainRace, RC_Undead, 12; + "> +}, { Id: 16030 AegisName: "Pilebuncker_S" @@ -147896,6 +148033,29 @@ item_db: ( // getrandgroupitem(IG_PrizeOfHero, 1); "> }, +{ + Id: 22516 + AegisName: "Dark_Red_Clot" + Name: "Dark Red Lump" + Type: 2 + Buy: 1440 + Weight: 10 + BuyingStore: true + Script: <" + if (rand(1000) < 300) + sc_start SC_CURSE, 30000, 0, 3000, SCFLAG_NONE; + "> +}, +{ + Id: 22534 + AegisName: "Closedmind_Box" + Name: "Sealed Mind Box" + Type: 2 + Buy: 1000 + Weight: 1000 + BuyingStore: true + Script: <" packageitem(); "> +}, { Id: 22540 AegisName: "Runstone_Lux" @@ -154226,6 +154386,104 @@ item_db: ( AegisName: "Shinee_Opal" Name: "Shinee_Opal" }, +{ + Id: 31016 + AegisName: "Decorated_Evil_Tree_Card" + Name: "Decorated Tree Matilda Card" + Type: 6 + Weight: 10 + Loc: 16 + Script: <" + bonus bMaxHP, 1000; + bonus bMaxSP, 150; + bonus bFlee, -25; + "> +}, +{ + Id: 31017 + AegisName: "Brutal_Tattered_Cookie_Card" + Name: "Terrifying Cookie Card" + Type: 6 + Weight: 10 + Loc: 64 + Script: <" + bonus2 bAddRace, RC_All, 1 + getrefine() / 2; + bonus bMatkRate, 1 + getrefine() / 2; + bonus bMaxHPrate, -2 - (getrefine() / 2) * 2; + "> +}, +{ + Id: 31018 + AegisName: "Evil_Enchanted_Box_Card" + Name: "Gift of Darkness Card" + Type: 6 + Weight: 10 + Loc: 2 + Script: <" + bonus bMaxHP, -1225; + bonus3 bAddEff, Eff_Curse, 1000, ATF_MAGIC; + "> +}, +{ + Id: 31019 + AegisName: "Eerie_Spirit_Card" + Name: "Eerie Spirit Card" + Type: 6 + Weight: 10 + Loc: 136 + Script: <" + bonus bMaxHPrate, -13; + bonus5 bAutoSpellWhenHit, NPC_WIDECURSE, 5, 100, BF_MAGIC, 0; + "> +}, +{ + Id: 31020 + AegisName: "Evil_Chill_Ghost_Card" + Name: "Bloody Poltergeist Card" + Type: 6 + Weight: 10 + Loc: 136 + Script: <" + bonus bMaxHPrate, -13; + bonus5 bAutoSpellWhenHit, NPC_WIDECURSE, 5, 100, BF_WEAPON, 0; + "> +}, +{ + Id: 31021 + AegisName: "Dancing_Marionette_Card" + Name: "Demonic Marionette Card" + Type: 6 + Weight: 10 + Loc: 2 + Script: <" + bonus bAspdRate, 10; + bonus2 bAddRace, RC_All, -3; + "> +}, +{ + Id: 31022 + AegisName: "Dumped_Teddy_Bear_Card" + Name: "Dumped Teddy Bear Card" + Type: 6 + Weight: 10 + Loc: 64 + Script: <" + bonus bMaxSPrate, 20; + bonus2 bAddEff2, Eff_Curse, 100; + "> +}, +{ + Id: 31023 + AegisName: "Celine_Kimi_Card" + Name: "Celine Kimi Card" + Type: 6 + Weight: 10 + Loc: 2 + Script: <" + bonus bMatkRate, 10; + bonus5 bAutoSpell, NPC_CRITICALWOUND, 3, 50 + 5 * (getrefine() / 3), BF_MAGIC, 1; + "> +}, { Id: 31172 AegisName: "Roast_Memory" diff --git a/db/re/item_packages.conf b/db/re/item_packages.conf index 468d47a26db..37f94278fb4 100644 --- a/db/re/item_packages.conf +++ b/db/re/item_packages.conf @@ -12869,3 +12869,65 @@ Malang_Woe_Encard_Box: { Random: 0 } } +Closedmind_Box: { + Crystal_Jewel__: { + Random: 1 + Count: 10 + Rate: 1 + } + Violet_Jewel: { + Random: 1 + Count: 10 + Rate: 1 + } + Bloody_Coin: { + Random: 1 + Count: 5 + Rate: 1 + } + Gold: { + Random: 1 + Count: 2 + Rate: 1 + } + Manacles: { + Random: 1 + Count: 10 + Rate: 1 + } + Old_Card_Album: { + Random: 1 + Count: 1 + Rate: 1 + } + Old_Violet_Box: { + Random: 1 + Count: 3 + Rate: 1 + } + Sweet_Canape: { + Random: 1 + Count: 5 + Rate: 1 + } + Hot_Tee: { + Random: 1 + Count: 5 + Rate: 1 + } + KindHeart: { + Random: 1 + Count: 1 + Rate: 1 + } + Hurt_Mind: { + Random: 1 + Count: 1 + Rate: 1 + } + Lush_Rose: { + Random: 1 + Count: 1 + Rate: 1 + } +} diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index e90b478e7d8..fbafb88a191 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -83639,15 +83639,441 @@ mob_db: ( //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 +// Horror Toy Factory +{ + Id: 2987 + SpriteName: "XM_TREE" + Name: "Decorated Evil Tree" + Lv: 148 + Hp: 544444 + Sp: 1 + Exp: 4444 + JExp: 15888 + AttackRange: 2 + Attack: [1347, 577] + Def: 116 + Mdef: 44 + Stats: { + Str: 44 + Agi: 66 + Vit: 44 + Int: 44 + Dex: 144 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Large" + Race: "RC_Demon" + Element: ("Ele_Undead", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 150 + AttackDelay: 917 + AttackMotion: 1584 + DamageMotion: 576 + MvpExp: 0 + Drops: { + Hanging_Doll: 900 + Rotten_Rope: 2668 + Tree_Knot: 2037 + Vivid_Notation: 500 + Red_Gemstone: 50 + Branch_Of_Dead_Tree: 20 + Elder_Branch: 200 + Decorated_Evil_Tree_Card: 1 + } +}, +{ + Id: 2988 + SpriteName: "XM_ANTONIO" + Name: "Wicked Vice Plant Manager" + Lv: 149 + Hp: 44 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 2 + Attack: [245, 27] + Def: 160 + Mdef: 44 + Stats: { + Str: 44 + Agi: 88 + Vit: 44 + Int: 44 + Dex: 144 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_Undead" + Element: ("Ele_Dark", 3) + Mode: { + CanMove: true + Aggressive: true + Plant: true + CanAttack: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 100 + AttackDelay: 720 + AttackMotion: 720 + DamageMotion: 432 + MvpExp: 0 + Drops: { + Red_Socks_With_Holes: 2000 + C_SantaHairband: 100 + Vivid_Notation: 500 + Red_Bag: 100 + Luk_Dish08: 500 + } +}, +{ + Id: 2989 + SpriteName: "XM_COOKIE" + Name: "Vicious Cookie" + Lv: 149 + Hp: 187760 + Sp: 1 + Exp: 6666 + JExp: 7332 + AttackRange: 1 + Attack: [1348, 577] + Def: 48 + Mdef: 44 + Stats: { + Str: 44 + Agi: 88 + Vit: 44 + Int: 44 + Dex: 144 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Demon" + Element: ("Ele_Dark", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 200 + AttackDelay: 1248 + AttackMotion: 1248 + DamageMotion: 240 + Drops: { + Mould_Powder: 2000 + Dark_Red_Jewel: 100 + Well_Baked_Cookie: 500 + Candy_Striper: 500 + Brutal_Tattered_Cookie_Card: 1 + } +}, +{ + Id: 2990 + SpriteName: "XM_CRUISER" + Name: "Corrupt Cruiser" + Lv: 140 + Hp: 188999 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 12 + Attack: [1339, 577] + Def: 20 + Mdef: 44 + Stats: { + Str: 44 + Agi: 88 + Vit: 44 + Int: 44 + Dex: 144 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_Demon" + Element: ("Ele_Undead", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 200 + AttackDelay: 1296 + AttackMotion: 1296 + DamageMotion: 432 + MvpExp: 0 +}, +{ + Id: 2991 + SpriteName: "XM_MYSTCASE" + Name: "Evil Dwelling Box" + Lv: 148 + Hp: 259000 + Sp: 1 + Exp: 6666 + JExp: 7332 + AttackRange: 2 + Attack: [1347, 577] + Def: 50 + Mdef: 44 + Stats: { + Str: 44 + Agi: 44 + Vit: 44 + Int: 44 + Dex: 44 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_Demon" + Element: ("Ele_Dark", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 200 + AttackDelay: 1248 + AttackMotion: 1248 + DamageMotion: 432 + MvpExp: 0 + Drops: { + Mould_Powder: 2000 + Piece_Of_Cake: 100 + Bloody_Letter: 50 + Draft_Letter: 50 + Evil_Enchanted_Box_Card: 1 + } +}, +{ + Id: 2992 + SpriteName: "XM_LUDE" + Name: "Creepy Demon" + Lv: 140 + Hp: 4444 + Sp: 1 + Exp: 666 + JExp: 732 + AttackRange: 1 + Attack: [539, 177] + Def: 90 + Mdef: 44 + Stats: { + Str: 44 + Agi: 44 + Vit: 44 + Int: 44 + Dex: 44 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Undead" + Element: ("Ele_Dark", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 100 + AttackDelay: 890 + AttackMotion: 960 + DamageMotion: 480 + MvpExp: 0 + Drops: { + Pumpkin_Bucket: 1600 + Ectoplasm: 2862 + Transparent_Cloth: 500 + Gold: 1000 + White_Gold_Bullion: 1000 + Bloody_Coin: 1000 + Bloody_Coin: 1000 + Eerie_Spirit_Card: 1 + } +}, +{ + Id: 2993 + SpriteName: "XM_HYLOZOIST" + Name: "Malicious Baby Ghost" + Lv: 145 + Hp: 444444 + Sp: 1 + Exp: 4444 + JExp: 15888 + AttackRange: 2 + Attack: [1621, 667] + Def: 101 + Mdef: 44 + Stats: { + Str: 144 + Agi: 66 + Vit: 66 + Int: 66 + Dex: 166 + Luk: 66 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Demon" + Element: ("Ele_Dark", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 110 + AttackDelay: 741 + AttackMotion: 1536 + DamageMotion: 480 + MvpExp: 0 + Drops: { + Broken_Needle: 1000 + Spool: 1000 + Needle_Pouch: 1000 + Stuffed_Doll: 40 + Dark_Red_Clot: 1000 + Water_Of_Darkness: 500 + Evil_Chill_Ghost_Card: 1 + } +}, +{ + Id: 2994 + SpriteName: "XM_MARIONETTE" + Name: "Dancing Marionette" + Lv: 148 + Hp: 280000 + Sp: 1 + Exp: 4444 + JExp: 15888 + AttackRange: 2 + Attack: [547, 177] + Def: 35 + Mdef: 44 + Stats: { + Str: 44 + Agi: 44 + Vit: 44 + Int: 144 + Dex: 88 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Demon" + Element: ("Ele_Ghost", 1) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 120 + AttackDelay: 1480 + AttackMotion: 480 + DamageMotion: 1056 + MvpExp: 0 + Drops: { + Lusty_Iron: 10 + Shadow_Walk_: 3 + Brooch_: 1 + Fire_Scroll_3_5: 50 + Dark_Red_Clot: 1000 + Damp_Darkness: 100 + Dancing_Marionette_Card: 1 + } +}, +{ + Id: 2995 + SpriteName: "XM_TEDDY_BEAR" + Name: "Abandoned Teddy Bear" + Lv: 148 + Hp: 180000 + Sp: 1 + Exp: 6666 + JExp: 7332 + AttackRange: 1 + Attack: [1347, 577] + Def: 106 + Mdef: 44 + Stats: { + Str: 44 + Agi: 166 + Vit: 44 + Int: 44 + Dex: 166 + Luk: 44 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Demon" + Element: ("Ele_Undead", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Detector: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 150 + AttackDelay: 512 + AttackMotion: 780 + DamageMotion: 504 + MvpExp: 0 + Drops: { + Screw: 1900 + Oridecon_Hammer: 150 + Str_Dish09: 100 + Runstone_Quality: 1000 + Runstone_Rare: 100 + Dumped_Teddy_Bear_Card: 1 + } +}, { Id: 2996 SpriteName: "XM_CELINE_KIMI" @@ -83658,7 +84084,7 @@ mob_db: ( Exp: 4444444 JExp: 4033332 AttackRange: 2 - Attack: [5636, 8303] + Attack: [5636, 2667] Def: 479 Mdef: 444 Stats: { @@ -83678,22 +84104,19 @@ mob_db: ( CanMove: true Aggressive: true CastSensorIdle: true + Boss: true CanAttack: true + Detector: true CastSensorChase: true ChangeChase: true ChangeTargetMelee: true ChangeTargetChase: true } MoveSpeed: 100 - AttackDelay: 768 + AttackDelay: 576 AttackMotion: 1056 DamageMotion: 480 - MvpExp: 444444 - MvpDrops: { - Old_Card_Album: 10000 - Old_Violet_Box: 10000 - Closedmind_Box: 10000 - } + MvpExp: 2222222 Drops: { Closedmind_Box: 4000 Butterfly_Hairpin: 4000 @@ -83701,10 +84124,56 @@ mob_db: ( C_Red_Bonnet: 100 Old_Parasol: 100 Flower: 10000 + Celine_Kimi_Card: 1 + } +}, +{ + Id: 2997 + SpriteName: "G_XM_CELINE_KIMI" + Name: "Spectrum Celine" + Lv: 160 + Hp: 66666666 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 2 + Attack: [6666, 6666] + Def: 479 + Mdef: 444 + Stats: { + Str: 144 + Agi: 166 + Vit: 44 + Int: 444 + Dex: 166 + Luk: 166 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Large" + Race: "RC_Undead" + Element: ("Ele_Ghost", 1) + Mode: { + CanMove: true + Aggressive: true + CastSensorIdle: true + Boss: true + CanAttack: true + Detector: true + CastSensorChase: true + ChangeChase: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 100 + AttackDelay: 576 + AttackMotion: 1056 + DamageMotion: 480 + MvpExp: 0 + Drops: { + Dried_Flower: 10000 } }, - -//2997,G_XM_CELINE_KIMI //2998,EP14_MORS_EVENT //2999,EP14_MORS_BOSSA //3000,EP14_MORS_BOSSB @@ -83788,7 +84257,42 @@ mob_db: ( //3035,MUTANT_WRAITH_DEAD //3036,MUTANT_VERIT //3037,MUTANT_LUDE -//3038,HIDDEN_MOB7 +{ + Id: 3038 + SpriteName: "HIDDEN_MOB7" + Name: "Hidden Mob" + Lv: 151 + Hp: 10000 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 1 + Attack: [2000, 1] + Def: 200 + Mdef: 100 + Stats: { + Str: 100 + Agi: 100 + Vit: 100 + Int: 100 + Dex: 100 + Luk: 100 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Small" + Race: "RC_Formless" + Element: ("Ele_Ghost", 4) + Mode: { + Aggressive: true + CanAttack: true + } + MoveSpeed: 2000 + AttackDelay: 1344 + AttackMotion: 0 + DamageMotion: 0 + MvpExp: 0 +}, //3039,B_MOROCC_1 //3040,B_MOROCC_2 //3041,B_MOROCC_4 diff --git a/db/re/mob_skill_db.conf b/db/re/mob_skill_db.conf index 4d06ebef458..ad3e315fb4b 100644 --- a/db/re/mob_skill_db.conf +++ b/db/re/mob_skill_db.conf @@ -100586,6 +100586,812 @@ mob_skill_db:( CastCondition: "MSC_ALWAYS" } } + XM_TREE:{ + AS_GRIMTOOTH: { + SkillState: "MSS_RUSH" + SkillLevel: 5 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_CURSEATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 3 + Rate: 1000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_UNDEADATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 3 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MG_THUNDERSTORM: { + SkillState: "MSS_BERSERK" + SkillLevel: 10 + Rate: 2000 + CastTime: 1000 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + TF_SPRINKLESAND: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MG_LIGHTNINGBOLT: { + SkillState: "MSS_RUSH" + SkillLevel: 10 + Rate: 2000 + CastTime: 1000 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_ANTONIO: { + AL_TELEPORT: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AL_TELEPORT: { + SkillState: "MSS_IDLE" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MSS_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_RUN: { + SkillState: "MSS_BERSERk" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 0 + Cancelable: false + SkillTarget: "MSS_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_RUN: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 0 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + SA_REVERSEORCISH: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + SA_REVERSEORCISH: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MG_SAFETYWALL: { + SkillState: "MSS_BERSERK" + SkillLevel: 10 + Rate: 1000 + CastTime: 1000 + Delay: 10000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AL_INCAGI: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 700 + Delay: 1000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + } + XM_COOKIE:{ + MG_COLDBOLT: { + SkillState: "MSS_BERSERK" + SkillLevel: 3 + Rate: 500 + CastTime: 500 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MG_COLDBOLT: { + SkillState: "MSS_RUSH" + SkillLevel: 3 + Rate: 500 + CastTime: 500 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_ENERGYDRAIN: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_ENERGYDRAIN: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + PR_LEXAETERNA: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + PR_LEXAETERNA: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + SA_REVERSEORCISH: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 50 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + SA_REVERSEORCISH: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 50 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_CRUISER:{ + NPC_COMBOATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 2 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + AC_CHARGEARROW: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + AC_CHARGEARROW: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 2000 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + AC_DOUBLE: { + SkillState: "MSS_BERSERK" + SkillLevel: 7 + Rate: 2000 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_MYSTCASE:{ + NPC_WIDESILENCE: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + BS_HAMMERFALL: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 500 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_CURSEATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 4 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_HALLUCINATION: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_HALLUCINATION: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_LUDE: { + AS_CLOAKING: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AS_CLOAKING: { + SkillState: "MSS_IDLE" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AS_CLOAKING: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + MO_BODYRELOCATION: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MO_BODYRELOCATION: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_HYLOZOIST:{ + NPC_SILENCEATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 4 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_HALLUCINATION: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_HALLUCINATION: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MO_BODYRELOCATION: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + AS_CLOAKING: { + SkillState: "MSS_IDLE" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AS_CLOAKING: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_TELEKINESISATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 8 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_MARIONETTE:{ + AS_CLOAKING: { + SkillState: "MSS_RUSH" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + AS_CLOAKING: { + SkillState: "MSS_IDLE" + SkillLevel: 1 + Rate: 2000 + CastTime: 0 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + MG_FIREBALL: { + SkillState: "MSS_BERSERK" + SkillLevel: 8 + Rate: 2000 + CastTime: 800 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + MG_FIREWALL: { + SkillState: "MSS_RUSH" + SkillLevel: 8 + Rate: 500 + CastTime: 500 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_TELEKINESISATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 8 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_TEDDY_BEAR:{ + NPC_CURSEATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 4 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_CURSEATTACK: { + SkillState: "MSS_RUSH" + SkillLevel: 4 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_CRITICALSLASH: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 500 + CastTime: 0 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + SA_DISPELL: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 50 + CastTime: 1000 + Delay: 15000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + BS_HAMMERFALL: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 500 + CastTime: 1000 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + } + XM_CELINE_KIMI:{ + AL_HEAL: { + SkillState: "MSS_IDLE" + SkillLevel: 10 + Rate: 10000 + CastTime: 500 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 90 + } + NPC_CRITICALWOUND: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 1000 + CastTime: 0 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_PULSESTRIKE: { + SkillState: "MSS_BERSERK" + SkillLevel: 3 + Rate: 10000 + CastTime: 0 + Delay: 20000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_DARKSTRIKE: { + SkillState: "MSS_BERSERK" + SkillLevel: 10 + Rate: 500 + CastTime: 0 + Delay: 20000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_DARKTHUNDER: { + SkillState: "MSS_BERSERK" + SkillLevel: 9 + Rate: 500 + CastTime: 1000 + Delay: 20000 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_WIDESTONE: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 10000 + CastTime: 1000 + Delay: 30000 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 20 + } + NPC_WIDESLEEP: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 10000 + CastTime: 1000 + Delay: 30000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 20 + } + NPC_WIDESOULDRAIN: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 10000 + CastTime: 5000 + Delay: 50000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 10 + } + //NPC_MAXPAIN(716): { + // SkillState: "MSS_BERSERK" + // SkillLevel: 9 + // Rate: 10000 + // CastTime: 3000 + // Delay: 50000 + // Cancelable: true + // SkillTarget: "MST_TARGET" + // CastCondition: "MSC_MYHPLTMAXRATE" + // ConditionData: 10 + NPC_POWERUP: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 10000 + CastTime: 0 + Delay: 50000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 5 + } + } + G_XM_CELINE_KIMI:{ + AL_HEAL: { + SkillState: "MSS_IDLE" + SkillLevel: 10 + Rate: 10000 + CastTime: 500 + Delay: 5000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 90 + } + NPC_CRITICALWOUND: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 1000 + CastTime: 0 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_PULSESTRIKE: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 20000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_DARKSTRIKE: { + SkillState: "MSS_BERSERK" + SkillLevel: 5 + Rate: 500 + CastTime: 0 + Delay: 10000 + Cancelable: false + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_DARKTHUNDER: { + SkillState: "MSS_BERSERK" + SkillLevel: 4 + Rate: 500 + CastTime: 1000 + Delay: 20000 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ALWAYS" + } + NPC_WIDESTONE: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 10000 + CastTime: 1000 + Delay: 30000 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 20 + } + NPC_WIDESLEEP: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 10000 + CastTime: 1000 + Delay: 30000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 20 + } + NPC_WIDESOULDRAIN: { + SkillState: "MSS_BERSERK" + SkillLevel: 3 + Rate: 10000 + CastTime: 5000 + Delay: 50000 + Cancelable: true + SkillTarget: "MST_SELF" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 10 + } + //NPC_MAXPAIN(716): { + // SkillState: "MSS_ATTACK" + // SkillLevel: 3 + // Rate: 10000 + // CastTime: 3000 + // Delay: 50000 + // Cancelable: true + // SkillTarget: "MST_TARGET" + // CastCondition: "MSC_MYHPLTMAXRATE" + // ConditionData: 10 + //} + NPC_POWERUP: { + SkillState: "MSS_BERSERK" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 50000 + Cancelable: false + SkillTarget: "MST_" + CastCondition: "MSC_MYHPLTMAXRATE" + ConditionData: 5 + } + } + HIDDEN_MOB7: { + NPC_INVISIBLE: { + SkillState: "MSS_IDLE" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + NPC_INVISIBLE: { + SkillState: "MSS_ATTACK" + SkillLevel: 1 + Rate: 10000 + CastTime: 0 + Delay: 30000 + Cancelable: false + SkillTarget: "MST_SELF" + CastCondition: "MSC_ALWAYS" + } + //UNKNOWN_SKILL(719): { + // SkillState: "MSS_ATTACK" + // SkillLevel: 1 + // Rate: 10000 + // CastTime: 0 + // Delay: 30000 + // Cancelable: false + // SkillTarget: "MST_TARGET" + // CastCondition: "MSC_ALWAYS" + //} + //UNKNOWN_SKILL(719): { + // SkillState: "MSS_ATTACK" + // SkillLevel: 1 + // Rate: 10000 + // CastTime: 0 + // Delay: 30000 + // Cancelable: false + // SkillTarget: "MST_TARGET" + // CastCondition: "MSC_ALWAYS" + //} + + } TIMEHOLDER: { NPC_AGIUP: { SkillState: "MSS_BERSERK" diff --git a/npc/re/instances/horror_toy_factory.txt b/npc/re/instances/horror_toy_factory.txt new file mode 100644 index 00000000000..282442012c2 --- /dev/null +++ b/npc/re/instances/horror_toy_factory.txt @@ -0,0 +1,1984 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2017 Hercules Dev Team +//= Copyright (C) Ridley +//= Copyright (C) Steph +//= Copyright (C) AtlantisRO +//= Copyright (C) Zarbony +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see . +//========================================================================= +//= Horror Toy Factory +//================= Description =========================================== +//= Help Catherine Zeta Jones to discover what happened to the Toy Maker +//================= Current Version ======================================= +//= 1.1 - Optimized with setpcblock() +//========================================================================= + +1@xm_d mapflag src4instance + +//-------- Instance Creation ------------------------ + +xmas,237,303,3 script Catherine Zeta Jones 4_F_SKULL06GIRL,{ + if (getstatus(SC_MONSTER_TRANSFORM)) { + mes("[Catherine Zeta Jones]"); + mes("Y..You there, do you want to enter the factory?"); + next(); + mes("[Catherine Zeta Jones]"); + mes("You'd better remove your transformation before entering because it will be very dangerous."); + close(); + } + if (BaseLevel < 140) { + mes("[Catherine Zeta Jones]"); + mes("Hey w..wait! You're too weak to accept this challenge as you are now."); + next(); + mes("[Catherine Zeta Jones]"); + mes("If you'd like to enter, c..come back when you reach Lv 140."); + close(); + } + mes("^ff0000Note that taming monsters inside the instance will be considered as inappropriate behaviour.^000000"); + next(); + .@xmas_start = questprogress(12330); + if (.@xmas_start == 0) { + mes("[Catherine Zeta Jones]"); + mes("D..don't be afraid, this isn't what I looked like originally."); + next(); + mes("^0000ffThe skull girl stutters as she speaks. With her void and hollow eye sockets staring at you.^000000"); + next(); + select("What happened to your face..?"); + mes("[Catherine Zeta Jones]"); + mes("It's a really long story... Would you by any chance l..like to listen to my woes?"); + next(); + if (select("Maybe another time", "Continue listening") == 1) { + mes("[Catherine Zeta Jones]"); + mes("U..Understood. Just don't go anywhere c..close to that entrance."); + close(); + } + mes("[Catherine Zeta Jones]"); + mes("W..where should I start from.. Perhaps something about the v..village.."); + next(); + mes("^0000ffThe girl let out a long sigh before starting her story.^000000"); + next(); + mes("[Catherine Zeta Jones]"); + mes("This village used to have a magnificent t..toy factory where most of the villagers worked, including me."); + next(); + mes("[Catherine Zeta Jones]"); + mes("It was all jolly and merry at the b..beginning as everyone would gather to chat over some refreshments after w..work."); + next(); + select("The atmosphere started to shift."); + mes("[Catherine Zeta Jones]"); + mes("Then, as more and more of the villagers left for another j..job to maintain their income!"); + next(); + mes("[Catherine Zeta Jones]"); + mes("In the end, all that was left of the factory was the Toy maker and I."); + next(); + mes("^0000ffAs she gets more and more emotional, her jaw falls apart.^000000"); + next(); + select("Continue listening"); + mes("[Catherine Zeta Jones]"); + mes("On the last day b..before closing down the factory, the toy maker's tears trickled down his face as he completed his final masterpiece."); + next(); + mes("[Catherine Zeta Jones]"); + mes("As if he c..couldn't ever make another toy again."); + next(); + mes("[Catherine Zeta Jones]"); + mes("He named his final m..masterpiece ^0000ffCeline Kimi^000000 before leaving the factory to age away in the mercy of time."); + next(); + select("He named a puppet?"); + mes("[Catherine Zeta Jones]"); + mes("To the toy maker.. That p..puppet, Kimi was like a daughter of his. No, she was his d..daughter.."); + next(); + mes("[Catherine Zeta Jones]"); + mes("P..Perhaps that's how Kimi was bestowed the power to live."); + next(); + select("You mean the puppet is alive?"); + mes("[Catherine Zeta Jones]"); + mes("Yes. For reasons unknown, ^0000ffKimi^000000 came to life that day and became an emb..bodiment of hatred and regrets."); + next(); + mes("[Catherine Zeta Jones]"); + mes("The first time I n..noticed her was when she was sitting next to the toy maker, guarding his lifeless body with no expression."); + next(); + mes("[Catherine Zeta Jones]"); + mes("That w..was also the last time I saw her. As I woke up from that n..nightmare, my face was already disfigured.."); + next(); + select("Was it Kimi who did it?"); + mes("[Catherine Zeta Jones]"); + mes("I d..don't know.. There's a possibilit..ty. I lost all of m..my memories of what happened before I w..woke up."); + next(); + select("Do you hate Kimi?"); + mes("[Catherine Zeta Jones]"); + mes("W..what are you saying? Of course n..not. I only wanted to know w..what happened to the toy maker that day."); + next(); + mes("[Catherine Zeta Jones]"); + mes("I just want to f..find the truth.. But the thought of ent..tering the factory..."); + next(); + mes("[Catherine Zeta Jones]"); + mes("S..sends a chill all the way down my very spine.. T..that's why I need someone to help me."); + next(); + if (select("I'm sorry.. This is out of my abilities.", "I will offer you my help.") == 1) { + mes("[Catherine Zeta Jones]"); + mes("T..thank you for listening to my woes.. I wish y..you luck in whatever you do."); + close(); + } + mes("[Catherine Zeta Jones]"); + mes("A..are you sure you want to help me?"); + next(); + select("Let's go into the factory!"); + mes("[Catherine Zeta Jones]"); + mes("I.. c..can only show you the way around inside.. Anything else is beyond my c..capability. Moreover you'd be faced with lots of dangerous situations."); + next(); + select("But we might meet Kimi right?"); + mes("[Catherine Zeta Jones]"); + mes("*Mumbles*K..Kimi... Kimi..."); + next(); + mes("^0000ffShe seems to be pondering..^000000"); + next(); + mes("[Catherine Zeta Jones]"); + mes("I've m..made up my m..mind. I'll lead the way inside.."); + next(); + mes("[Catherine Zeta Jones]"); + mes("I'll g..go make the necessary preparations. We'll go inside once it's done."); + setquest(12330); + close(); + } else if (.@xmas_start == 1) { + mes("[Catherine Zeta Jones]"); + mes("All s..set. Let m..me open the factory d..door."); + completequest(12330); + next(); + } else if (.@xmas_start > 1) { + mes("[Catherine Zeta Jones]"); + mes("K..Kimi's soul seems to be lingering around.. Bearing immense hatred and regrets, I hope she finds her way to the l..light soon."); + next(); + } + .@party_id = getcharid(CHAR_ID_PARTY); + .@p_name$ = getpartyname(.@party_id); + .@md_name$ = _("Horror Toy Factory"); + // Note: Condition is never reached. + // if (questprogress(12330) < 2) + // completequest(12330); + .@xmas_time = questprogress(12331, PLAYTIME); + if (.@party_id == 0) { + mes("^0000ffPlease form a party with more than 1 person before entering.^000000"); + close(); + } + if (.@xmas_time == 0) { + if (getcharid(CHAR_ID_CHAR) != getpartyleader(.@party_id, 2)) { + mes("[Catherine Zeta Jones]"); + mes("P..please wait as I talk to the person in charge."); + close(); + } + if (select("Open the door to the Horror Toy Factory", "Cancel") == 2) + close(); + .@instance = instance_create(.@md_name$, .@party_id); + if (.@instance < 0) { + mesf("Party Name: %s", .@p_name$); + mesf("Party Leader: %s", strcharinfo(PC_NAME)); + mesf("^0000ff%s ^000000- Instance Creation Failed.", .@md_name$); + close(); + } + if (instance_attachmap("1@xm_d", .@instance) == "") { + mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$); + instance_destroy(.@instance); + close(); + } + instance_set_timeout(3600, 300, .@instance); + instance_init(.@instance); + mes("[Catherine Zeta Jones]"); + mes("The door will be open in a b..bit. P..please wait."); + close(); + } else if (.@xmas_time == 1) { + mes("[Catherine Zeta Jones]"); + mes("T..the smell of the anti-corrosives have not dispersed over t..the years.. You won't last long if you g..go in like that."); + next(); + mes("[Catherine Zeta Jones]"); + mes("Allow m..me to air out the anti-corrosives first.."); + close(); + } else if (.@xmas_time > 1) { + mes("^0000ffTraces of entering the Horror Toy Factory has now disappeared. You can now speak with Catherine Zeta Jones.^000000"); + completequest(12331); + erasequest(12331); + close(); + } + +} + +// Original NPC Name: Toy Factory Dimensional Machine +xmas,233,305,4 script Dimensional Machine#htf PORTAL,{ + if (getstatus(SC_MONSTER_TRANSFORM)) { + mes("[Toy Factory Dimensional Machine]"); + mes("You ^ff0000cannot enter while transformed.^000000"); + close(); + } + if (BaseLevel < 140) { + mes("[Toy Factory Dimensional Machine]"); + mes("The dimensional machine requires a handful of power to operate. You must be at least Lv 140 to start the machine."); + close(); + } + .@party_id = getcharid(CHAR_ID_PARTY); + .@p_name$ = getpartyname(.@party_id); + .@md_name$ = _("Horror Toy Factory"); + .@xm_time = questprogress(12331, PLAYTIME); + if (.@party_id == 0) { + mes("[Toy Factory Dimensional Machine]"); + mes("Don't you have a companion? You need to form a party to enter."); + close(); + } + if (.@xm_time == 0) { + if (has_instance("1@xm_d") == "") { + mes("[Toy Factory Dimensional Machine]"); + mes("The dimensional gap is not open yet!"); + } else if (!.@party_id) { + mes("[Toy Factory Dimensional Machine]"); + mes("Stay where you are."); + } else { + mapannounce("xmas", sprintf(_$("%s, member of the party %s entered the instance %s."), strcharinfo(PC_NAME), .@p_name$, .@md_name$), bc_map, C_SPRINGGREEN, FW_NORMAL, 12); + setquest(12331); + warp("1@xm_d", 111, 22); + end; + } + } else if (.@xm_time == 1) { + // Instance entrance mode. Changes behavior of entrance with these values: + // 0 - Classic behaviour with exploit entrance (not recommended) + // 1 - Classic behaviour without exploit entrance + // 2 - Updated behaviour to disable re-entrance on same instance (default) + .@entrance_mode = 2; + switch (.@entrance_mode) { + case 0: + break; + case 1: + .@instance = has_instance2("1@xm_d"); + instance_attach(.@instance); + if (!'ins_htf_id) { + $@ins_global_id[.@instance] = gettimetick(2); + 'ins_htf_id = $@ins_global_id[.@instance]; + } + if (ins_htf_id + 82800 < 'ins_htf_id) + ins_htf_id = 'ins_htf_id; + if (ins_htf_id == 'ins_htf_id) { + mapannounce("xmas", sprintf(_$("%s, member of the party %s entered the instance %s."), strcharinfo(PC_NAME), .@p_name$, .@md_name$), bc_map, C_SPRINGGREEN, FW_NORMAL, 12); + warp("1@xm_d", 111, 22); + end; + } + // fall through + case 2: + mes("[Toy Factory Dimensional Machine]"); + mes("Traces of entering the dimensional gap has not disappeared."); + break; + } + } else if (.@xm_time > 1) { + mes("^0000ffTraces of entering the dimensional gap has now disappeared. You may now use the Toy Factory Dimensional Machine.^000000"); + completequest(12331); + erasequest(12331); + } + close(); +} + +//-------Area 1-------- + +1@xm_d,112,20,6 script Catherine Zeta Jones#0 4_F_SKULL06GIRL,{ + if (getstatus(SC_MONSTER_TRANSFORM)) { + mes("[Catherine Zeta Jones]"); + mes("You c..cannot enter the instance while transformed."); + next(); + mes("[Catherine Zeta Jones]"); + mes("Please wait until the transformation w..wears off."); + close(); + } + if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY), 2)) { + mes("[Catherine Zeta Jones]"); + mes("There are n..no companions of yours who are under t..transformation right?"); + npctalk(_("Catherine Zeta Jones: There are n..no companions of yours who are under t..transformation right?")); + next(); + switch (select("End conversation", "Continue talking", "Start now!")) { + case 1: + mes("[Catherine Zeta Jones]"); + mes("T..talk to me again when you're ready."); + close(); + case 2: + donpcevent(instance_npcname("Catherine Zeta Jones#01")+"::OnStart"); + close(); + case 3: + donpcevent(instance_npcname("Catherine Zeta Jones#01")+"::OnStart2"); + close(); + } + } else { + mes("[Catherine Zeta Jones]"); + mes("P..please wait while I am talking to the person in charge."); + close(); + } + end; +} + +1@xm_d,112,20,0 script #bgm01 HIDDEN_WARP_NPC,9,9,{ + + +OnInstanceInit: + disablenpc(instance_npcname("#bgm01")); + end; + +OnTouch_: + playbgm("99"); + end; +} + +1@xm_d,112,20,1 script Catherine Zeta Jones#01 4_F_SKULL06GIRL,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("Catherine Zeta Jones#01")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + enablenpc(instance_npcname("#bgm01")); + enablenpc(instance_npcname("Catherine Zeta Jones#01")); + disablenpc(instance_npcname("Catherine Zeta Jones#0")); + sleep(3000); + npctalk(_("Catherine Zeta Jones: This is the factory's first area where all the t..toys are gathered.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: I'm starting to r..recall something.. I was almost caught by the patrol officer once because I didn't w..wear my uniform.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: Although.. ")); + donpcevent(instance_npcname("#fac1ct")+"::OnStart"); + sleep(3000); + mapannounce(.@in_map$, _("Factory Announcement: Rise and shine toy factory workers~ It's our happy working hour now~!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(6000); + npctalk(_("Catherine Zeta Jones: H..How is this possible.. Those toys.. a..are behaving like humans.. Waltzing around the factory as we d..did last time..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: It might be that t..the factory was abandoned for such a l..long time that spirits started accumulating here and p..possessed the toys.")); + sleep(3000); + mapannounce(.@in_map$, _("Factory Announcement: Please be sure to check and keep your surroundings clean at all times!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: This is just like how we used to w..work last time.. No, it's exactly how we used to w..work..")); + sleep(3000); + mapannounce(.@in_map$, _("Factory Announcement: Let's work hard together today to build a beautiful future!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: We shouldn't b..be to happy that early.. W..we have to stop the production here before proceeding t..to the final area.")); + sleep(1000); + mapannounce(.@in_map$, _("Factory Announcement: Production will start in the first area, please make sure to have your safety helmets on!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: We m..might need to return those b..boxes and toys to how they originally were.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: Er.. I'm n..not sure how.. But w..we can try defeating t..them...")); + sleep(2000); + mapannounce(.@in_map$, _("Factory Announcement: You will have to wear the factory uniform and have your IDs at all time, or the officers will be coming for you~!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: There's a p..possibility that those toys h..have impersonated the officers t..too..")); + donpcevent(instance_npcname("Factory Uniform Box#1")+"::OnStart"); + donpcevent(instance_npcname("Factory Uniform Box#2")+"::OnStart"); + donpcevent(instance_npcname("Factory Uniform Box#3")+"::OnStart"); + sleep(5000); + npctalk(_("Catherine Zeta Jones: So they w..were behind me all along.. Please w..wear these uniform.. I'm glad I still h..have my ID with me.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: I'll be moving ahead to s..scout.. We'll meet up l..later.. Good luck..")); + sleep(6000); + disablenpc(instance_npcname("Catherine Zeta Jones#01")); + disablenpc(instance_npcname("#bgm01")); + end; + +OnStart2: + .@in_map$ = instance_mapname("1@xm_d"); + enablenpc(instance_npcname("#bgm01")); + enablenpc(instance_npcname("Catherine Zeta Jones#01")); + disablenpc(instance_npcname("Catherine Zeta Jones#0")); + sleep(3000); + npctalk(_("Catherine Zeta Jones: Erm.. D..did we come here before?.. W..We'll meet up at the same r..rendezvous later..")); + sleep(6000); + disablenpc(instance_npcname("Catherine Zeta Jones#01")); + donpcevent(instance_npcname("Factory Uniform Box#1")+"::OnStart"); + donpcevent(instance_npcname("Factory Uniform Box#2")+"::OnStart"); + donpcevent(instance_npcname("Factory Uniform Box#3")+"::OnStart"); + mapannounce(.@in_map$, _("Factory Announcement: Rise and shine toy factory workers~ It's our happy working hour now~!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(6000); + mapannounce(.@in_map$, _("Factory Announcement: Please be sure to check and keep your surroundings clean at all times!"), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(6000); + mapannounce(.@in_map$, _("Factory Announcement: Let's work hard together today to build a beautiful future!"), bc_map, 0x00ff44, FW_NORMAL, 12); + donpcevent(instance_npcname("#fac1ct")+"::OnStart"); + disablenpc(instance_npcname("#bgm01")); + end; +} + +1@xm_d,13,105,6 script Factory Uniform Box#1 4_NONMYSTCASE,{ + progressbar("0xffff00", 1); + playbgm("52"); + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == COOKIE_XMAS || .@emt_chk < 1) { + mes("^0000ffYou've changed into the factory uniform. You can come back here to change again everytime the production starts.^000000"); + montransform(COOKIE_XMAS, 180000); + close(); + } else { + mes("^ff0000Changing.."); + mes("You cannot change into the factory uniform again while changing. Please wait till the effect disappears and try again.^000000"); + close(); + } + end; + +OnInstanceInit: + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + end; + +OnStart: + enablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + end; +} + +1@xm_d,116,16,6 duplicate(Factory Uniform Box#1) Factory Uniform Box#2 4_NONMYSTCASE +1@xm_d,10,20,6 duplicate(Factory Uniform Box#1) Factory Uniform Box#3 4_NONMYSTCASE + +1@xm_d,1,5,3 script #fac1ct CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac1ct")); + end; + +OnStart: + enablenpc(instance_npcname("#fac1ct")); + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac1ct"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 16, 24, 114, 112, "Vicious Cookie", XM_COOKIE, 31, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 16, 24, 114, 112, "Evil Dwelling Box", XM_MYSTCASE, 36, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac1ct"); + .@mob_dead_num = mobcount(.@in_map$, .@in_npc$+"::OnMyMobDead"); + //mapannounce(.@in_map$, sprintf(_$("Factory Worker Count: %d"), .@mob_dead_num), bc_map, C_WHITE, FW_NORMAL, 12); + if (.@mob_dead_num < 30) + initnpctimer(); + end; + +OnTimer1000: + .@in_map$ = instance_mapname("1@xm_d"); + killmonster(.@in_map$, instance_npcname("#fac1ct")+"::OnMyMobDead"); + donpcevent(instance_npcname("#fac1bs")+"::OnStart"); + mapannounce(.@in_map$, _("Factory Announcement: Where did everyone go? How could you leave your post during the working hours!"), bc_map, 0xff8800, FW_NORMAL, 12); + for (.@i = 61; .@i < 90; ++.@i) + disablenpc(instance_npcname("alert#"+.@i)); + stopnpctimer(); + end; +} + +1@xm_d,71,129,3 script #fac1bs 4_M_COOKIE,{ + if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY), 2)) { + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == COOKIE_XMAS) { + mes("[Factory Manager]"); + mes("Get your asses into the work! There are children still waiting for their presents!"); + next(); + mes("[Factory Manager]"); + mes("Pick up the ^ff0000Gift box^000000 there and proceed to the end of the eastern production belt quickly! Be careful, it's large and heavy!"); + donpcevent(instance_npcname("#pck1")+"::OnStart"); + npctalk(_("Factory Manager: Pick up the Gift box there and proceed to the end of the eastern production belt quickly! Be careful, it's large and heavy!")); + close(); + } else if (.@emt_chk == MYSTCASE) { + mes("[Factory Manager]"); + mes("Do not sit on the production belt! You have to put the box on the belt and guide it towards the end!"); + close(); + } else { + mes("[Factory Manager]"); + mes("Oh no! Humans!!"); + donpcevent(instance_npcname("#fac1bs")+"::OnAlert"); + close(); + } + } + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac1bs")); + end; + +OnStart: + enablenpc(instance_npcname("#fac1bs")); + end; + +OnAlert: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac1bs"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + enablenpc(.@in_npc$); + npctalk(_("Factory Manager: Officers! Officers!! There are humans here!!!")); + sleep(3000); + disablenpc(.@in_npc$); + areamonster(.@in_map$, 61, 118, 71, 128, "Toy Factory Guard", XM_CRUISER, 11, .@in_npc$+"::OnMyMobDead"); + initnpctimer(); + end; + +OnTimer60000: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac1bs"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + donpcevent(.@in_npc$+"::OnStart"); + npctalk(_("Factory Manager: Are the humans gone? They've been appearing very often lately!")); + stopnpctimer(); + end; + +OnMyMobDead: + end; +} + +1@xm_d,65,127,6 script #pck1 4_NONMYSTCASE,{ + progressbar("0xffff00", 1); + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == COOKIE_XMAS) { + mes("^0000ffYou picked up the gift box. Your vision is limited due to the size of the box.^000000"); + montransform(MYSTCASE, 180000); + close(); + } else if (.@emt_chk == MYSTCASE) { + mes("^009900You've already picked up the gift box. You cannot pick up more than 1.^000000"); + close(); + } else { + mes("^ff0000You cannot pick up the gift box without the Factory Uniform.^000000"); + close(); + } + end; + +OnInstanceInit: + disablenpc(instance_npcname("#pck1")); + end; + +OnStart: + enablenpc(instance_npcname("#pck1")); + end; +} + +1@xm_d,76,129,0 script #fac1wp WARPNPC,2,2,{ + end; + +OnTouch_: + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == MYSTCASE) { + warp(instance_mapname("1@xm_d"), 88, 129); + playbgm("54"); + } + end; +} + +1@xm_d,79,129,0 script #fac1wp2 WARPNPC,2,2,{ + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 73, 129); + end; +} + +1@xm_d,179,129,0 script #fac2wp WARPNPC,2,2,{ + end; + +OnTouch_: + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == MYSTCASE) { + warp(instance_mapname("1@xm_d"), 183, 100); + playbgm("54"); + } + end; +} + +1@xm_d,184,109,0 script #fac2wp2 WARPNPC,2,2,{ + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 170, 129); + end; +} + +1@xm_d,1,5,3 script #alert1 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#alert1")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + switch (rand(1, 10)) { + case 1: + mapannounce(.@in_map$, _("Factory Announcement: Intruders detected! Officers! Prepare to sortie!"), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 2: + mapannounce(.@in_map$, _("Factory Announcement: Intruders found, Code number AX0829, Type, Human. Seek and destroy."), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 3: + mapannounce(.@in_map$, _("Officer Announcement: Non-employees are required to leave the factory premises now."), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 4: + mapannounce(.@in_map$, _("Factory Announcement: All intruders, please surrender immediately or we shall shoot on sight."), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 5: + mapannounce(.@in_map$, _("Factory Announcement: Officers! Apprehend all intruders!"), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 6: + mapannounce(.@in_map$, _("Warning: The Factory Manager is coming for an inspection. Kill all intruders quickly!"), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 7: + mapannounce(.@in_map$, _("Factory Announcement: Foreign lifeform detected. Officers deployed."), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 8: + mapannounce(.@in_map$, _("Factory Announcement: Intruders will hinder our ability to work to deliver toys to those children! Kill them!"), bc_map, C_AQUA, FW_NORMAL, 12); + break; + case 9: + mapannounce(.@in_map$, _("Factory Announcement: Hopefully those intruders are not humans. Or else they'll be killed on sight."), bc_map, C_AQUA, FW_NORMAL, 12); + break; + default: + mapannounce(.@in_map$, _("Officer Announcement: Intruders found! It seems like they are humans! Kill them all!"), bc_map, C_YELLOW, FW_NORMAL, 12); + break; + } + end; +} + +//-------Area 2-------- + +1@xm_d,185,100,6 script Catherine Zeta Jones#2 4_F_SKULL06GIRL,{ + if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY), 2)) { + mes("[Catherine Zeta Jones]"); + mes("Phew.. L..Luckily we survived through that, let me sort my t..thoughts for the moment."); + npctalk(_("Catherine Zeta Jones: Phew.. L..Luckily we survived through that, let me sort my t..thoughts for the moment.")); + next(); + switch (select("Cancel conversation", "Listen to her strategy", "Let's go now!")) { + case 1: + mes("[Catherine Zeta Jones]"); + mes("Talk to me w..when you're ready."); + close(); + case 2: + donpcevent(instance_npcname("Catherine Zeta Jones#21")+"::OnStart"); + close(); + case 3: + donpcevent(instance_npcname("Catherine Zeta Jones#21")+"::OnStart2"); + close(); + } + } else { + mes("[Catherine Zeta Jones]"); + mes("P..please wait while I am talking to the person in charge."); + close(); + } + end; +} + +1@xm_d,185,100,0 script #bgm06 HIDDEN_WARP_NPC,9,9,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bgm06")); + end; + +OnTouch_: + playbgm("99"); + end; +} + +1@xm_d,185,100,6 script Catherine Zeta Jones#21 4_F_SKULL06GIRL,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("Catherine Zeta Jones#21")); + end; + +OnStart: + enablenpc(instance_npcname("#bgm06")); + enablenpc(instance_npcname("Catherine Zeta Jones#21")); + disablenpc(instance_npcname("Catherine Zeta Jones#2")); + sleep(3000); + npctalk(_("Catherine Zeta Jones: This was once where the w..workers wrapped all the presents..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: It used t..to be filled with people, now it's d..desolated.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: When I w..walked past here, I remember there were not only toy workers, but souls of k..kids lingering around too..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: Just like t..those spirits of hatred and regrets..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: P..Please help them move on to their n..next life if you happen to bump into any one of t..them..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: If you meet any toy workers on t..the way, p..please ask them how to Toy Maker is doing..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: P..perhaps if we are able to awaken the memories of the Toy Maker, we could help everyone m..move along..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: P..please look around for any clues.. I'll head to where he spent his last m..moments.")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: Turns out that I received m..more help than I offered to help.. We'll meet again later.")); + sleep(6000); + disablenpc(instance_npcname("Catherine Zeta Jones#21")); + donpcevent(instance_npcname("Factory Uniform Box#4")+"::OnStart"); + donpcevent(instance_npcname("#fac2ct")+"::OnStart"); + for (.@i = 1; .@i < 11; ++.@i) + enablenpc(instance_npcname("Worker#"+.@i)); + disablenpc(instance_npcname("#bgm06")); + end; + +OnStart2: + enablenpc(instance_npcname("#bgm06")); + enablenpc(instance_npcname("Catherine Zeta Jones#21")); + disablenpc(instance_npcname("Catherine Zeta Jones#2")); + sleep(3000); + npctalk(_("Catherine Zeta Jones: P..please look around for any clues.. I'll head to where he spent his last m..moments.")); + sleep(6000); + disablenpc(instance_npcname("Catherine Zeta Jones#21")); + donpcevent(instance_npcname("Factory Uniform Box#4")+"::OnStart"); + donpcevent(instance_npcname("#fac2ct")+"::OnStart"); + for (.@i = 1; .@i <= 10; ++.@i) + enablenpc(instance_npcname("Worker#"+.@i)); + disablenpc(instance_npcname("#bgm06")); + end; +} + +1@xm_d,185,94,6 script Factory Uniform Box#4 4_NONMYSTCASE,{ + progressbar("0xffff00", 1); + playbgm("128"); + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == COOKIE_XMAS || .@emt_chk == MYSTCASE || .@emt_chk < 1) { + mes("^0000ffYou've changed into the factory uniform. You can come back here to change again everytime the production starts.^000000"); + montransform(COOKIE_XMAS, 300000); + close(); + } else { + mes("^ff0000Changing.."); + mes("You cannot change into the factory uniform again while changing. Please wait till the effect disappears and try again.^000000"); + close(); + } + end; + +OnInstanceInit: + disablenpc(instance_npcname("Factory Uniform Box#4")); + end; + +OnStart: + enablenpc(instance_npcname("Factory Uniform Box#4")); + end; +} + +1@xm_d,1,5,3 script #fac2ct CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac2ct")); + end; + +OnEnd: + killmonster(instance_mapname("1@xm_d"), instance_npcname("#fac2ct")+"::OnMyMobDead"); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac2ct"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "Malicious Baby Ghost", XM_HYLOZOIST, 19, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "Evil Dwelling Box", XM_MYSTCASE, 16, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 22, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "Creepy Demon", XM_LUDE, 16, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + end; +} + +1@xm_d,130,178,0 script #fac3wp WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac3wp")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 130, 193); + end; +} + +1@xm_d,130,184,0 script #fac3wp2 WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac3wp2")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 129, 173); + end; +} + +1@xm_d,1,2,3 script #fac2wpc CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac2wpc")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + if ('fac_open >= 10) { + enablenpc(instance_npcname("#fac3wp")); + enablenpc(instance_npcname("#fac3wp2")); + donpcevent(instance_npcname("#fac2ct")+"::OnEnd"); + mapannounce(.@in_map$, _("Factory Announcement: All workers at the sorting department have knocked off. Power down the electricity and open the doors to their resting quarters."), bc_map, 0x00ff44, FW_NORMAL, 12); + for (.@i = 90; .@i < 105; ++.@i) { + disablenpc(instance_npcname("alert#"+.@i)); + } + deletearray 'worker_off; + } else { + mapannounce(.@in_map$, sprintf(_$("Factory Announcement: %d hardworking workers left. Keep up the good work!"), (10 - 'fac_open)), bc_map, 0x00ff44, FW_NORMAL, 12); + } + end; +} + +1@xm_d,155,98,3 script Worker#1 4_M_COOKIE,{ + .@emt_chk = getstatus(SC_MONSTER_TRANSFORM, 1); + if (.@emt_chk == COOKIE_XMAS) { + mes("[Worker]"); + mes("Hmm? Is there a problem?"); + next(); + if (select("Nothing", "Do you know anything about the Toy Maker?") == 1) { + mes("[Worker]"); + mes("I'm busy now. Please don't talk to me."); + close(); + } + .@char_id = getcharid(CHAR_ID_ACCOUNT); + close2(); + .@i = atoi(strnpcinfo(NPC_NAME_HIDDEN)); + if ('worker_off[.@i] == 1) + end; + setarray('worker_off[.@i], 1); + setpcblock(PCBLOCK_MOVE, true, getcharid(3)); + switch (.@i) { + case 1: + setarray(.@s$[0], _("Worker: Ohh did you mean that old man? He's a really kind person! He maintained out bodies well."), _("Worker: If only he were still alive.")); + break; + case 2: + setarray(.@s$[0], _("Worker: What? You thought that Kimi killed the Toy Maker? NO! She wanted to save him!"), _("Worker: Ahh.. But why.. why is my body..")); + break; + case 3: + setarray(.@s$[0], _("Worker: The Toy Maker had some heart issues.. His heart started failing on him on the day he passed away.. Kimi was trying to save him."), _("Worker: Ahh.. But what did you do to my body.. I feel weird..")); + break; + case 4: + setarray(.@s$[0], _("Worker: When the Toy Maker took his last breath, Kimi stood there staring without any expressions."), _("Worker: As if she gave up on her soul.. But I.. How did I turn out like this?")); + break; + case 5: + setarray(.@s$[0], _("Worker: Kimi the poor girl, blamed herself for the Toy Maker's death because she thought the Toy Maker was frightened by her appearance."), _("Worker: But the truth is the Toy Maker was so delighted to see Kimi move!")); + break; + case 6: + setarray(.@s$[0], _("Worker: Being able to see the Toy Maker's delighted expression was the first thing Kimi saw as she came to life."), _("Worker: But that was also the last time she saw him..")); + break; + case 7: + setarray(.@s$[0], _("Worker: It is rumoured that Kimi even heard the Toy Maker's voice even before she came to life!"), _("Worker: Perhaps it was the Toy Maker's unwavering love that made Kimi move? I feel a little drowsy now..")); + break; + case 8: + setarray(.@s$[0], _("Worker: The Toy Maker is a great guy! Kimi is a poor little girl! Kimi loves the Toy Maker! I'm sad that the Toy Maker passed away..")); + break; + case 9: + setarray(.@s$[0], _("Worker: The truth is that the Toy Maker was too excited when he saw Kimi open her eyes."), _("Worker: It feels like my body is floating in the air.. Weird")); + break; + case 10: + setarray(.@s$[0], _("Worker: Kimi didn't kill the Toy Maker! Kimi wanted to save him! Everyone one is afraid of Kimi! Kimi is a good girl! She's a good kid!"), _("Worker: I miss you gramps.. come back..")); + break; + } + npctalk(.@s$[0]); + sleep(3000); + if (strnpcinfo(NPC_NAME_HIDDEN) != "8") { + npctalk(.@s$[1]); + sleep2(3000); + } + 'fac_open += 1; + donpcevent(instance_npcname(strnpcinfo(NPC_NAME))+"::OnStart"); + setpcblock(PCBLOCK_MOVE, false, getcharid(3)); + end; + } else { + mes("[Worker]"); + mes((strnpcinfo(NPC_NAME_HIDDEN) != "1" ? _("What? Aren't you my companion!?") : _("!! Aren't you the same as I am!?"))); + donpcevent(instance_npcname(strnpcinfo(NPC_NAME))+"::OnAlert"); + close(); + } + end; + +OnInstanceInit: + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + end; + +OnStart: + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + donpcevent(instance_npcname("#fac2wpc")+"::OnStart"); + end; + +OnAlert: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname(strnpcinfo(NPC_NAME)); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + enablenpc(.@in_npc$); + npctalk(strnpcinfo(NPC_NAME_HIDDEN) != "8" ? _("Worker: Officers! Where are the Officers!? There're humans here!") : _("Worker: Officers! Officers!!")); + sleep(3000); + disablenpc(.@in_npc$); + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_NPC); + switch (atoi(strnpcinfo(NPC_NAME_HIDDEN))) { + case 9: + setarray(.@xy[0], 225, 19, 241, 35); + break; + case 10: + setarray(.@xy[0], 201, 19, 217, 35); + break; + default: + setarray(.@xy[0], .@mapx - 8, .@mapy - 8, .@mapx + 8, .@mapy + 8); + break; + } + areamonster(.@in_map$, .@xy[0], .@xy[1], .@xy[2], .@xy[3], "Corrupt Cruiser", XM_CRUISER, 21, .@in_npc$+"::OnMyMobDead"); + donpcevent(.@in_npc$+"::OnStart"); + initnpctimer(); + end; + +OnTimer60000: + killmonster(instance_mapname("1@xm_d"), instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); + if (strnpcinfo(NPC_NAME_HIDDEN) == "1") + npctalk(_("Worker: I almost died there.. Those humans are scary!")); + stopnpctimer(); + end; + +OnMyMobDead: + 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 + +1@xm_d,131,208,0 script #bgm04 HIDDEN_WARP_NPC,9,9,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bgm04")); + end; + +OnTouch_: + playbgm("54"); + end; +} + +1@xm_d,131,208,0 script #bgm05 HIDDEN_WARP_NPC,9,9,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bgm05")); + end; + +OnTouch_: + playbgm("105"); + end; +} + +1@xm_d,131,208,0 script Captured Santa#2 4_M_SANTA,10,10,{ + if (getstatus(SC_MONSTER_TRANSFORM, 1) < 1) { + mes("[Captured Santa]"); + mes("Hey! Are you a human!? Please help me untie this rope!"); + next(); + if (select("Cancel conversation", "Untie the rope") == 1) { + mes("[Captured Santa]"); + mes("This world is cruel.. I should consider retiring.."); + close(); + } + close2(); + donpcevent(instance_npcname("Captured Santa#2")+"::OnAlert"); + end; + } else { + mes("[Captured Santa]"); + mes("Are you a worker here?! Can you convince Antonio for me?"); + next(); + mes("^0000ffIt seems that Santa thinks that you're a worker here. Talk to him once again when the transformation disappears.^000000"); + close(); + } + end; + +OnAlert: + disablenpc(instance_npcname("Captured Santa#2")); + enablenpc(instance_npcname("Captured Santa#3")); + donpcevent(instance_npcname("Antonio#1")+"::OnStart"); + enablenpc(instance_npcname("#bgm04")); + end; + +OnTouch: + initnpctimer(); + end; + +OnTimer1000: + npctalk(_("Captured Santa: Antonio! You bugger! Untie me now!!")); + stopnpctimer(); + end; +} + +1@xm_d,131,208,0, script Captured Santa#3 4_M_SANTA,{ + mes("[Captured Santa]"); + mes("Even though this factory is long abandoned, that doesn't mean you could take the stuff without permission, does it?"); + close(); + +OnInstanceInit: + disablenpc(instance_npcname("Captured Santa#3")); + end; +} + +1@xm_d,131,213,4 script Antonio#1 4_M_ANTONIO,{ + mes("[Antonio]"); + mes("Shut your trap Santa."); + close(); + +OnStart: + .@gl_npc2$ = instance_npcname("Captured Santa#3"); + .@in_map$ = instance_mapname("1@xm_d"); + sleep(3000); + npctalk(_("Antonio: Let me tell you geezer, I LIKE THIS FACTORY AS IT IS.")); + sleep(3000); + npctalk(_("Antonio: The boss isn't around and there's a bunch of toys that LOVE me.")); + sleep(3000); + npctalk(_("Captured Santa: You ignorant fool! I knew you would start stealing once the boss isn't around!"), .@gl_npc2$); + sleep(4000); + npctalk(_("Antonio: I am just taking what others don't want. Is it such a big deal? I don't see your point, geezer.")); + sleep(4000); + npctalk(_("Captured Santa: Sigh.. Did you think about how those children would feel when they open the presents?"), .@gl_npc2$); + sleep(4000); + npctalk(_("Captured Santa: Would they be happy if they knew the presents were made from stolen goods?"), .@gl_npc2$); + sleep(4000); + npctalk(_("Antonio: Hmm... ")); + sleep(2000); + npctalk(_("Antonio: I'd still feel happy! Because it's still a present!!!")); + sleep(5000); + npctalk(_("Captured Santa: The point is not the present! It's about stealing! Stop it right now Antonio!"), .@gl_npc2$); + sleep(5000); + mapannounce(.@in_map$, _("Factory Announcement: The third area is now ready to deliver the presents."), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(5000); + mapannounce(.@in_map$, _("Factory Announcement: May I have the delivery workers on stand by."), bc_map, 0x00ff44, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Antonio: Ha! The presents should be piling by now! It's going to be a PARTY TODAY!")); + sleep(4000); + npctalk(_("Antonio: Human! If you'd like to lend me a hand you can follow me~")); + sleep(4000); + disablenpc(instance_npcname("Antonio#1")); + sleep(2000); + npctalk(_("Captured Santa: What an ignorant fool indeed.."), .@gl_npc2$); + sleep(4000); + npctalk(_("Captured Santa: Can you please drive Antonio away?"), .@gl_npc2$); + sleep(5000); + npctalk(_("Captured Santa: Stealing is not right!"), .@gl_npc2$); + 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; +} + +//-------Area 3-------- + +1@xm_d,107,208,0 script #fac4wp WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac4wp")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 87, 208); + end; +} + +1@xm_d,95,208,0 script #fac4wp2 WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac4wp2")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 115, 208); + end; +} + +1@xm_d,1,5,3 script #fac3ct CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac3ct")); + end; + +OnEnd: + killmonster(instance_mapname("1@xm_d"), instance_npcname("#fac3ct")+"::OnMyMobDead"); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac3ct"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "Dancing Marionette", XM_MARIONETTE, 37, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "Decorated Evil Tree", XM_TREE, 31, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 43, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "Creepy Demon", XM_LUDE, 31, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + end; +} + +1@xm_d,1,5,3 script #fac3ct2 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac3ct2")); + end; + +OnEnd: + killmonster(instance_mapname("1@xm_d"), instance_npcname("#fac3ct2")+"::OnMyMobDead"); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac3ct2"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "Malicious Baby Ghost", XM_HYLOZOIST, 13, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "Decorated Evil Tree", XM_TREE, 11, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 15, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "Creepy Demon", XM_LUDE, 11, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + end; +} + +1@xm_d,1,5,3 script #fac3ct3 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac3ct3")); + end; + +OnStart: + enablenpc(instance_npcname("#fac3ct3")); + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#fac3ct3"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); // Custom check to prevent abuse. + // Aegis used wrong Antonio Id. Changed from ANTONIO to XM_ANTONIO + if (rand(1, 10) > 3) + 'antonio_gid = areamonster(.@in_map$, 13, 144, 121, 248, "Wicked Vice Plant Manager", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); + else + 'antonio_gid = areamonster(.@in_map$, 159, 215, 241, 247, "Wicked Vice Plant Manager", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); + end; + +OnEnd: + .@in_map$ = instance_mapname("1@xm_d"); + killmonster(.@in_map$, instance_npcname("#fac3ct3")+"::OnMyMobDead"); + donpcevent(instance_npcname("#fac3ct")+"::OnEnd"); + donpcevent(instance_npcname("#fac3ct2")+"::OnEnd"); + donpcevent(instance_npcname("#finalbs")+"::OnStart"); + disablenpc(instance_npcname("Captured Santa#3")); + mapannounce(.@in_map$, _("???: Leave at once, and no harm will be inflicted upon you."), bc_map, 0xff8800, FW_NORMAL, 12); + stopnpctimer(); + end; + +OnMyMobDead: + .@mob_dead_num = mobcount(instance_mapname("1@xm_d"), instance_npcname("#fac3ct3")+"::OnMyMobDead"); + if (.@mob_dead_num < 1) + initnpctimer(); + end; + +OnTimer1000: + donpcevent(instance_npcname("#fac3ct3")+"::OnEnd"); + end; +} + +//-------- Final Battle ------- + +1@xm_d,1,5,3 script #finalbs CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#finalbs")); + end; + +OnStart: + enablenpc(instance_npcname("Catherine Zeta Jones#5")); + enablenpc(instance_npcname("Celine Kimi#0")); + enablenpc(instance_npcname("#fac5wp")); + enablenpc(instance_npcname("#jeton1")); + end; +} + +1@xm_d,152,208,0 script #fac5wp WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac5wp")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 167, 208); + end; +} + +1@xm_d,160,208,0 script #fac5wp2 WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac5wp2")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 145, 208); + end; +} + +1@xm_d,233,183,3 script Celine Kimi#0 4_F_KIMI,{ + mes("[Celine Kimi]"); + mes("Did you come to cause trouble? Humans always wreak havoc wherever they go!"); + close(); + +OnInstanceInit: + disablenpc(instance_npcname("Celine Kimi#0")); + end; +} + +1@xm_d,222,183,0 script #jeton1 HIDDEN_WARP_NPC,7,7,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#jeton1")); + end; + +OnTouch: + disablenpc(instance_npcname("#jeton1")); + donpcevent(instance_npcname("Catherine Zeta Jones#5")+"::OnStart"); + enablenpc(instance_npcname("#bgm02")); + end; +} + +1@xm_d,222,183,0 script #bgm02 HIDDEN_WARP_NPC,9,9,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bgm02")); + end; + +OnTouch_: + playbgm("101"); + end; +} + +1@xm_d,222,183,6 script Catherine Zeta Jones#5 4_F_SKULL06GIRL,{ + mes("[Catherine Zeta Jones]"); + mes("B..Be careful.. Kimi doesn't seem normal.."); + close(); + +OnInstanceInit: + disablenpc(instance_npcname("Catherine Zeta Jones#5")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@gl_npc2$ = instance_npcname("Celine Kimi#0"); + sleep(2000); + npctalk(_("Catherine Zeta Jones: K..kimi! Listen to me! The truth is I don't resent you!")); + sleep(3000); + npctalk(_("Celine Kimi: Everyone hates me! Being a puppet with this horrible face! You are one of them too aren't you?"), .@gl_npc2$); + sleep(4000); + npctalk(_("Catherine Zeta Jones: Kimi! I've heard all the p..previous worker's confession! The Toy Maker loved you the most out of all the toys he made!")); + sleep(4000); + mapannounce(.@in_map$, _("Echo from the shadows: LIAR!!"), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(1000); + npctalk(_("Celine Kimi: It's true.. I didn't lie!"), .@gl_npc2$); + sleep(4000); + npctalk(_("Celine Kimi: Why don't you call my name gramps! [Kimi] [Kimi!] wants to hear you call her name!"), .@gl_npc2$); + sleep(4000); + mapannounce(.@in_map$, _("Echo from the shadows: Yes Kimi, there's nothing wrong about what happened that day! HE WAS FRIGHTENED TO DEATH BY YOUR VERY FACE."), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: D..don't listen to him Kimi! The Toy Maker really loved you!")); + sleep(3000); + npctalk(_("Celine Kimi: Did he really love me?.."), .@gl_npc2$); + sleep(3000); + npctalk(_("Catherine Zeta Jones: No doubt about it.. He w..was really delighted to see you come to life!")); + sleep(1000); + mapannounce(.@in_map$, _("Echo from the shadows: He was frightened! You made him die!"), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Celine Kimi: I.. killed.. Him?"), .@gl_npc2$); + sleep(2000); + npctalk(_("Catherine Zeta Jones: No Kimi! Everyone is m..mistaken! The Toy Maker had heart issues from the start!")); + sleep(3000); + npctalk(_("Celine Kimi: Was it me that killed him..."), .@gl_npc2$); + sleep(2000); + mapannounce(.@in_map$, _("Echo from the shadows: Look at you Kimi! Why don't you take a look at yourself in the mirror~?"), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Celine Kimi: It's...... me... This... is... me..."), .@gl_npc2$); + sleep(1000); + mapannounce(.@in_map$, _("Echo from the shadows: Aren't you frightening Kimi? Do you think anyone would still love you with that look?~"), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Celine Kimi: It's all my fault.."), .@gl_npc2$); + specialeffect(EF_MAPPILLAR2, AREA, .@gl_npc2$); + sleep(3000); + npctalk(_("Catherine Zeta Jones: Oh no.. Kimi is about to collapse! W..we can't stand here idly and do nothing!")); + specialeffect(EF_MAPPILLAR2, AREA, .@gl_npc2$); + sleep(1000); + mapannounce(.@in_map$, _("Echo from the shadows: Yes.. Resent yourself~ Give in to your hatred~ No one will feel sorry for you Kimi~"), bc_map, 0xff8800, FW_NORMAL, 12); + sleep(3000); + npctalk(_("Catherine Zeta Jones: W.. we can't let the factory close down just like that! I'll go l..look for an exit!")); + sleep(3000); + disablenpc(instance_npcname("Catherine Zeta Jones#5")); + sleep(2000); + disablenpc(instance_npcname("Celine Kimi#0")); + donpcevent(instance_npcname("#finalbs2")+"::OnStart"); + disablenpc(instance_npcname("#bgm02")); + end; +} + +1@xm_d,216,193,3 script #eff_f01 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#eff_f01")); + end; + +OnStart: + for (.@i = 1; .@i < 10; ++.@i) + specialeffect(EF_HEARTCASTING, AREA, instance_npcname("#eff_f0"+.@i)); + end; +} + +1@xm_d,226,193,3 script #eff_f02 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + 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; + +OnInstanceInit: + disablenpc(instance_npcname("#bssk01")); + end; + +OnStart: + .@bssk_r = rand(1, 3); + if (.@bssk_r == 1) + donpcevent(instance_npcname("#bssk02")+"::OnStart"); + else if (.@bssk_r == 2) + donpcevent(instance_npcname("#bssk03")+"::OnStart"); + end; +} + +1@xm_d,1,5,3 script #bssk02 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bssk02")); + end; + +OnStart: + donpcevent(instance_npcname("#finalbs2")+"::OnTalk_1"); + donpcevent(instance_npcname("#crssk1")+"::OnStart"); + donpcevent(instance_npcname("#crssk2")+"::OnStart"); + donpcevent(instance_npcname("#crssk3")+"::OnStart"); + donpcevent(instance_npcname("#crssk4")+"::OnStart"); + end; +} + +1@xm_d,1,5,3 script #bssk03 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bssk03")); + donpcevent(instance_npcname("#finalbs2")+"::OnTalk_1"); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#bssk03"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + for (.@i = 0; .@i < 22; ++.@i) { + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_MOB, 'xm_celine_gid); + .@x = .@mapx + rand(-9, 10); + .@y = .@mapy + rand(-9, 10); + monster(.@in_map$, .@x, .@y, "#f_w_1", HIDDEN_MOB7, 1, .@in_npc$+"::OnMyMobDead"); + sleep(200); + } + sleep(6000); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + end; +} + +1@xm_d,1,5,3 script #crssk1 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#crssk1")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + .@in_npc$ = instance_npcname("#crssk1"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_MOB, 'xm_celine_gid); + while (.@mapx >= 211 && .@mapx <= 241 && .@mapy >= 166 && .@mapy <= 201) { + switch (atoi(charat(strnpcinfo(NPC_NAME_HIDDEN), 5))) { + case 1: + .@mapx += 2; + .@mapy += rand(-1, 1); + break; + case 2: + .@mapx -= 2; + .@mapy += rand(-1, 1); + break; + case 3: + .@mapy += 2; + .@mapx += rand(-1, 1); + break; + case 4: + .@mapy -= 2; + .@mapx += rand(-1, 1); + break; + } + monster(.@in_map$, .@mapx, .@mapy, "#f_w_1", HIDDEN_MOB7, 1, .@in_npc$+"::OnMyMobDead"); + sleep(200); + } + sleep(6000); + .@in_map$ = instance_mapname("1@xm_d"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + end; + +OnMyMobDead: + 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 HIDDEN_WARP_NPC,7,7,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#kimion1")); + end; + +OnTouch: + disablenpc(instance_npcname("#kimion1")); + donpcevent(instance_npcname("Celine Kimi#2")+"::OnStart"); + end; +} + +1@xm_d,233,183,3 script Celine Kimi#2 4_F_KIMI,{ + mes("[Celine Kimi]"); + mes("Did you come to dispose me too?"); + close(); + +OnInstanceInit: + disablenpc(instance_npcname("Celine Kimi#2")); + end; + +OnStart: + npctalk(_("Celine Kimi: Did you come to dispose me too?")); + specialeffect(EF_MAPPILLAR2); + sleep(5000); + disablenpc(instance_npcname("Celine Kimi#2")); + donpcevent(instance_npcname("#finalbs2")+"::OnStart"); + end; +} + +1@xm_d,228,183,0 script #bgm03 HIDDEN_WARP_NPC,25,25,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#bgm03")); + end; + +OnTouch_: + playbgm("123"); + end; +} + +1@xm_d,1,5,3 script #finalbs2 CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#finalbs2")); + end; + +OnFail: + stopnpctimer(); + killmonster(instance_mapname("1@xm_d"), instance_npcname("#finalbs2")+"::OnMyMobDead"); + enablenpc(instance_npcname("Celine Kimi#2")); + disablenpc(instance_npcname("#bgm03")); + enablenpc(instance_npcname("#kimion1")); + end; + +OnEnd: + stopnpctimer(); + killmonster(instance_mapname("1@xm_d"), instance_npcname("#finalbs2")+"::OnMyMobDead"); + disablenpc(instance_npcname("#bgm03")); + donpcevent(instance_npcname("#finalbs_e")+"::OnStart"); + end; + +OnTalk_1: + switch (rand(1, 10)) { + case 1: + unittalk('xm_celine_gid, _("I will burn you with the flames from hell!")); + break; + case 2: + unittalk('xm_celine_gid, _("Can you tolerate the heat?!")); + break; + case 3: + unittalk('xm_celine_gid, _("This wasn't my intention...")); + break; + case 4: + unittalk('xm_celine_gid, _("It will be burning hot! Let's see how long you can hold out!")); + break; + case 5: + unittalk('xm_celine_gid, _("Take your breath! This will be the last one you'll ever breathe again!")); + break; + case 6: + unittalk('xm_celine_gid, _("Actually I don't really like fire..")); + break; + default: + unittalk('xm_celine_gid, _("Why is everyone afraid of me!? What did I do wrong!?")); + break; + } + end; + +OnStart: + enablenpc(instance_npcname("#finalbs2")); + stopnpctimer(); + enablenpc(instance_npcname("#bgm03")); + disablenpc(instance_npcname("Celine Kimi#0")); + disablenpc(instance_npcname("Catherine Zeta Jones#5")); + .@in_map$ = instance_mapname("1@xm_d"); + .@gl_npc1$ = instance_npcname("#finalbs2"); + killmonster(.@in_map$, .@gl_npc1$+"::OnMyMobDead"); + 'xm_celine_gid = monster(.@in_map$, 231, 184, "Celine Kimi", XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); + 'g_xm_celine_gid = monster(.@in_map$, 226, 190, "Celine's Illusion", G_XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); + // setunitdata('xm_celine_gid, UDT_MAXHP, 20000000); + // setunitdata('g_xm_celine_gid, UDT_MAXHP, 20000000); + unittalk('xm_celine_gid, _("I don't want to be abandoned here!")); + initnpctimer(); + end; + +OnMyMobDead: + .@mob_dead_num = mobcount(instance_mapname("1@xm_d"), instance_npcname("#finalbs2")+"::OnMyMobDead"); + if (.@mob_dead_num < 1) + donpcevent(instance_npcname("#finalbs2")+"::OnEnd"); + end; + +OnTimer1000: + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_MOB, 'xm_celine_gid); + if (((.@mapx < 211 || .@mapx > 241) || (.@mapy < 166 || .@mapy > 201)) && (.@mapx || .@mapy)) { + mapannounce(instance_mapname("1@xm_d"), _("Celine Kimi's Scream: NO!! I must remain!"), bc_map, 0xff6666, FW_NORMAL, 15); + donpcevent(instance_npcname("#finalbs2")+"::OnFail"); + } + end; + +OnTimer5000: + donpcevent(instance_npcname("#bssk01")+"::OnStart"); + end; + +OnTimer10000: + .@in_map$ = instance_mapname("1@xm_d"); + .@mob_dead_num = mobcount(.@in_map$, instance_npcname("#finalbs2")+"::OnMyMobDead"); + if (.@mob_dead_num > 1) { + .@gl_npc1$ = instance_npcname("#finalbs2"); + // .@MOB_HP1 = getunitdata('xm_celine_gid, UDT_HP); + // .@MOB_HP2 = getunitdata('g_xm_celine_gid, UDT_HP); + if (.@MOB_HP1 > .@MOB_HP2) { + .@gp_hp = (.@MOB_HP1 - .@MOB_HP2); + if (.@gp_hp > 100000) { + .@set_bs_hp = ((.@gp_hp * 5) / 10); + .@MOB_HP3 = min(.@MOB_HP1 + .@set_bs_hp, 66666666); + // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + donpcevent(instance_npcname("#eff_f01")+"::OnStart"); + unittalk('xm_celine_gid, _("Let me heal you up!")); + sleep(1000); + mapannounce(.@in_map$, sprintf(_$("Celine Kimi healed herself and her illusion. %d HP."), .@set_bs_hp), bc_map, 0xff6666, FW_NORMAL, 12); + donpcevent(instance_npcname("#heal_c")+"::OnStart"); + } + } else if (.@MOB_HP2 > .@MOB_HP1) { + .@gp_hp = (.@MOB_HP2 - .@MOB_HP1); + if (.@gp_hp > 100000) { + .@set_bs_hp = ((.@gp_hp * 5) / 10); + .@MOB_HP3 = min(.@MOB_HP2 + .@set_bs_hp, 66666666); + // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + donpcevent(instance_npcname("#eff_f01")+"::OnStart"); + unittalk('g_xm_celine_gid, _("Let me restore you up!")); + sleep(1000); + mapannounce(.@in_map$, sprintf(_$("Celine Kimi's Illusion healed herself and her master. %d HP."), .@set_bs_hp), bc_map, 0xff6666, FW_NORMAL, 12); + donpcevent(instance_npcname("#heal_c")+"::OnStart"); + } + } + stopnpctimer(); + initnpctimer(); + } + end; +} + +1@xm_d,1,5,3 script #heal_c CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#heal_c")); + end; + +OnStart: + if (rand(1, 10) > 4) + initnpctimer(); + end; + +OnTimer3000: + mapannounce(instance_mapname("1@xm_d"), _("Don't let Celine Kimi distance herself too far away from her illusion!"), bc_map, 0xff6666, FW_NORMAL, 12); + stopnpctimer(); + end; +} + +1@xm_d,1,5,3 script #finalbs_e CLEAR_NPC,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#finalbs_e")); + end; + +OnStart: + .@in_map$ = instance_mapname("1@xm_d"); + mapannounce(.@in_map$, _("Celine Kimi's Scream: It's futile to defeat me! I'll just come back to life again and again!"), bc_map, 0xff6666, FW_NORMAL, 15); + enablenpc(instance_npcname("#fac6wp")); + enablenpc(instance_npcname("#jeton2")); + enablenpc(instance_npcname("Catherine Zeta Jones#6")); + for (.@i = 1; .@i <= 10; ++.@i) + enablenpc(instance_npcname("Gift Box#"+.@i)); + sleep(6000); + mapannounce(.@in_map$, _("Catherine Zeta Jones: P..please run towards the south exit!"), bc_map, C_YELLOW, FW_NORMAL, 12); + end; +} + +1@xm_d,205,159,0 script #fac6wp WARPNPC,2,2,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#fac6wp")); + end; + +OnTouch_: + warp(instance_mapname("1@xm_d"), 205, 147); + end; +} + +1@xm_d,218,145,0 script #jeton2 HIDDEN_WARP_NPC,4,4,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("#jeton1")); + end; + +OnTouch: + disablenpc(instance_npcname("#jeton2")); + donpcevent(instance_npcname("Catherine Zeta Jones#6")+"::OnStart"); + end; +} + +1@xm_d,218,150,5 script #exwp1 PORTAL,{ + mes("Do you want to leave?"); + next(); + if (select("Just a little while more", "Leave") == 1) { + mes("The machine stops operating."); + close(); + } + close2(); + warp("xmas", 233, 300); + end; + +OnInstanceInit: + disablenpc(instance_npcname("#exwp1")); + end; +} + +1@xm_d,218,145,5 script Catherine Zeta Jones#6 4_F_SKULL06GIRL,{ + end; + +OnInstanceInit: + disablenpc(instance_npcname("Catherine Zeta Jones#6")); + end; + +OnStart: + sleep(1000); + npctalk(_("Catherine Zeta Jones: It's a shame we d..didn't get to convince Kimi..")); + sleep(3000); + npctalk(_("Catherine Zeta Jones: W..what was the motive of that illusion..? W..why does it constantly try to hurt Kimi?")); + sleep(4000); + npctalk(_("Catherine Zeta Jones: Could it b..be that my appearance was a curse casted by them?")); + sleep(4000); + npctalk(_("Catherine Zeta Jones: B..but even though Kimi resents everyone, she still has unlingering feelings for this p..place.")); + sleep(6000); + npctalk(_("Catherine Zeta Jones: W..we should keep everything t..tidy so as to not disappoint Kimi's s..spirit once she returns..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: It's a relief t..that the truth is finally o..out.. If there's another chance to h..help Kimi move on to her next l..life.. Do let me k..know..")); + sleep(5000); + npctalk(_("Catherine Zeta Jones: I will open the exit n..now.. Please follow me!")); + sleep(3000); + disablenpc(instance_npcname("Catherine Zeta Jones#6")); + enablenpc(instance_npcname("#exwp1")); + end; +} + +1@xm_d,210,141,3 script Gift Box#1 4_TREASURE_BOX,{ + .@in_npc$ = instance_npcname(strnpcinfo(NPC_NAME)); + specialeffect(EF_COIN, AREA, .@in_npc$); + disablenpc(.@in_npc$); + initnpctimer(); + end; + +OnTimer1000: + switch (atoi(strnpcinfo(NPC_NAME_HIDDEN))) { + case 1: + .@idnum001 = rand(4, 8); + setarray(.@d_item[0], 150, 600, 900); + setarray(.@ItemDown[0], Gift_Box, Old_Violet_Box, Closedmind_Box); + break; + case 2: + .@idnum001 = rand(3, 7); + setarray(.@d_item[0], 400, 700, 950); + setarray(.@ItemDown[0], Old_Blue_Box, Old_Card_Album, Old_Parasol); + break; + case 3: + .@idnum001 = rand(2, 6); + setarray(.@d_item[0], 850, 800, 950); + setarray(.@ItemDown[0], Silver_Bullion, Magic_Card_Album, Shadow_Walk_); + break; + case 4: + .@idnum001 = rand(4, 8); + setarray(.@d_item[0], 700, 600, 900); + setarray(.@ItemDown[0], Gold_Bullion, Old_Violet_Box, Closedmind_Box); + break; + case 5: + .@idnum001 = rand(3, 7); + setarray(.@d_item[0], 150, 700, 950); + setarray(.@ItemDown[0], Gift_Box, Old_Card_Album, Red_Lantern); + break; + case 6: + .@idnum001 = rand(2, 6); + setarray(.@d_item[0], 400, 800, 950); + setarray(.@ItemDown[0], Old_Blue_Box, Magic_Card_Album, Hurt_Mind); + break; + case 7: + .@idnum001 = rand(4, 8); + setarray(.@d_item[0], 850, 600, 900); + setarray(.@ItemDown[0], Silver_Bullion, Old_Violet_Box, Closedmind_Box); + break; + case 8: + .@idnum001 = rand(3, 7); + setarray(.@d_item[0], 700, 700, 950); + setarray(.@ItemDown[0], Gold_Bullion, Old_Card_Album, KindHeart); + break; + case 9: + .@idnum001 = rand(2, 6); + setarray(.@d_item[0], 150, 800, 950); + setarray(.@ItemDown[0], Gift_Box, Magic_Card_Album, Lush_Rose); + break; + case 10: + .@idnum001 = rand(4, 8); + setarray(.@d_item[0], 400, 600, 900); + setarray(.@ItemDown[0], Old_Blue_Box, Old_Violet_Box, Closedmind_Box); + break; + } + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_NPC); + for (.@i = 0; .@i < .@idnum001; ++.@i) { + .@idx = rand(.@mapx - 2, .@mapx + 2); + .@idy = rand(.@mapy - 2, .@mapy + 2); + makeitem(Bloody_Coin, 1, .@mapname$, .@idx, .@idy); + } + for (.@i = 0; .@i < 3; ++.@i) { + .@x = .@mapx - 1 + .@i; + if (rand(1, 1000) > .@d_item[.@i]) + makeitem(.@ItemDown[.@i], 1, .@mapname$, .@x, .@mapy); + } + stopnpctimer(); + end; + +OnInstanceInit: + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + end; +} + +1@xm_d,214,141,3 duplicate(Gift Box#1) Gift Box#2 4_TREASURE_BOX +1@xm_d,218,141,3 duplicate(Gift Box#1) Gift Box#3 4_TREASURE_BOX +1@xm_d,222,141,3 duplicate(Gift Box#1) Gift Box#4 4_TREASURE_BOX +1@xm_d,226,141,3 duplicate(Gift Box#1) Gift Box#5 4_TREASURE_BOX +1@xm_d,210,136,3 duplicate(Gift Box#1) Gift Box#6 4_TREASURE_BOX +1@xm_d,214,136,3 duplicate(Gift Box#1) Gift Box#7 4_TREASURE_BOX +1@xm_d,218,136,3 duplicate(Gift Box#1) Gift Box#8 4_TREASURE_BOX +1@xm_d,222,136,3 duplicate(Gift Box#1) Gift Box#9 4_TREASURE_BOX +1@xm_d,226,136,3 duplicate(Gift Box#1) Gift Box#10 4_TREASURE_BOX + +//-------- Alert NPC ------------------------ + +1@xm_d,10,24,0 script alert#61 HIDDEN_WARP_NPC,10,10,{ + end; + +OnTouch: + if (getstatus(SC_MONSTER_TRANSFORM, 1) != COOKIE_XMAS) { + playbgm("125"); + .@in_npc$ = instance_npcname(strnpcinfo(NPC_NAME)); + specialeffect(EF_VENOMDUST, AREA, .@in_npc$); + donpcevent(instance_npcname("#alert1")+"::OnStart"); + disablenpc(.@in_npc$); + .@in_map$ = instance_mapname("1@xm_d"); + killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_NPC); + setarray(.@mon_num[0], 6, 5, 4, 6, 5, 4, 6, 5, 4, 6, 5, + 4, 6, 5, 6, 5, 6, 5, 4, 6, 5, 4, 6, 5, 4, 6, 5, 4, + 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5); + .@m = .@mon_num[atoi(strnpcinfo(NPC_NAME_HIDDEN))-61]; + areamonster(.@in_map$, .@mapx-5, .@mapy-5, .@mapx+5, .@mapx+5, "Toy Factory Guard", XM_CRUISER, .@m, .@in_npc$+"::OnMyMobDead"); + initnpctimer(); + } + end; + +OnTimer45000: + enablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + killmonster(instance_mapname("1@xm_d"), instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); + stopnpctimer(); + end; + +OnMyMobDead: + end; +} + +1@xm_d,30,24,0 duplicate(alert#61) alert#62 HIDDEN_WARP_NPC,10,10 +1@xm_d,50,24,0 duplicate(alert#61) alert#63 HIDDEN_WARP_NPC,10,10 +1@xm_d,70,24,0 duplicate(alert#61) alert#64 HIDDEN_WARP_NPC,10,10 +1@xm_d,90,24,0 duplicate(alert#61) alert#65 HIDDEN_WARP_NPC,10,10 +1@xm_d,10,44,0 duplicate(alert#61) alert#66 HIDDEN_WARP_NPC,10,10 +1@xm_d,30,44,0 duplicate(alert#61) alert#67 HIDDEN_WARP_NPC,10,10 +1@xm_d,50,44,0 duplicate(alert#61) alert#68 HIDDEN_WARP_NPC,10,10 +1@xm_d,70,44,0 duplicate(alert#61) alert#69 HIDDEN_WARP_NPC,10,10 +1@xm_d,90,44,0 duplicate(alert#61) alert#70 HIDDEN_WARP_NPC,10,10 +1@xm_d,110,44,0 duplicate(alert#61) alert#71 HIDDEN_WARP_NPC,10,10 +1@xm_d,10,64,0 duplicate(alert#61) alert#72 HIDDEN_WARP_NPC,10,10 +1@xm_d,30,64,0 duplicate(alert#61) alert#73 HIDDEN_WARP_NPC,10,10 +1@xm_d,50,64,0 duplicate(alert#61) alert#74 HIDDEN_WARP_NPC,10,10 +1@xm_d,70,64,0 duplicate(alert#61) alert#75 HIDDEN_WARP_NPC,10,10 +1@xm_d,90,64,0 duplicate(alert#61) alert#76 HIDDEN_WARP_NPC,10,10 +1@xm_d,110,64,0 duplicate(alert#61) alert#77 HIDDEN_WARP_NPC,10,10 +1@xm_d,10,84,0 duplicate(alert#61) alert#78 HIDDEN_WARP_NPC,10,10 +1@xm_d,30,84,0 duplicate(alert#61) alert#79 HIDDEN_WARP_NPC,10,10 +1@xm_d,50,84,0 duplicate(alert#61) alert#80 HIDDEN_WARP_NPC,10,10 +1@xm_d,70,84,0 duplicate(alert#61) alert#81 HIDDEN_WARP_NPC,10,10 +1@xm_d,90,84,0 duplicate(alert#61) alert#82 HIDDEN_WARP_NPC,10,10 +1@xm_d,110,84,0 duplicate(alert#61) alert#83 HIDDEN_WARP_NPC,10,10 +1@xm_d,10,104,0 duplicate(alert#61) alert#84 HIDDEN_WARP_NPC,10,10 +1@xm_d,30,104,0 duplicate(alert#61) alert#85 HIDDEN_WARP_NPC,10,10 +1@xm_d,50,104,0 duplicate(alert#61) alert#86 HIDDEN_WARP_NPC,10,10 +1@xm_d,70,104,0 duplicate(alert#61) alert#87 HIDDEN_WARP_NPC,10,10 +1@xm_d,90,104,0 duplicate(alert#61) alert#88 HIDDEN_WARP_NPC,10,10 +1@xm_d,110,104,0 duplicate(alert#61) alert#89 HIDDEN_WARP_NPC,10,10 +1@xm_d,155,20,0 duplicate(alert#61) alert#90 HIDDEN_WARP_NPC,10,10 +1@xm_d,180,50,0 duplicate(alert#61) alert#91 HIDDEN_WARP_NPC,10,10 +1@xm_d,205,80,0 duplicate(alert#61) alert#92 HIDDEN_WARP_NPC,10,10 +1@xm_d,230,110,0 duplicate(alert#61) alert#93 HIDDEN_WARP_NPC,10,10 +1@xm_d,180,20,0 duplicate(alert#61) alert#94 HIDDEN_WARP_NPC,10,10 +1@xm_d,180,50,0 duplicate(alert#61) alert#95 HIDDEN_WARP_NPC,10,10 +1@xm_d,180,80,0 duplicate(alert#61) alert#96 HIDDEN_WARP_NPC,10,10 +1@xm_d,205,20,0 duplicate(alert#61) alert#97 HIDDEN_WARP_NPC,10,10 +1@xm_d,205,50,0 duplicate(alert#61) alert#98 HIDDEN_WARP_NPC,10,10 +1@xm_d,205,80,0 duplicate(alert#61) alert#99 HIDDEN_WARP_NPC,10,10 +1@xm_d,205,110,0 duplicate(alert#61) alert#100 HIDDEN_WARP_NPC,10,10 +1@xm_d,230,20,0 duplicate(alert#61) alert#101 HIDDEN_WARP_NPC,10,10 +1@xm_d,230,50,0 duplicate(alert#61) alert#102 HIDDEN_WARP_NPC,10,10 +1@xm_d,230,80,0 duplicate(alert#61) alert#103 HIDDEN_WARP_NPC,10,10 +1@xm_d,230,110,0 duplicate(alert#61) alert#104 HIDDEN_WARP_NPC,10,10 + +//-------- NPC for GM Testing ------------------------ +/* +1@xm_d,1,1,3 script #adsw1 CLEAR_NPC,{ + mes("Please enter the password."); + if (callfunc("F_GM_NPC", 1854, 0) == 1) { + mes("[Time Keeper]"); + mes("Which point in time would you like to go back?"); + next(); + .@in_map$ = instance_mapname("1@xm_d"); + switch (select("Cancel", "1st Area Mission Complete", "2nd Area Mission Complete", "3rd Area Mission Complete", "4th Area Mission Complete", "BOSS Start", "BOSS End")) { + case 1: + break; + case 2: + montransform(COOKIE_XMAS, 1); + donpcevent(instance_npcname("#fac1bs")+"::OnStart"); + mapannounce(.@in_map$, _("Factory Manager Announcement: How could you leave your post during the working hours!"), bc_map, 0xff8800, FW_NORMAL, 12); + warp(.@in_map$, 70, 125); + break; + case 3: + for (.@i = 1; .@i < 11; ++.@i) + disablenpc(instance_npcname("Worker#"+.@i)); + enablenpc(instance_npcname("#fac3wp")); + enablenpc(instance_npcname("#fac3wp2")); + donpcevent(instance_npcname("#fac2ct")+"::OnEnd"); + mapannounce(.@in_map$, _("Factory Announcement: All workers at the sorting department have knocked off. Power down the electricity and open the doors to their resting quarters."), bc_map, 0x00ff44, FW_NORMAL, 12); + warp(.@in_map$, 131, 210); + break; + case 4: + donpcevent(instance_npcname("#fac3ct3")+"::OnEnd"); + warp(.@in_map$, 131, 210); + break; + case 5: + donpcevent(instance_npcname("#fac3ct")+"::OnEnd"); + donpcevent(instance_npcname("#fac3ct2")+"::OnEnd"); + donpcevent(instance_npcname("#finalbs")+"::OnStart"); + mapannounce(.@in_map$, _("??????: Leave at once, and no harm will be inflicted upon you."), bc_map, 0xff8800, FW_NORMAL, 12); + warp(.@in_map$, 215, 182); + break; + case 6: + donpcevent(instance_npcname("#finalbs2")+"::OnStart"); + warp(.@in_map$, 215, 182); + break; + case 7: + donpcevent(instance_npcname("#finalbs2")+"::OnEnd"); + warp(.@in_map$, 215, 182); + break; + } + } + close(); +} + +1@xm_d,3,1,3 script #adsw2 CLEAR_NPC,{ + mes("Please enter the password."); + if (callfunc("F_GM_NPC", 1854, 0) == 1) { + getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_MOB, 'antonio_gid); + mapannounce(instance_mapname("1@xm_d"), sprintf(_$("Factory Announcement: It's %d - %d"), .@mapx, .@mapy), bc_map, 0x00ff44, FW_NORMAL, 12); + } + close(); +} +*/ \ No newline at end of file diff --git a/npc/re/mapflag/zone.txt b/npc/re/mapflag/zone.txt index 24ffce6656d..e84ae8a261a 100644 --- a/npc/re/mapflag/zone.txt +++ b/npc/re/mapflag/zone.txt @@ -67,6 +67,9 @@ // Sara's Memory Instance =========== 1@sara mapflag zone Memorial Dungeon +// Horror Toy Factory =========== +1@xm_d mapflag zone Memorial Dungeon + // WoE:TE te_prt_gld mapflag zone WoE TE te_prtcas01 mapflag zone WoE TE diff --git a/npc/re/merchants/enchan_htf.txt b/npc/re/merchants/enchan_htf.txt new file mode 100644 index 00000000000..04ae0c9c6e6 --- /dev/null +++ b/npc/re/merchants/enchan_htf.txt @@ -0,0 +1,703 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2017 Hercules Dev Team +//= Copyright (C) Ridley +//= Copyright (C) Steph +//= Copyright (C) AtlantisRO +//= Copyright (C) Asheraf +//= Copyright (C) Zarbony +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see . +//========================================================================= +//= Horror Toy Factory Enchants +//================= Description =========================================== +//= Adds enchantments to many items in exchange for Bloody Coins. +//================= Current Version ======================================= +//= 1.0 +//========================================================================= + +xmas,240,291,3 script Billy The Golden Hands#1 4_F_05,{ + if (checkweight(Knife, 1) == 0) { + mes("You have too many items in your inventory! Please remove some items before coming back."); + close(); + } + if (MaxWeight - Weight < 10000) { + mes("Please reduce your inventory weight before coming back."); + close(); + } + disable_items(); + mes("[Billy The Golden Hands]"); + mes("Did you bring those bloody coins? If you enough of them, I'll sell you some items!"); + next(); + setarray(.@xm_item[0], Closedmind_Box, Lush_Rose, C_Lush_Rose, C_SantaHairband, C_Red_Bonnet, Old_Parasol, Hot_Tee, Sweet_Canape, Holy_Water, Water_Of_Darkness); + setarray(.@xm_bill[0], 100, 500, 1000, 500, 500, 1000, 7, 5, 1, 1); + for (.@i = 0; .@i < getarraysize(.@xm_item); ++.@i) + .@menulist$ += sprintf(_$("%s (%d Coins):"), getitemname(.@xm_item[.@i]), .@xm_bill[.@i]); + .@choice = select("Cancel", .@menulist$) - 2; + if (.@choice == -1) { + mes("[Billy The Golden Hands]"); + mes("I look forward to your visit next time."); + close(); + } + if (countitem(Bloody_Coin) >= .@xm_bill[.@choice]) { + mes("[Billy The Golden Hands]"); + mesf("^0000ff%s^000000 needs a total of ^0000ff%d^000000 bloody coins. Proceed?", getitemname(.@xm_item[.@choice]), .@xm_bill[.@choice]); + next(); + if (select("Cancel", "Buy") == 1) { + mes("[Billy The Golden Hands]"); + mes("You're a troublesome customer aren't you!? Come back once you've made up your mind!"); + close(); + } + if (countitem(Bloody_Coin) >= .@xm_bill[.@choice]) { + delitem(Bloody_Coin, .@xm_bill[.@choice]); + getitem(.@xm_item[.@choice], 1); + mes("[Billy The Golden Hands]"); + mes("Thank you for your patronage."); + close(); + } else { + mes("[Billy The Golden Hands]"); + mesf("^0000ff%s^000000 needs a total of ^0000ff%d^000000 Bloody Coins. You do not have enough!", getitemname(.@xm_item[.@choice]), .@xm_bill[.@choice]); + close(); + } + } else { + mes("[Billy The Golden Hands]"); + mesf("^0000ff%s^000000 needs a total of ^0000ff%d^000000 Bloody Coins. You do not have enough!", getitemname(.@xm_item[.@choice]), .@xm_bill[.@choice]); + close(); + } +} + +xmas,240,297,3 script Kain the Orphan#1 4_M_06,{ + if (checkweight(Knife, 1) == 0) { + mes("You have too many items in your inventory! Please remove some items before coming back."); + close(); + } + if (MaxWeight - Weight < 10000) { + mes("Please reduce your inventory weight before coming back."); + close(); + } + disable_items(); + mes("[Kain the Orphan]"); + mes("I can make you some nice items if you bring me the required materials."); + next(); + switch (select("I don't require them", "I want to make ^0000ffCeline's Ribbon^000000", "I want to make ^0000ffNoble Cross^000000", "I want to make ^0000ffEvil Spirit's Silk Glove^000000")) { + case 1: + mes("[Kain the Orphan]"); + mes("You should've said so earlier. Come back if you need them!"); + close(); + case 2: + mes("[Kain the Orphan]"); + mes("Woah, you sure have an eye for nice items."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffCeline's Ribbon^000000 requires a total of ^0000ff 1000 ^000000 Bloody Coins and ^0000ff Fresh Rose refined above Level 9 ^000000. Did you bring them?"); + next(); + if (select("I do not have them now.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("I'll repeat what I need. Remember to bring them to me."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffCeline's Ribbon^000000requires a total of ^0000ff 1000 ^000000 Bloody Coins and ^0000ff Fresh Rose refined above Level 9^000000!"); + close(); + } + mes("[Kain the Orphan]"); + mes("Do you wish to proceed? All current ^ff0000Refinement, Enchantments, Cards will be removed and there will not be a refund.^000000"); + next(); + if (select("Next time.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("A stubborn person indeed. Come back next time if you need anything."); + close(); + } + .@eq_num = EQI_HEAD_TOP; // Official script sets value to EQI_HEAD_LOW, but gear is EQI_HEAD_TOP in db. + if (getequipisidentify(.@eq_num) == 0) { + mes("[Kain the Orphan]"); + mes("You do not have anything equipped. Please equip the +9 Fresh Rose before coming back."); + close(); + } + if (getequipid(.@eq_num) != Lush_Rose) { + mes("[Kain the Orphan]"); + mes("What you have there is not a Fresh Rose! Make sure you have the right item!"); + close(); + } + if (getequiprefinerycnt(.@eq_num) < 9) { + mes("[Kain the Orphan]"); + mes("The Fresh Rose equipped does not meet the Level 9 refinement requirement."); + close(); + } + if (countitem(Bloody_Coin) > 999) { + delitem(Bloody_Coin, 1000); + delequip(.@eq_num); + getitem(Celines_Ribbon, 1); + mes("[Kain the Orphan]"); + mes("Transaction Completed."); + close(); + } else { + mes("[Kain the Orphan]"); + mes("You do not have 1000 Bloody Coins. Please reconfirm the amounts."); + close(); + } + break; + case 3: + mes("[Kain the Orphan]"); + mes("Woah, you sure have an eye for nice items."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffNoble Cross^000000 requires a total of ^0000ff 2000 ^000000 Bloody Coins and ^0000ff Grand Cross (1)^000000. Did you bring them?"); + next(); + if (select("I do not have them now.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("I'll repeat what I need. Remember to bring them to me."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffNoble Cross^000000 requires a total of ^0000ff 2000 ^000000 Bloody Coins and ^0000ff Grand Cross (1)^000000."); + close(); + } + mes("[Kain the Orphan]"); + mes("Do you wish to proceed? All current ^ff0000Refinement, Enchantments, Cards will be removed and there will not be a refund.^000000"); + next(); + if (select("Next time.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("A stubborn person indeed. Come back next time if you need anything."); + close(); + } + .@eq_num = EQI_HAND_R; + if (getequipisidentify(.@eq_num) == 0) { + mes("[Kain the Orphan]"); + mes("You do not have anything equipped on your right hand! Please equip Grand Cross (1) before coming back."); + close(); + } + if (getequipid(.@eq_num) != Grand_Cross_) { + mes("[Kain the Orphan]"); + mes("What you're holding on your right hand is not Grand Cross (1), bring what I need before coming back."); + close(); + } + if (countitem(Bloody_Coin) > 1999) { + delitem(Bloody_Coin, 2000); + delequip(.@eq_num); + getitem(Noble_Cross, 1); + mes("[Kain the Orphan]"); + mes("Transaction Completed."); + close(); + } else { + mes("[Kain the Orphan]"); + mes("You do not have 2000 Bloody Coins. Please reconfirm the amounts."); + close(); + } + break; + case 4: + mes("[Kain the Orphan]"); + mes("Woah, you sure have an eye for nice items."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffEvil Spirit's Silk Glove^000000 requires a total of ^0000ff 1000 ^000000 Bloody Coins and ^0000ff 1 Broken Heart, 1 Kind Heart, and 1 Red Lantern^000000. Do you have them?"); + next(); + if (select("I do not have them now.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("I'll repeat what I need. Remember to bring them to me."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffEvil Spirit's Silk Glove^000000 requires a total of ^0000ff 1000 ^000000 Bloody Coins and ^0000ff 1 Broken Heart, 1 Kind Heart, and 1 Red Lantern^000000."); + close(); + } + mes("[Kain the Orphan]"); + mes("Do you wish to proceed with the exchange? All current ^ff0000Refinement, Enchantments, Cards will be removed and there will not be a refund.^000000"); + next(); + if (select("Next time.", "Proceed with the exchange.") == 1) { + mes("[Kain the Orphan]"); + mes("A stubborn person indeed. Come back next time if you need anything."); + close(); + } + if (countitem(Bloody_Coin) > 999 && countitem(Hurt_Mind) > 0 && countitem(KindHeart) > 0 && countitem(Red_Lantern) > 0) { + delitem(Bloody_Coin, 1000); + delitem(Hurt_Mind, 1); + delitem(KindHeart, 1); + delitem(Red_Lantern, 1); + getitem(Evilspirit_Gloves, 1); + mes("[Kain the Orphan]"); + mes("Transaction Completed."); + close(); + } else { + mes("[Kain the Orphan]"); + mes("You did not bring the required materials."); + next(); + mes("[Kain the Orphan]"); + mes("^0000ffEvil Spirit's Silk Glove^000000 requires a total of ^0000ff 1000 ^000000 Bloody Coins and ^0000ff 1 Broken Heart, 1 Kind Heart, and 1 Red Lantern^000000."); + close(); + } + } +} + +xmas,240,294,3 script Bearded Joe#pa0829 4_M_05,{ + if (checkweight(Knife, 1) == 0) { + mes("You have too many items in your inventory! Please remove some items before coming back."); + close(); + } + if (MaxWeight - Weight < 10000) { + mes("Please reduce your inventory weight before coming back."); + close(); + } + disable_items(); + mes("[Bearded Joe]"); + mes("There's no limit to greed in human nature.. What do you need today?"); + next(); + setarray(.@eq_num[0], EQI_ACC_L, EQI_HAND_R, EQI_HEAD_TOP, EQI_SHOES); + .@s = select("What can you do?", "Enchant ^0000ffAccessory^000000 obtained from Toy Factory", "Enchant ^0000ffWeapon^000000 obtained from Toy Factory", "Enchant ^0000ffHeadgear^000000 obtained from Toy Factory", "Enchant ^0000ffShoes^000000 obtained from Toy Factory") - 2; + if (.@s == -1){ + mes("[Bearded Joe]"); + mes("Did you ask what I can do? It's pretty simple, just give me Bloody Coins and I will enchant your equipments obtained from the Toy Factory."); + next(); + mes("[Bearded Joe]"); + mes("Each enchant costs 15 Bloody coins. Every 15 coins will take up one slot and you can only enchant up to 3 times."); + next(); + mes("[Bearded Joe]"); + mes("As usual, the more you enchant, the higher the chances of breaking the equipment. I suggest enchanting only 1 or 2 times to be on the safe side. You have to learn how to be grateful with what you have."); + close(); + } + if (getequipisidentify(.@eq_num[.@s]) == 0) { + mes("[Bearded Joe]"); + mes("Did you unequip the equipment you want to enchant? Come back after you equip them."); + close(); + } + if (getequipisidentify(.@eq_num[.@s]) == 0) { + mes("[Bearded Joe]"); + mes("It will be very dangerous if you unequip the equipment in the process of enchantment."); + close(); + } + .@enc_s_n = getequipid(.@eq_num[.@s]); + .@compo_num = getequiprefinerycnt(.@eq_num[.@s]); + setarray(.@equip_card[0], getequipcardid(.@eq_num[.@s], 0), getequipcardid(.@eq_num[.@s], 1), getequipcardid(.@eq_num[.@s], 2), getequipcardid(.@eq_num[.@s], 3)); + switch (.@enc_s_n) { + case 2486: + .@enc_ts = Shadow_Walk_; + .@enc_coin = 1; + .@sc_type = 2; + break; + case 2976: + .@enc_ts = Red_Lantern; + .@enc_coin = 1; + .@sc_type = 1; + break; + case 2977: + .@enc_ts = Hurt_Mind; + .@enc_coin = 1; + .@sc_type = 1; + break; + case 2978: + .@enc_ts = KindHeart; + .@enc_coin = 1; + .@sc_type = 1; + break; + case 2980: + .@enc_ts = Evilspirit_Gloves; + .@enc_coin = 1; + .@sc_type = 1; + break; + case 13442: + .@enc_ts = Old_Parasol; + .@enc_coin = 1; + .@sc_type = 3; + break; + case 16029: + mes("[Bearded Joe]"); + mes("You have equipped ^0000ffNoble Cross^000000! This isn't something I can enchant."); + next(); + mes("[Bearded Joe]"); + mes("I've tried it countless times but I have not succeeded in enchanting it even once!"); + next(); + mes("[Bearded Joe]"); + mes("If you'd really like to enchant it, ^0000ffMayo Mayo in Malangdo ^000000might have an idea what to do."); + close(); + case 18848: + .@enc_ts = Lush_Rose; + .@enc_coin = 1; + .@sc_type = 2; + break; + case 18849: + .@enc_ts = Celines_Ribbon; + .@enc_coin = 1; + .@sc_type = 2; + break; + } + if (.@eq_num[.@s] == EQI_ACC_L) { + mes("[Bearded Joe]"); + mes("There are 2 options for you to choose from. Both of them cost the same at 15 Bloody Coins each."); + next(); + switch (select("Cancel", "Randomly pick one from STR/AGI/DEX", "Randomly pick one from INT/VIT/DEX")) { + case 1: + mes("[Bearded Joe]"); + mes("Hmm.. Maybe next time then?"); + close(); + case 2: + .@sc_ec = 1; + break; + case 3: + .@sc_ec = 2; + break; + } + if (.@enc_coin < 1) { + mes("[Bearded Joe]"); + mes("This equipment is definitely not from the Toy Factory! I only provide my services to items obtained within."); + close(); + } + if (.@equip_card[3] == 0 && .@sc_type < 4) { + .@sc_num = 4; + mes("[Bearded Joe]"); + mesf("Let's proceed with the first enchantment then. The success rate is 95%% on average, there's only a low chance of failing."); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("Such an indecisive person! Come back to me when you've made up your mind!"); + close(); + } + } else if (.@equip_card[2] == 0 && .@sc_type < 3) { + .@sc_num = 3; + mes("[Bearded Joe]"); + mesf("Is this the second time enchanting this piece of equipment? It's a little risky, the success rate is 70%% on average. Please note that if you fail, you'll lose the item."); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("Such an indecisive person! Come back to me when you've made up your mind!"); + close(); + } + } else if (.@equip_card[1] == 0 && .@sc_type < 2) { + .@sc_num = 2; + mes("[Bearded Joe]"); + mesf("This is the final enchantment. The success rate^ff0000 is less than 50%%^000000. Of course I'd like it to succeed in the enchantment, but I'd advise you to think again."); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("A wise choice! You'd be drowning in greed if you had proceeded with the enchantment!"); + close(); + } + } else { + mes("[Bearded Joe]"); + mes("You cannot enchant this equipment any further."); + close(); + } + } else if (.@eq_num[.@s] == EQI_HAND_R) { + if (.@enc_coin < 1) { + mes("[Bearded Joe]"); + mes("This equipment is definitely not from the Toy Factory! I only provide my services to items obtained within."); + close(); + } + .@sc_num = 4; + .@sc_ec = 3; + mes("[Bearded Joe]"); + mes("Weapons do not have any chances of destruction. Would you like to proceed?"); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("Such an indecisive person! Come back to me when you've made up your mind!"); + close(); + } + } else if (.@eq_num[.@s] == EQI_HEAD_TOP || .@eq_num[.@s] == EQI_SHOES) { + if (.@enc_coin < 1) { + mes("[Bearded Joe]"); + mes("This equipment is definitely not from the Toy Factory! I only provide my services to items obtained within."); + close(); + } + if (.@equip_card[3] == 0 && .@sc_type < 4) { + .@sc_num = 4; + .@sc_ec = 4; + mes("[Bearded Joe]"); + mes("Let's start the first enchantment shall we? There is no chance of destruction this time!"); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("Such an indecisive person! Come back to me when you've made up your mind!"); + close(); + } + } else if (.@equip_card[2] == 0 && .@sc_type < 3) { + .@sc_num = 3; + .@sc_ec = 5; + mes("[Bearded Joe]"); + mes("This is the second enchantment! There is still no chance of destruction and you can get one of the random enchantments!"); + next(); + if (select("Maybe later", "Proceed") == 1) { + mes("[Bearded Joe]"); + mes("Such an indecisive person! Come back to me when you've made up your mind!"); + close(); + } + } else { + mes("[Bearded Joe]"); + mes("You cannot enchant this equipment any further."); + close(); + } + } else { + mes("[Bearded Joe]"); + mes("I do not provide my services for these parts. Please visit another person."); + close(); + } + if (.@sc_num == 4) { + .@en_brk1 = 550; + .@en_brk2 = 1050; + } else if (.@sc_num == 3) { + .@en_brk1 = 450; + .@en_brk2 = 1125; + } else if (.@sc_num == 2) { + .@en_brk1 = 1; + .@en_brk2 = 1161; + } else { + mes("[Bearded Joe]"); + mes("There's an unknown problem, please come again later."); + close(); + } + if (.@sc_ec == 1) { + .@ran_e_m = rand(.@en_brk1, .@en_brk2); + if (.@ran_e_m >= 1 && .@ran_e_m < 601) + .@en_name = 0; + else if (.@ran_e_m >= 601 && .@ran_e_m < 701) + .@en_name = Strength1; + else if (.@ran_e_m >= 701 && .@ran_e_m < 801) + .@en_name = Agility1; + else if (.@ran_e_m >= 801 && .@ran_e_m < 901) + .@en_name = Dexterity1; + else if (.@ran_e_m >= 901 && .@ran_e_m < 951) + .@en_name = Strength2; + else if (.@ran_e_m >= 951 && .@ran_e_m < 1001) + .@en_name = Agility2; + else if (.@ran_e_m >= 1001 && .@ran_e_m < 1051) + .@en_name = Dexterity2; + else if (.@ran_e_m >= 1051 && .@ran_e_m < 1076) + .@en_name = Strength3; + else if (.@ran_e_m >= 1076 && .@ran_e_m < 1101) + .@en_name = Agility3; + else if (.@ran_e_m >= 1101 && .@ran_e_m < 1126) + .@en_name = Dexterity3; + else if (.@ran_e_m >= 1126 && .@ran_e_m < 1138) + .@en_name = Strength4; + else if (.@ran_e_m >= 1138 && .@ran_e_m < 1150) + .@en_name = Agility4; + else if (.@ran_e_m >= 1150 && .@ran_e_m < 1162) + .@en_name = Dexterity4; + else + .@en_name = 9; + } else if (.@sc_ec == 2) { + .@ran_e_m = rand(.@en_brk1, .@en_brk2); + if (.@ran_e_m >= 1 && .@ran_e_m < 601) + .@en_name = 0; + else if (.@ran_e_m >= 601 && .@ran_e_m < 701) + .@en_name = Inteligence1; + else if (.@ran_e_m >= 701 && .@ran_e_m < 801) + .@en_name = Vitality1; + else if (.@ran_e_m >= 801 && .@ran_e_m < 901) + .@en_name = Dexterity1; + else if (.@ran_e_m >= 901 && .@ran_e_m < 951) + .@en_name = Inteligence2; + else if (.@ran_e_m >= 951 && .@ran_e_m < 1001) + .@en_name = Vitality2; + else if (.@ran_e_m >= 1001 && .@ran_e_m < 1051) + .@en_name = Dexterity2; + else if (.@ran_e_m >= 1051 && .@ran_e_m < 1076) + .@en_name = Inteligence3; + else if (.@ran_e_m >= 1076 && .@ran_e_m < 1101) + .@en_name = Vitality3; + else if (.@ran_e_m >= 1101 && .@ran_e_m < 1126) + .@en_name = Dexterity3; + else if (.@ran_e_m >= 1126 && .@ran_e_m < 1138) + .@en_name = Inteligence4; + else if (.@ran_e_m >= 1138 && .@ran_e_m < 1150) + .@en_name = Vitality4; + else if (.@ran_e_m >= 1150 && .@ran_e_m < 1162) + .@en_name = Dexterity4; + else + .@en_name = 9; + } else if (.@sc_ec == 3) { + .@ran_e_m = rand(1, 2555); + if (.@ran_e_m >= 1 && .@ran_e_m < 301) + .@en_name = Fighting_Spirit5; + else if (.@ran_e_m >= 301 && .@ran_e_m < 501) + .@en_name = Fighting_Spirit6; + else if (.@ran_e_m >= 501 && .@ran_e_m < 601) + .@en_name = Fighting_Spirit7; + else if (.@ran_e_m >= 601 && .@ran_e_m < 651) + .@en_name = Fighting_Spirit8; + else if (.@ran_e_m >= 651 && .@ran_e_m < 676) + .@en_name = Fighting_Spirit9; + else if (.@ran_e_m >= 676 && .@ran_e_m < 686) + .@en_name = Fighting_Spirit10; + else if (.@ran_e_m >= 686 && .@ran_e_m < 986) + .@en_name = Sharp3; + else if (.@ran_e_m >= 986 && .@ran_e_m < 1086) + .@en_name = Sharp4; + else if (.@ran_e_m >= 1086 && .@ran_e_m < 1096) + .@en_name = Sharp5; + else if (.@ran_e_m >= 1096 && .@ran_e_m < 1396) + .@en_name = Matk1; + else if (.@ran_e_m >= 1396 && .@ran_e_m < 1496) + .@en_name = Matk2; + else if (.@ran_e_m >= 1496 && .@ran_e_m < 1506) + .@en_name = Matk3; + else if (.@ran_e_m >= 1506 && .@ran_e_m < 1806) + .@en_name = Attack_Delay_2; + else if (.@ran_e_m >= 1806 && .@ran_e_m < 2006) + .@en_name = Attack_Delay_3; + else if (.@ran_e_m >= 2006 && .@ran_e_m < 2106) + .@en_name = Attack_Delay_4; + else if (.@ran_e_m >= 2106 && .@ran_e_m < 2116) + .@en_name = Atk_Speed1; + else if (.@ran_e_m >= 2116 && .@ran_e_m < 2416) + .@en_name = Spell6; + else if (.@ran_e_m >= 2416 && .@ran_e_m < 2516) + .@en_name = Spell7; + else if (.@ran_e_m >= 2516 && .@ran_e_m < 2546) + .@en_name = Spell8; + else if (.@ran_e_m >= 2546 && .@ran_e_m < 2556) + .@en_name = Spell9; + else + .@en_name = 9; + } else if (.@sc_ec == 4) { + .@ran_e_m = rand(1, 1950); + if (.@ran_e_m >= 1 && .@ran_e_m < 301) + .@en_name = Fighting_Spirit2; + else if (.@ran_e_m >= 301 && .@ran_e_m < 401) + .@en_name = Fighting_Spirit3; + else if (.@ran_e_m >= 401 && .@ran_e_m < 451) + .@en_name = Fighting_Spirit4; + else if (.@ran_e_m >= 451 && .@ran_e_m < 471) + .@en_name = Fighting_Spirit5; + else if (.@ran_e_m >= 471 && .@ran_e_m < 771) + .@en_name = Sharp1; + else if (.@ran_e_m >= 771 && .@ran_e_m < 871) + .@en_name = Sharp2; + else if (.@ran_e_m >= 871 && .@ran_e_m < 891) + .@en_name = Sharp3; + else if (.@ran_e_m >= 891 && .@ran_e_m < 991) + .@en_name = Matk1; + else if (.@ran_e_m >= 991 && .@ran_e_m < 1011) + .@en_name = Matk2; + else if (.@ran_e_m >= 1011 && .@ran_e_m < 1311) + .@en_name = Attack_Delay_1; + else if (.@ran_e_m >= 1311 && .@ran_e_m < 1411) + .@en_name = Attack_Delay_2; + else if (.@ran_e_m >= 1411 && .@ran_e_m < 1461) + .@en_name = Attack_Delay_3; + else if (.@ran_e_m >= 1461 && .@ran_e_m < 1481) + .@en_name = Attack_Delay_4; + else if (.@ran_e_m >= 1481 && .@ran_e_m < 1781) + .@en_name = Spell3; + else if (.@ran_e_m >= 1781 && .@ran_e_m < 1881) + .@en_name = Spell4; + else if (.@ran_e_m >= 1881 && .@ran_e_m < 1931) + .@en_name = Spell5; + else if (.@ran_e_m >= 1931 && .@ran_e_m < 1951) + .@en_name = Spell6; + else + .@en_name = 9; + } else if (.@sc_ec == 5) { + .@ran_e_m = rand(1, 1970); + if (.@ran_e_m >= 1 && .@ran_e_m < 301) + .@en_name = Strength1; + else if (.@ran_e_m >= 301 && .@ran_e_m < 401) + .@en_name = Strength2; + else if (.@ran_e_m >= 401 && .@ran_e_m < 451) + .@en_name = Strength3; + else if (.@ran_e_m >= 451 && .@ran_e_m < 471) + .@en_name = Agility1; + else if (.@ran_e_m >= 471 && .@ran_e_m < 771) + .@en_name = Agility2; + else if (.@ran_e_m >= 771 && .@ran_e_m < 871) + .@en_name = Agility3; + else if (.@ran_e_m >= 871 && .@ran_e_m < 891) + .@en_name = Inteligence1; + else if (.@ran_e_m >= 891 && .@ran_e_m < 991) + .@en_name = Inteligence2; + else if (.@ran_e_m >= 991 && .@ran_e_m < 1011) + .@en_name = Inteligence3; + else if (.@ran_e_m >= 1011 && .@ran_e_m < 1311) + .@en_name = Dexterity1; + else if (.@ran_e_m >= 1311 && .@ran_e_m < 1411) + .@en_name = Dexterity2; + else if (.@ran_e_m >= 1411 && .@ran_e_m < 1461) + .@en_name = Dexterity3; + else if (.@ran_e_m >= 1461 && .@ran_e_m < 1481) + .@en_name = Vitality1; + else if (.@ran_e_m >= 1481 && .@ran_e_m < 1781) + .@en_name = Vitality2; + else if (.@ran_e_m >= 1781 && .@ran_e_m < 1881) + .@en_name = Vitality3; + else if (.@ran_e_m >= 1881 && .@ran_e_m < 1931) + .@en_name = Luck1; + else if (.@ran_e_m >= 1931 && .@ran_e_m < 1951) + .@en_name = Luck2; + else if (.@ran_e_m >= 1951 && .@ran_e_m < 1971) + .@en_name = Luck3; + else + .@en_name = 9; + } else { + mes("[Bearded Joe]"); + mes("There's an unknown problem, please come again later."); + close(); + } + if (.@en_name == 9) { + mes("[Bearded Joe]"); + mes("There's an unknown problem, please come again later."); + close(); + } + if (.@equip_card[3] == 0 && .@sc_type < 4) { + .@equip_card[3] = .@en_name; + } else if (.@equip_card[2] == 0 && .@sc_type < 3) { + if (.@en_name == 0) { + .@equip_card[2] = .@en_name; + .@equip_card[3] = 0; + } else { + .@equip_card[2] = .@en_name; + } + } else if (.@equip_card[1] == 0 && .@sc_type < 2) { + if (.@en_name == 0) { + .@equip_card[1] = .@en_name; + .@equip_card[2] = 0; + .@equip_card[3] = 0; + } else { + .@equip_card[1] = .@en_name; + } + } else if (.@equip_card[0] == 0 && .@sc_type < 1) { + .@equip_card[0] = .@en_name; + } else { + mes("[Bearded Joe]"); + mes("I'm unable to provide my services as I've never seen these items before."); + close(); + } + if (countitem(Bloody_Coin) > 14) { + if (.@en_name == 0) { + delitem(Bloody_Coin, 15); + delequip(.@eq_num[.@s]); + mes("[Bearded Joe]"); + mes("Tough luck eh? Your equipment just broke."); + close2(); + specialeffect(EF_LORD); + end; + } else { + delitem(Bloody_Coin, 15); + delequip(.@eq_num[.@s]); + getitem2(.@enc_ts, 1, 1, .@compo_num, 0, .@equip_card[0], .@equip_card[1], .@equip_card[2], .@equip_card[3]); + mes("[Bearded Joe]"); + mes("It's a success! Please verify the results!"); + specialeffect(EF_REPAIRWEAPON); + close(); + } + } else { + mes("[Bearded Joe]"); + mes("Please check whether you have enough bloody coins to proceed.. It seems to me that you don't."); + close(); + } +} \ No newline at end of file diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf index c26e907ad46..84774b097da 100644 --- a/npc/re/scripts.conf +++ b/npc/re/scripts.conf @@ -90,6 +90,7 @@ "npc/re/instances/EclageInterior.txt", "npc/re/instances/ghost_palace.txt", "npc/re/instances/HazyForest.txt", +"npc/re/instances/horror_toy_factory.txt", "npc/re/instances/MalangdoCulvert.txt", "npc/re/instances/octopus_cave.txt", "npc/re/instances/OldGlastHeim.txt", @@ -110,6 +111,7 @@ "npc/re/merchants/catalog.txt", "npc/re/merchants/coin_exchange.txt", "npc/re/merchants/diamond.txt", +"npc/re/merchants/enchan_htf.txt", "npc/re/merchants/enchan_mal.txt", "npc/re/merchants/enchan_mora.txt", "npc/re/merchants/enchan_ko.txt", From 8a0f6fae76f28a57574a76ec792f2c4af81b8c0e Mon Sep 17 00:00:00 2001 From: Zarbony Date: Wed, 1 Apr 2020 04:07:07 +0200 Subject: [PATCH 2/6] Delete Duplicate Entry of Bloody Coin and Closed Mind Box, Edit Noble Cross and Move some IDs for the right item order. --- db/re/item_db.conf | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 535d5dabe8d..bb96d08f08b 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -80220,11 +80220,6 @@ item_db: ( AegisName: "Bloody_Coin" Name: "Bloody Coin" Buy: 10 -}, -{ - Id: 7642 - AegisName: "Bloody_Coin" - Name: "Bloody Coin" BuyingStore: true }, { @@ -126186,7 +126181,7 @@ item_db: ( Loc: 2 WeaponLv: 4 EquipLv: 40 - View: 8 + Subtype: 8 Script: <" bonus bAtkEle, Ele_Holy; bonus3 bAutoSpell, PR_TURNUNDEAD, 6, 100; @@ -148010,29 +148005,6 @@ item_db: ( Buy: 10 Weight: 300 }, -{ - Id: 22534 - AegisName: "Closedmind_Box" - Name: "Closed Mind Box" - Type: "IT_CASH" - Buy: 10 - Weight: 1000 - EquipLv: 1 - Script: <" - // getgroupitem(IG_Sealed_Mind_Box); - "> -}, -{ - Id: 22537 - AegisName: "PrizeOfHero" - Name: "Prize Of Hero" - Type: "IT_USABLE" - Weight: 100 - EquipLv: 1 - Script: <" - // getrandgroupitem(IG_PrizeOfHero, 1); - "> -}, { Id: 22516 AegisName: "Dark_Red_Clot" @@ -148056,6 +148028,17 @@ item_db: ( BuyingStore: true Script: <" packageitem(); "> }, +{ + Id: 22537 + AegisName: "PrizeOfHero" + Name: "Prize Of Hero" + Type: "IT_USABLE" + Weight: 100 + EquipLv: 1 + Script: <" + // getrandgroupitem(IG_PrizeOfHero, 1); + "> +}, { Id: 22540 AegisName: "Runstone_Lux" From 38920e0f3da202cdb79cf035def26966380430c2 Mon Sep 17 00:00:00 2001 From: Zarbony Date: Tue, 7 Apr 2020 08:48:03 +0200 Subject: [PATCH 3/6] Some Hints for unitdata script commands --- npc/re/instances/horror_toy_factory.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/npc/re/instances/horror_toy_factory.txt b/npc/re/instances/horror_toy_factory.txt index 282442012c2..014a1ccd227 100644 --- a/npc/re/instances/horror_toy_factory.txt +++ b/npc/re/instances/horror_toy_factory.txt @@ -1584,8 +1584,8 @@ OnStart: killmonster(.@in_map$, .@gl_npc1$+"::OnMyMobDead"); 'xm_celine_gid = monster(.@in_map$, 231, 184, "Celine Kimi", XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); 'g_xm_celine_gid = monster(.@in_map$, 226, 190, "Celine's Illusion", G_XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); - // setunitdata('xm_celine_gid, UDT_MAXHP, 20000000); - // setunitdata('g_xm_celine_gid, UDT_MAXHP, 20000000); + // setunitdata('xm_celine_gid, UDT_MAXHP, 20000000); //Need to Update Script Command! + // setunitdata('g_xm_celine_gid, UDT_MAXHP, 20000000); //Need to Update Script Command! unittalk('xm_celine_gid, _("I don't want to be abandoned here!")); initnpctimer(); end; @@ -1613,15 +1613,15 @@ OnTimer10000: .@mob_dead_num = mobcount(.@in_map$, instance_npcname("#finalbs2")+"::OnMyMobDead"); if (.@mob_dead_num > 1) { .@gl_npc1$ = instance_npcname("#finalbs2"); - // .@MOB_HP1 = getunitdata('xm_celine_gid, UDT_HP); - // .@MOB_HP2 = getunitdata('g_xm_celine_gid, UDT_HP); + // .@MOB_HP1 = getunitdata('xm_celine_gid, UDT_HP); //Need to Update Script Command! + // .@MOB_HP2 = getunitdata('g_xm_celine_gid, UDT_HP); //Need to Update Script Command! if (.@MOB_HP1 > .@MOB_HP2) { .@gp_hp = (.@MOB_HP1 - .@MOB_HP2); if (.@gp_hp > 100000) { .@set_bs_hp = ((.@gp_hp * 5) / 10); .@MOB_HP3 = min(.@MOB_HP1 + .@set_bs_hp, 66666666); - // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); - // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! + // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! donpcevent(instance_npcname("#eff_f01")+"::OnStart"); unittalk('xm_celine_gid, _("Let me heal you up!")); sleep(1000); @@ -1633,8 +1633,8 @@ OnTimer10000: if (.@gp_hp > 100000) { .@set_bs_hp = ((.@gp_hp * 5) / 10); .@MOB_HP3 = min(.@MOB_HP2 + .@set_bs_hp, 66666666); - // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); - // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! + // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! donpcevent(instance_npcname("#eff_f01")+"::OnStart"); unittalk('g_xm_celine_gid, _("Let me restore you up!")); sleep(1000); From 2d9bb4c8b7e8ea801988884cfe6fc242a28ba0d5 Mon Sep 17 00:00:00 2001 From: Zarbony <44331842+Zarbony@users.noreply.github.com> Date: Sun, 12 Apr 2020 10:49:54 +0200 Subject: [PATCH 4/6] Apply suggestions from code review Co-Authored-By: Emistry Haoyan --- npc/re/instances/horror_toy_factory.txt | 60 ++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/npc/re/instances/horror_toy_factory.txt b/npc/re/instances/horror_toy_factory.txt index 014a1ccd227..f4115ba8099 100644 --- a/npc/re/instances/horror_toy_factory.txt +++ b/npc/re/instances/horror_toy_factory.txt @@ -9,7 +9,7 @@ //= This file is part of Hercules. //= http://herc.ws - http://github.com/HerculesWS/Hercules //= -//= Copyright (C) 2017 Hercules Dev Team +//= Copyright (C) 2012-2020 Hercules Dev Team //= Copyright (C) Ridley //= Copyright (C) Steph //= Copyright (C) AtlantisRO @@ -457,8 +457,8 @@ OnStart: .@in_map$ = instance_mapname("1@xm_d"); .@in_npc$ = instance_npcname("#fac1ct"); killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 16, 24, 114, 112, "Vicious Cookie", XM_COOKIE, 31, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 16, 24, 114, 112, "Evil Dwelling Box", XM_MYSTCASE, 36, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 16, 24, 114, 112, "--ja--", XM_COOKIE, 31, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 16, 24, 114, 112, "--ja--", XM_MYSTCASE, 36, .@in_npc$+"::OnMyMobDead"); end; OnMyMobDead: @@ -522,7 +522,7 @@ OnAlert: npctalk(_("Factory Manager: Officers! Officers!! There are humans here!!!")); sleep(3000); disablenpc(.@in_npc$); - areamonster(.@in_map$, 61, 118, 71, 128, "Toy Factory Guard", XM_CRUISER, 11, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 61, 118, 71, 128, "--ja--", XM_CRUISER, 11, .@in_npc$+"::OnMyMobDead"); initnpctimer(); end; @@ -781,10 +781,10 @@ OnStart: .@in_map$ = instance_mapname("1@xm_d"); .@in_npc$ = instance_npcname("#fac2ct"); killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 140, 19, 240, 18, "Malicious Baby Ghost", XM_HYLOZOIST, 19, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 140, 19, 240, 18, "Evil Dwelling Box", XM_MYSTCASE, 16, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 140, 19, 240, 18, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 22, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 140, 19, 240, 18, "Creepy Demon", XM_LUDE, 16, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "--ja--", XM_HYLOZOIST, 19, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "--ja--", XM_MYSTCASE, 16, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "--ja--", XM_TEDDY_BEAR, 22, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 140, 19, 240, 18, "--ja--", XM_LUDE, 16, .@in_npc$+"::OnMyMobDead"); end; OnMyMobDead: @@ -936,7 +936,7 @@ OnAlert: setarray(.@xy[0], .@mapx - 8, .@mapy - 8, .@mapx + 8, .@mapy + 8); break; } - areamonster(.@in_map$, .@xy[0], .@xy[1], .@xy[2], .@xy[3], "Corrupt Cruiser", XM_CRUISER, 21, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, .@xy[0], .@xy[1], .@xy[2], .@xy[3], "--ja--", XM_CRUISER, 21, .@in_npc$+"::OnMyMobDead"); donpcevent(.@in_npc$+"::OnStart"); initnpctimer(); end; @@ -1129,10 +1129,10 @@ OnStart: .@in_map$ = instance_mapname("1@xm_d"); .@in_npc$ = instance_npcname("#fac3ct"); killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 13, 144, 121, 248, "Dancing Marionette", XM_MARIONETTE, 37, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 13, 144, 121, 248, "Decorated Evil Tree", XM_TREE, 31, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 13, 144, 121, 248, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 43, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 13, 144, 121, 248, "Creepy Demon", XM_LUDE, 31, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "--ja--", XM_MARIONETTE, 37, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "--ja--", XM_TREE, 31, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "--ja--", XM_TEDDY_BEAR, 43, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 13, 144, 121, 248, "--ja--", XM_LUDE, 31, .@in_npc$+"::OnMyMobDead"); end; OnMyMobDead: @@ -1154,10 +1154,10 @@ OnStart: .@in_map$ = instance_mapname("1@xm_d"); .@in_npc$ = instance_npcname("#fac3ct2"); killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 159, 215, 241, 247, "Malicious Baby Ghost", XM_HYLOZOIST, 13, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 159, 215, 241, 247, "Decorated Evil Tree", XM_TREE, 11, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 159, 215, 241, 247, "Abandoned Teddy Bear", XM_TEDDY_BEAR, 15, .@in_npc$+"::OnMyMobDead"); - areamonster(.@in_map$, 159, 215, 241, 247, "Creepy Demon", XM_LUDE, 11, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "--ja--", XM_HYLOZOIST, 13, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "--ja--", XM_TREE, 11, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "--ja--", XM_TEDDY_BEAR, 15, .@in_npc$+"::OnMyMobDead"); + areamonster(.@in_map$, 159, 215, 241, 247, "--ja--", XM_LUDE, 11, .@in_npc$+"::OnMyMobDead"); end; OnMyMobDead: @@ -1178,9 +1178,9 @@ OnStart: killmonster(.@in_map$, .@in_npc$+"::OnMyMobDead"); // Custom check to prevent abuse. // Aegis used wrong Antonio Id. Changed from ANTONIO to XM_ANTONIO if (rand(1, 10) > 3) - 'antonio_gid = areamonster(.@in_map$, 13, 144, 121, 248, "Wicked Vice Plant Manager", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); + 'antonio_gid = areamonster(.@in_map$, 13, 144, 121, 248, "--ja--", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); else - 'antonio_gid = areamonster(.@in_map$, 159, 215, 241, 247, "Wicked Vice Plant Manager", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); + 'antonio_gid = areamonster(.@in_map$, 159, 215, 241, 247, "--ja--", XM_ANTONIO, 1, .@in_npc$+"::OnMyMobDead"); end; OnEnd: @@ -1582,10 +1582,10 @@ OnStart: .@in_map$ = instance_mapname("1@xm_d"); .@gl_npc1$ = instance_npcname("#finalbs2"); killmonster(.@in_map$, .@gl_npc1$+"::OnMyMobDead"); - 'xm_celine_gid = monster(.@in_map$, 231, 184, "Celine Kimi", XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); + 'xm_celine_gid = monster(.@in_map$, 231, 184, "--ja--", XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); 'g_xm_celine_gid = monster(.@in_map$, 226, 190, "Celine's Illusion", G_XM_CELINE_KIMI, 1, .@gl_npc1$+"::OnMyMobDead"); - // setunitdata('xm_celine_gid, UDT_MAXHP, 20000000); //Need to Update Script Command! - // setunitdata('g_xm_celine_gid, UDT_MAXHP, 20000000); //Need to Update Script Command! + setunitdata('xm_celine_gid, UDT_MAXHP, 20000000); + setunitdata('g_xm_celine_gid, UDT_MAXHP, 20000000); unittalk('xm_celine_gid, _("I don't want to be abandoned here!")); initnpctimer(); end; @@ -1613,15 +1613,15 @@ OnTimer10000: .@mob_dead_num = mobcount(.@in_map$, instance_npcname("#finalbs2")+"::OnMyMobDead"); if (.@mob_dead_num > 1) { .@gl_npc1$ = instance_npcname("#finalbs2"); - // .@MOB_HP1 = getunitdata('xm_celine_gid, UDT_HP); //Need to Update Script Command! - // .@MOB_HP2 = getunitdata('g_xm_celine_gid, UDT_HP); //Need to Update Script Command! + .@MOB_HP1 = getunitdata('xm_celine_gid, UDT_HP); + .@MOB_HP2 = getunitdata('g_xm_celine_gid, UDT_HP); if (.@MOB_HP1 > .@MOB_HP2) { .@gp_hp = (.@MOB_HP1 - .@MOB_HP2); if (.@gp_hp > 100000) { .@set_bs_hp = ((.@gp_hp * 5) / 10); .@MOB_HP3 = min(.@MOB_HP1 + .@set_bs_hp, 66666666); - // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! - // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! + setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); donpcevent(instance_npcname("#eff_f01")+"::OnStart"); unittalk('xm_celine_gid, _("Let me heal you up!")); sleep(1000); @@ -1633,8 +1633,8 @@ OnTimer10000: if (.@gp_hp > 100000) { .@set_bs_hp = ((.@gp_hp * 5) / 10); .@MOB_HP3 = min(.@MOB_HP2 + .@set_bs_hp, 66666666); - // setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! - // setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); //Need to Update Script Command! + setunitdata('xm_celine_gid, UDT_MAXHP, .@MOB_HP3); + setunitdata('g_xm_celine_gid, UDT_MAXHP, .@MOB_HP3); donpcevent(instance_npcname("#eff_f01")+"::OnStart"); unittalk('g_xm_celine_gid, _("Let me restore you up!")); sleep(1000); @@ -1816,7 +1816,7 @@ OnTimer1000: break; } getmapxy(.@mapname$, .@mapx, .@mapy, UNITTYPE_NPC); - for (.@i = 0; .@i < .@idnum001; ++.@i) { + for (.@i = 0; .@i < .@item_count; ++.@i) { .@idx = rand(.@mapx - 2, .@mapx + 2); .@idy = rand(.@mapy - 2, .@mapy + 2); makeitem(Bloody_Coin, 1, .@mapname$, .@idx, .@idy); @@ -1981,4 +1981,4 @@ OnMyMobDead: } close(); } -*/ \ No newline at end of file +*/ From a870364371c1288c97c741743a3dc3f46dad25bc Mon Sep 17 00:00:00 2001 From: Zarbony <44331842+Zarbony@users.noreply.github.com> Date: Mon, 13 Apr 2020 11:18:07 +0200 Subject: [PATCH 5/6] Update npc/re/merchants/enchan_htf.txt Co-Authored-By: Emistry Haoyan --- npc/re/merchants/enchan_htf.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/npc/re/merchants/enchan_htf.txt b/npc/re/merchants/enchan_htf.txt index 04ae0c9c6e6..2f51760cd1a 100644 --- a/npc/re/merchants/enchan_htf.txt +++ b/npc/re/merchants/enchan_htf.txt @@ -286,8 +286,7 @@ xmas,240,294,3 script Bearded Joe#pa0829 4_M_05,{ .@compo_num = getequiprefinerycnt(.@eq_num[.@s]); setarray(.@equip_card[0], getequipcardid(.@eq_num[.@s], 0), getequipcardid(.@eq_num[.@s], 1), getequipcardid(.@eq_num[.@s], 2), getequipcardid(.@eq_num[.@s], 3)); switch (.@enc_s_n) { - case 2486: - .@enc_ts = Shadow_Walk_; + case Shadow_Walk_: .@enc_coin = 1; .@sc_type = 2; break; @@ -700,4 +699,4 @@ xmas,240,294,3 script Bearded Joe#pa0829 4_M_05,{ mes("Please check whether you have enough bloody coins to proceed.. It seems to me that you don't."); close(); } -} \ No newline at end of file +} From c616e747c1e746f4073803ee74786b9924006a1e Mon Sep 17 00:00:00 2001 From: Zarbony <44331842+Zarbony@users.noreply.github.com> Date: Mon, 13 Apr 2020 11:18:18 +0200 Subject: [PATCH 6/6] Update npc/re/merchants/enchan_htf.txt Co-Authored-By: Emistry Haoyan --- npc/re/merchants/enchan_htf.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/re/merchants/enchan_htf.txt b/npc/re/merchants/enchan_htf.txt index 2f51760cd1a..fff2ebf1149 100644 --- a/npc/re/merchants/enchan_htf.txt +++ b/npc/re/merchants/enchan_htf.txt @@ -9,7 +9,7 @@ //= This file is part of Hercules. //= http://herc.ws - http://github.com/HerculesWS/Hercules //= -//= Copyright (C) 2017 Hercules Dev Team +//= Copyright (C) 2012-2020 Hercules Dev Team //= Copyright (C) Ridley //= Copyright (C) Steph //= Copyright (C) AtlantisRO