Beispiel #1
0
        public static void StoryScript(Client client, int scriptNum, string param1, string param2, string param3, bool paused)
        {
            // Called when a script from a story is run
            try {

            switch (scriptNum) {
                case 0: {
                        Messenger.SendPlayerData(client);
                    }
                    break;
                case 1: {
                        if (client.Player.Map.MapType != Enums.MapType.Instanced) return;
                        InstancedMap map = client.Player.Map as InstancedMap;
                        MapNpcPreset npc = new MapNpcPreset();
                        string[] loc = param1.Split(':');

                        string[] lvl = param3.Split(':');
                        npc.SpawnX = loc[0].ToInt();
                        npc.SpawnY = loc[1].ToInt();
                        npc.NpcNum = param2.ToInt();
                        npc.MinLevel = lvl[0].ToInt(); // TODO: Adjust npc level
                        npc.MaxLevel = lvl[1].ToInt(); // TODO: Adjust npc level
                        //Messenger.AdminMsg(npc.SpawnX+"/"+npc.SpawnY+"/"+npc.NpcNum+"/"+npc.MinLevel+"/"+npc.MaxLevel, Text.Pink);
                        map.SpawnNpc(npc);

                    }
                    break;
                case 2: {
                        if (client.Player.Map.MapType != Enums.MapType.Instanced) return;
                        InstancedMap map = client.Player.Map as InstancedMap;
                        string[] loc = param1.Split(':');
                        map.SetTile(loc[0].ToInt(), loc[1].ToInt(), 3, 4, 3);
                        map.SetAttribute(loc[0].ToInt(), loc[1].ToInt(), Enums.TileType.Scripted, 46, 0, 0, param2, "-1", "");
                        Messenger.SendTile(loc[0].ToInt(), loc[1].ToInt(), map);
                    }
                    break;
                case 3: {
                        if (client.Player.Map.MapType != Enums.MapType.Instanced) return;
                        InstancedMap map = client.Player.Map as InstancedMap;
                        string[] loc = param1.Split(':');
                        string[] dest = param2.Split(':');
                        map.SetTile(loc[0].ToInt(), loc[1].ToInt(), 3, 4, 3);
                        map.SetAttribute(loc[0].ToInt(), loc[1].ToInt(), Enums.TileType.Warp, dest[0].ToInt(), dest[1].ToInt(), dest[2].ToInt(), "", "", "");
                        Messenger.SendTile(loc[0].ToInt(), loc[1].ToInt(), map);
                    }
                    break;
                case 4: {
                        IMap map = client.Player.Map;
                        map.Npc[1].SpawnX = 9;
                        map.Npc[1].SpawnY = 7;
                        map.Npc[2].SpawnX = 6;
                        map.Npc[2].SpawnY = 11;
                        map.Npc[3].SpawnX = 13;
                        map.Npc[3].SpawnY = 11;
                        map.Npc[1].NpcNum = 306;
                        map.Npc[2].NpcNum = 259;
                        map.Npc[3].NpcNum = 259;
                        //map.SetNpc(0, 500);
                        //map.SetNpc(1, 500);
                        //map.SetNpc(2, 500);
                        for (int i = 1; i <= 3; i++) {
                            //map.SpawnNpc(i);
                        }
                    }
                    break;
                case 5: {
                        //sound
                        Messenger.PlaySoundToMap(client.Player.Map.MapID, param1);
                    }
                    break;
                case 6: {
                        IMap map = client.Player.Map;
                        map.Npc[1].SpawnX = 9;
                        map.Npc[1].SpawnY = 3;
                        map.Npc[1].NpcNum = 337;
                        //map.SpawnNpc(1);
                    }
                    break;
                case 7: {// Luxio Tribe Battle
                        // 167 - Luxio
                        // 177 - Luxray
                        // 5 luxio, 1 luxray
                        IMap map = client.Player.Map;
                        map.Npc[1].SpawnX = 10;
                        map.Npc[1].SpawnY = 5;
                        map.Npc[2].SpawnX = 7;
                        map.Npc[2].SpawnY = 6;
                        map.Npc[3].SpawnX = 12;
                        map.Npc[3].SpawnY = 6;
                        map.Npc[4].SpawnX = 7;
                        map.Npc[4].SpawnY = 8;
                        map.Npc[5].SpawnX = 12;
                        map.Npc[5].SpawnY = 8;
                        map.Npc[6].SpawnX = 12;
                        map.Npc[6].SpawnY = 9;
                        map.Npc[7].SpawnX = 10;
                        map.Npc[7].SpawnY = 7;
                        map.Npc[1].NpcNum = 177;
                        for (int i = 2; i <= 7; i++) {
                            map.Npc[i].NpcNum = 167;
                        }
                        for (int i = 1; i <= 7; i++) {
                            //map.SpawnNpc(i);
                        }
                    }
                    break;
                case 8: {
                        client.Player.GiveItem(159, 1);
                    }
                    break;
                case 9: {
                        client.Player.SetStoryState(157, false);
                    }
                    break;
                case 10: {//Start Registeel Battle: First wave of bronzongs
                        BossBattles.StartBossWave(client, "Registeel", 1);
                    }
                    break;
                case 11: {//Registeel Battle: second wave of bronzongs
                        BossBattles.StartBossWave(client, "Registeel", 2);
                    }
                    break;
                case 12: {//Registeel Battle: Registeel itself
                        BossBattles.StartBossWave(client, "Registeel", 3);
                    }
                    break;
                case 13: {//leaving Forlorn Tower by fee
                        int amount = client.Player.HasItem(1);
                        if (amount > 0) {
                            client.Player.TakeItem(1, (amount / 2));
                        }
                        Messenger.PlayerWarp(client, 684, 13, 20);
                    }
                    break;
                case 14: {
                        if (exPlayer.Get(client).StoryEnabled) {
                            int currentSection = client.Player.StoryHelper.ReadSetting("[MainStory]-CurrentSection").ToInt();
                            client.Player.StoryHelper.SaveSetting("[MainStory]-CurrentSection", (currentSection + 1).ToString());
                        }
                    }
                    break;
                case 15: {//murkrows attack (wave 1)
                        IMap map = client.Player.Map;

                        map.SetAttribute(7, 10, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(13, 10, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(7, 14, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(13, 14, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(4, 18, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(16, 18, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(4, 8, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(16, 8, Enums.TileType.Scripted, 3, 0, 0, "", "", "");

                        map.SetNpcSpawnPoint(1, 3, 10);
                        map.SetNpcSpawnPoint(2, 4, 11);
                        map.SetNpcSpawnPoint(3, 6, 10);
                        map.SetNpcSpawnPoint(4, 7, 11);
                        map.SetNpcSpawnPoint(5, 8, 10);
                        map.SetNpcSpawnPoint(6, 9, 11);
                        map.SetNpcSpawnPoint(7, 10, 10);
                        map.SetNpcSpawnPoint(8, 11, 11);
                        map.SetNpcSpawnPoint(9, 12, 10);
                        map.SetNpcSpawnPoint(10, 13, 11);
                        map.SetNpcSpawnPoint(11, 14, 10);
                        map.SetNpcSpawnPoint(12, 16, 11);
                        map.SetNpcSpawnPoint(13, 17, 10);

                        for (int i = 1; i <= 13; i++) {
                            map.Npc[i].NpcNum = 224;
                        }

                        //map.SpawnNpc(1);
                        //map.SpawnNpc(2);
                        //map.SpawnNpc(3);
                        //map.SpawnNpc(4);
                        //map.SpawnNpc(5);
                        //map.SpawnNpc(6);
                        //map.SpawnNpc(7);
                        //map.SpawnNpc(8);
                        //map.SpawnNpc(9);
                        //map.SpawnNpc(10);
                        //map.SpawnNpc(11);
                        //map.SpawnNpc(12);
                        //map.SpawnNpc(13);

                    }
                    break;
                case 16: {//murkrows attack (ambush)
                        IMap map = client.Player.Map;

                        map.SetAttribute(7, 10, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(13, 10, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(7, 14, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(13, 14, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(4, 18, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(16, 18, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(4, 8, Enums.TileType.Scripted, 3, 0, 0, "", "", "");
                        map.SetAttribute(16, 8, Enums.TileType.Scripted, 3, 0, 0, "", "", "");

                        map.SetNpcSpawnPoint(1, 9, 7);
                        map.SetNpcSpawnPoint(2, 10, 7);
                        map.SetNpcSpawnPoint(3, 11, 7);
                        map.SetNpcSpawnPoint(4, 9, 8);
                        map.SetNpcSpawnPoint(5, 11, 8);
                        map.SetNpcSpawnPoint(6, 9, 9);
                        map.SetNpcSpawnPoint(7, 10, 9);
                        map.SetNpcSpawnPoint(8, 11, 9);
                        map.SetNpcSpawnPoint(9, 8, 8);
                        map.SetNpcSpawnPoint(10, 8, 9);
                        map.SetNpcSpawnPoint(11, 12, 8);
                        map.SetNpcSpawnPoint(12, 12, 9);
                        map.SetNpcSpawnPoint(13, 10, 10);

                        for (int i = 1; i <= 13; i++) {
                            map.Npc[i].NpcNum = 220;
                        }

                        //map.SpawnNpc(1);
                        //map.SpawnNpc(2);
                        //map.SpawnNpc(3);
                        //map.SpawnNpc(4);
                        //map.SpawnNpc(5);
                        //map.SpawnNpc(6);
                        //map.SpawnNpc(7);
                        //map.SpawnNpc(8);
                        //map.SpawnNpc(9);
                        //map.SpawnNpc(10);
                        //map.SpawnNpc(11);
                        //map.SpawnNpc(12);
                        //map.SpawnNpc(13);

                        if (client.Player.GetActiveRecruit().HeldItem.Num != 142) {
                            Messenger.BattleMsg(client, "There was a trap underneath!", Text.BrightRed);
                            Messenger.BattleMsg(client, "The trap exploded!", Text.BrightRed);
                            //Messenger.SpellAnim(497, client.Player.MapID, client.Player.X, client.Player.Y);
                            //DamagePlayer(client, Convert.ToInt32((client.Player.GetActiveRecruit().HP + 0.5) / 2), Enums.KillType.Npc);

                            Messenger.PlaySoundToMap(client.Player.MapID, "magic64.wav");
                            Messenger.BattleMsg(client, "The trap drained all your PP!", Text.BrightRed);
                            //Messenger.SpellAnim(493, client.Player.MapID, client.Player.X, client.Player.Y);
                            for (int i = 0; i < client.Player.GetActiveRecruit().Moves.Length; i++) {
                                client.Player.GetActiveRecruit().Moves[i].CurrentPP = 0;
                                //Messenger.SendMovePPUpdate(client, i);
                            }
                            Messenger.PlaySound(client, "PP Zero.wav");
                            Messenger.BattleMsg(client, "Poison spikes shot out!", Text.BrightRed);
                            //Messenger.SpellAnim(496, client.Player.MapID, client.Player.X, client.Player.Y);
                            Messenger.PlaySoundToMap(client.Player.MapID, "magic23.wav");
                            SetStatusAilment(client.Player.GetActiveRecruit(), client.Player.Map, Enums.StatusAilment.Poison, 1, null);
                            Messenger.BattleMsg(client, "Mud splashed up from the ground!", Text.BrightRed);
                            //Messenger.SpellAnim(495, client.Player.MapID, client.Player.X, client.Player.Y);
                            Messenger.PlaySoundToMap(client.Player.MapID, "magic65.wav");
                            switch (Server.Math.Rand(0, 4)) {
                                case 0: {
                                        client.Player.GetActiveRecruit().AttackBuff = 0;
                                    }
                                    break;
                                case 1: {
                                        client.Player.GetActiveRecruit().DefenseBuff = 0;
                                    }
                                    break;
                                case 2: {
                                        client.Player.GetActiveRecruit().SpAtkBuff = 0;
                                    }
                                    break;
                                case 3: {
                                        client.Player.GetActiveRecruit().SpeedBuff = 0;
                                    }
                                    break;
                            }
                            //Messenger.SpellAnim(494, client.Player.MapID, client.Player.X, client.Player.Y);
                            //Grimy(client);
                            Messenger.PlaySoundToMap(client.Player.MapID, "Magic65.wav");
                            //PlayerInvDrop(client);
                            Messenger.MapMsg(client.Player.MapID, client.Player.Name + " tripped!", Text.BrightRed);
                            Messenger.PlaySoundToMap(client.Player.MapID, "magic55.wav");
                            Messenger.BattleMsg(client, "You were pelted with chestnuts!", Text.BrightRed);
                            //DamagePlayer(client, 50, Enums.KillType.Npc);

                            Messenger.PlaySoundToMap(client.Player.MapID, "pain.wav");
                            Messenger.BattleMsg(client, "The trap broke down...", Text.Black);
                        }
                    }
                    break;
                case 17: {//murkrows and honchkrow attack
                        IMap map = client.Player.Map;
                        map.SetNpcSpawnPoint(1, 6, 9);
                        map.SetNpcSpawnPoint(2, 14, 9);
                        map.SetNpcSpawnPoint(3, 6, 11);
                        map.SetNpcSpawnPoint(4, 14, 11);
                        map.SetNpcSpawnPoint(5, 5, 13);
                        map.SetNpcSpawnPoint(6, 15, 13);
                        map.SetNpcSpawnPoint(7, 6, 15);
                        map.SetNpcSpawnPoint(8, 14, 15);
                        map.SetNpcSpawnPoint(9, 8, 14);
                        map.SetNpcSpawnPoint(10, 12, 14);
                        map.SetNpcSpawnPoint(11, 6, 18);
                        map.SetNpcSpawnPoint(12, 14, 18);
                        map.SetNpcSpawnPoint(13, 10, 16);
                        map.SetNpcSpawnPoint(14, 10, 7);

                        map.SetNpc(1, 220);
                        map.SetNpc(2, 220);
                        map.SetNpc(3, 220);
                        map.SetNpc(4, 220);
                        map.SetNpc(5, 220);
                        map.SetNpc(6, 220);
                        map.SetNpc(7, 220);
                        map.SetNpc(8, 220);
                        map.SetNpc(9, 220);
                        map.SetNpc(10, 220);
                        map.SetNpc(11, 220);
                        map.SetNpc(12, 220);
                        map.SetNpc(13, 220);
                        map.SetNpc(14, 221);

                        //map.SpawnNpc(1);
                        //map.SpawnNpc(2);
                        //map.SpawnNpc(3);
                        //map.SpawnNpc(4);
                        //map.SpawnNpc(5);
                        //map.SpawnNpc(6);
                        //map.SpawnNpc(7);
                        //map.SpawnNpc(8);
                        //map.SpawnNpc(9);
                        //map.SpawnNpc(10);
                        //map.SpawnNpc(11);
                        //map.SpawnNpc(12);
                        //map.SpawnNpc(13);
                        //map.SpawnNpc(14);

                    }
                    break;
                case 18: {//honchkrow defeated, warp opens.
                        IMap map = client.Player.Map;
                        map.SetTile(10, 6, 96, 4, 3);
                        map.SetTile(10, 5, 112576, 9, 3);
                        map.SetTile(10, 4, 112128, 9, 3);
                        // Left old code in case I did the math wrong...
                        //map.SetTile(10, 5, 128, 8032, 9, 3);
                        //map.SetTile(10, 4, 128, 8000, 9, 3);
                        map.SetAttribute(10, 6, Enums.TileType.Scripted, 46, 0, 0, "16", "683", "9:16");
                        Messenger.SendTile(10, 4, map);
                        Messenger.SendTile(10, 5, map);
                        Messenger.SendTile(10, 6, map);
                    }
                    break;
                case 19: {//daniel's fireplace question
                        if (client.Player.GetActiveRecruit().HasMove(452)) {
                            Messenger.AskQuestion(client, "Fireplace", "Will you use Rock Smash on the fireplace?", -1);
                        }
                    }
                    break;
                case 20: {//go into abandoned mansion
                        Messenger.AskQuestion(client, "AbandonedMansion2", "Only the team leader may enter this dungeon, is that OK?", -1);

                    }
                    break;
                case 21: {//vs. gengar
                        IMap map = client.Player.Map;
                        if (map.MapType != Enums.MapType.Instanced) {
                            client.CloseConnection();
                            return;
                        }
                        map.SetNpcSpawnPoint(1, 11, 6);
                        map.SetNpcSpawnPoint(2, 12, 8);
                        map.SetNpcSpawnPoint(3, 14, 8);
                        map.SetNpc(1, 804);
                        map.SetNpc(2, 809);
                        map.SetNpc(3, 812);
                        //map.SpawnNpc(1);
                        //map.SpawnNpc(2);
                        //map.SpawnNpc(3);

                    }
                    break;
                case 22: {//vs. Rotom
                        IMap map = client.Player.Map;

                        if (map.Name == "West Wing End") {
                            InstancedMap mapa = new InstancedMap(MapManager.GenerateMapID("i"));
                            MapCloner.CloneMapTiles(MapManager.RetrieveMap(825), mapa);
                            Messenger.PlayerWarp(client, mapa, 9, 10);
                            mapa.SetNpcSpawnPoint(1, 9, 3);
                            mapa.SetNpc(1, 806);
                            //mapa.SpawnNpc(1);

                        } else if (map.Name == "East Wing End") {

                            InstancedMap mapa = new InstancedMap(MapManager.GenerateMapID("i"));
                            MapCloner.CloneMapTiles(MapManager.RetrieveMap(826), mapa);
                            Messenger.PlayerWarp(client, mapa, 10, 10);
                            mapa.SetNpcSpawnPoint(1, 10, 3);
                            mapa.SetNpc(1, 807);
                            //mapa.SpawnNpc(1);

                        }
                    }
                    break;
                case 23: {//go into Hallowed Well
                        Messenger.AskQuestion(client, "HallowedWell2", "Only the team leader may enter this dungeon, and no Pokémon may be recruited.  Is that OK?", -1);
                    }
                    break;
                case 24: {//spiritomb battle
                        client.Player.TakeItem(251, 1);
                        IMap map = client.Player.Map;
                        map.SetNpcSpawnPoint(1, 9, 8);
                        map.SetNpc(1, 805);
                        //map.SpawnNpc(1);
                    }
                    break;
                case 25: {//spiritomb joins
                        // Fixed, uncomment when needed
                        // TODO: Spritomb joins
                        //client.Player.AddToRecruitmentBank(37, 209, 40, (ulong)1, 1, 0, 0, 40, 55, 10, 40, 1, 805, "Spiritomb");
                        Messenger.PlaySoundToMap(client.Player.MapID, "JoinGame.wav");
                    }
                    break;
                case 26: {//learn wish
                        client.Player.GetActiveRecruit().LearnNewMove(268);
                    }
                    break;
                case 27: {//vs. Articuno*
                        IMap map = client.Player.Map;
                        map.SetNpc(1, 440);
                        map.SetNpcSpawnPoint(1, 12, 11);
                        //map.SpawnNpc(1);
                    }
                    break;
                case 28: {//Give Natural Gift
                        Messenger.PlayerMsg(client, "You were given a Natural Gift!", Text.Yellow);
                        client.Player.GiveItem(232, 1);
                    }
                    break;
                case 29: {//Give Holly Present
                        Messenger.PlayerMsg(client, "You were given a Holly Present!", Text.Yellow);
                        client.Player.GiveItem(233, 1);
                    }
                    break;
                case 30: {//Give Mystery Gift
                        Messenger.PlayerMsg(client, "You were given a Mystery Gift!", Text.Yellow);
                        client.Player.GiveItem(234, 1);
                    }
                    break;
                case 31: {//Give PMDCP Present
                        Messenger.PlayerMsg(client, "You were given a PMDCP Present!", Text.Yellow);
                        client.Player.GiveItem(231, 1);
                    }
                    break;
                case 32: {//take white herb
                        Messenger.PlayerMsg(client, "You gave away some Candy Canes.", Text.Yellow);
                        client.Player.TakeItem(212, 12);
                    }
                    break;
                case 33: {//take soft string
                        Messenger.PlayerMsg(client, "You gave away some Soft String.", Text.Yellow);
                        client.Player.TakeItem(208, 20);
                    }
                    break;
                case 34: {//take soft snow
                        Messenger.PlayerMsg(client, "You gave away some Soft Snow.", Text.Yellow);
                        client.Player.TakeItem(209, 50);
                    }
                    break;
                case 35: {//Take ornaments
                        client.Player.GiveItem(174, 1);
                        Messenger.PlayerMsg(client, "You obtained a Shell Bell!", Text.Yellow);
                    }
                    break;
                case 36: {//vs. Heatran
                        IMap map = client.Player.Map;
                        map.SetNpc(1, 404);
                        map.SetNpcSpawnPoint(1, 12, 11);
                        //map.SpawnNpc(1);
                    }
                    break;
                case 37: {//vs. Xatu
                        BossBattles.RunPostIntroStoryBossBattle(client, "Pitch-Black Pit");
                    }
                    break;
                case 38: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "TinyGrotto");
                    }
                    break;
                case 39: {

                    BossBattles.RunBossBattleCleanup(client, client.Player.Map.Name);
                    }
                    break;
                case 40: {
                        client.Player.GiveItem(779, 1, "");
                    }
                    break;
                case 41: { // Post intro boss battle for Seaside Cavern
                        BossBattles.RunPostIntroStoryBossBattle(client, "SeasideCavern");
                    }
                    break;
                case 42: { // enter dungeon (random)

                        DungeonRules.StartRDungeon(client, param1, param2, param3);
                    }
                    break;
                case 43: {
                        BossBattles.StartBossWave(client, "ElectrostasisTowerA1", 1);
                    }
                    break;
                case 44: {
                        BossBattles.RunBossBattleCleanup(client, "ElectrostasisTowerA1");
                    }
                    break;
                case 45: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "ElectrostasisTowerA2");
                    }
                    break;
                case 46: {
                        //battle fossil & battle egg
                        int npcNum = -1;
                        switch (param1.ToInt()) {
                            case 138: //omanyte
                                npcNum = 272;
                            break;
                            case 140: //kabuto
                                npcNum = 250;
                            break;
                            case 142: //aerodactyl
                                npcNum = 132;
                            break;
                            case 345: //lileep
                                npcNum = 956;
                            break;
                            case 347: //anorith
                                npcNum = 957;
                            break;
                            case 408: //cranidos
                                npcNum = 959;
                            break;
                            case 410: //shieldon
                                npcNum = 958;
                            break;
                            case 566: //archen
                                npcNum = 973;
                            break;
                            break;
                            //case 566: //tirtouga
                            //	npcNum = 979;
                            //break;
                        }
                        if (npcNum > 0) {

                            MapNpcPreset npc = new MapNpcPreset();
                            npc.SpawnX = 9;
                            npc.SpawnY = 3;
                            npc.NpcNum = npcNum;
                            npc.MinLevel = param2.ToInt();
                            npc.MaxLevel = param2.ToInt();
                            client.Player.Map.SpawnNpc(npc);
                        }
                    }
                    break;
                case 47: {//egg hatch
                        int item = -1;
                        string[] recruitArgs = null;
                        for (int i = 1; i <= client.Player.MaxInv; i++) {
                            if (client.Player.Inventory[i].Num == 131) {
                                string[] eggArgs = client.Player.Inventory[i].Tag.Split(';');
                                if (eggArgs.Length <= 1 || !eggArgs[1].IsNumeric()) {
                                    client.Player.TakeItemSlot(i, 1, true);
                                } else {
                                    int step = eggArgs[1].ToInt();
                                    if (step <= 1) {
                                        item = i;
                                        recruitArgs = eggArgs[0].Split(',');
                                    }
                                    break;
                                }
                            }
                        }

                        if (item != -1) {

                            Recruit recruit = new Recruit(client);
                            //recruit.SpriteOverride = -1;
                            recruit.Level = 1;
                            recruit.Species = recruitArgs[0].ToInt();
                            recruit.Sex = Pokedex.GetPokemonForm(recruitArgs[0].ToInt()).GenerateLegalSex();
                            recruit.Name = Pokedex.GetPokemon(recruitArgs[0].ToInt()).Name;
                            recruit.NpcBase = 0;

                            recruit.GenerateMoveset();

                            //for egg moves, where applicable
                            List<int> eggMoves = GenerateEggMoveset(recruit.Species, recruit.Form, -1);

                            for (int i = 0; i < 4; i++) {
                                if (eggMoves.Count > 0) {
                                    int moveNum = eggMoves[Server.Math.Rand(0, eggMoves.Count)];
                                    recruit.Moves[i] = new RecruitMove();
                                    recruit.Moves[i].MoveNum = moveNum;
                                    recruit.Moves[i].MaxPP = Server.Moves.MoveManager.Moves[moveNum].MaxPP;
                                    recruit.Moves[i].CurrentPP = recruit.Moves[i].MaxPP;
                                    eggMoves.Remove(moveNum);
                                }
                            }

                            for (int i = 0; i < 4; i++) {
                                if (eggMoves.Contains(client.Player.GetActiveRecruit().Moves[i].MoveNum)) {
                                    int moveNum = client.Player.GetActiveRecruit().Moves[i].MoveNum;
                                    recruit.Moves[i] = new RecruitMove();
                                    recruit.Moves[i].MoveNum = moveNum;
                                    recruit.Moves[i].MaxPP = Server.Moves.MoveManager.Moves[moveNum].MaxPP;
                                    recruit.Moves[i].CurrentPP = recruit.Moves[i].MaxPP;
                                    eggMoves.Remove(client.Player.GetActiveRecruit().Moves[i].MoveNum);
                                }
                            }

                            int openSlot = client.Player.FindOpenTeamSlot();
                            int recruitIndex = -1;
                            using (DatabaseConnection dbConnection = new DatabaseConnection(DatabaseID.Players)) {
                                recruitIndex = client.Player.AddToRecruitmentBank(dbConnection, recruit);
                            }

                            if (recruitIndex != -1) {
                                client.Player.AddToTeam(recruitIndex, openSlot);
                                client.Player.Team[openSlot].HP = client.Player.Team[openSlot].MaxHP;
                                Messenger.BattleMsg(client, "You have recruited a new team member!", Text.BrightGreen);

                                Messenger.SendActiveTeam(client);
                            }

                            client.Player.TakeItemSlot(item, 1, true);

                            if (recruitArgs.Length > 1) client.Player.GiveItem(recruitArgs[1].ToInt(), 1);

                        }

                    }
                    break;
                case 48: {//teach egg move

                        int species = client.Player.GetActiveRecruit().Species;

                        if (Server.Evolutions.EvolutionManager.FindPreEvolution(species) > -1) {
                            species = Server.Evolutions.EvolutionManager.FindPreEvolution(species);
                        }
                        if (Server.Evolutions.EvolutionManager.FindPreEvolution(species) > -1) {
                            species = Server.Evolutions.EvolutionManager.FindPreEvolution(species);
                        }

                        List<int> eggMoves = GenerateEggMoveset(species, client.Player.GetActiveRecruit().Form, -1);

                        Messenger.PlayerMsg(client, "Poof!", Text.BrightGreen);
                        Messenger.PlaySound(client, "magic22.wav");
                        Messenger.SpellAnim(504, client.Player.MapID, client.Player.X, client.Player.Y);
                        if (eggMoves.Count > 0) {
                            client.Player.GetActiveRecruit().LearnNewMove(eggMoves[Server.Math.Rand(0, eggMoves.Count)]);
                            Messenger.SendPlayerMoves(client);
                        } else {
                            Messenger.PlayerMsg(client, "But nothing happened...", Text.Grey);
                        }

                    }
                    break;
                case 49: {//take egg

                        int item = -1;
                        string[] recruitArgs = null;
                        for (int i = 1; i <= client.Player.MaxInv; i++) {
                            if (client.Player.Inventory[i].Num == 131) {
                                string[] eggArgs = client.Player.Inventory[i].Tag.Split(';');
                                if (eggArgs.Length <= 1 || !eggArgs[1].IsNumeric()) {
                                    client.Player.TakeItemSlot(i, 1, true);
                                } else {
                                    int step = eggArgs[1].ToInt();
                                    if (step <= 1) {
                                        item = i;
                                        recruitArgs = eggArgs[0].Split(',');
                                    }
                                    break;
                                }
                            }
                        }

                        if (item != -1) {
                            client.Player.TakeItemSlot(item, 1, true);
                        }

                    }
                    break;
                case 50: {
                        BossBattles.StartBossWave(client, "ElectrostasisTowerA1", 2);
                    }
                    break;
                case 51: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "CliffsideRelic");
                    }
                    break;
                case 52: {//enter dungeon (normal map)
                        DungeonRules.StartDungeon(client, param1, param2, param3);
                    }
                    break;
                case 53: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "ThunderstormForest");
                    }
                    break;
                case 54: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "ThunderstormForestPart2");
                    }
                    break;
                case 55: { // Open tournament listing
                        Messenger.SendTournamentListingTo(client, null);
                    }
                    break;
                case 56: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "SourRootMini");
                    }
                    break;
                case 57: {//start boss battle
                        BossBattles.PrepareBossRoom(client, (InstancedMap)client.Player.Map);
                    }
                    break;
                case 58: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "SourRoot");
                    }
                    break;
                case 59: {//run post intro story boss battle

                        BossBattles.RunPostIntroStoryBossBattle(client, param1);
                    }
                    break;
                case 60: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "SaunaCavernMini");
                    }
                    break;
                case 61: {//enter arena
                        for (int i = 1; i <= client.Player.MaxInv; i++) {
                            if (client.Player.Inventory[i].Num > 0
                                && ItemManager.Items[client.Player.Inventory[i].Num].Type != Enums.ItemType.Held && ItemManager.Items[client.Player.Inventory[i].Num].Type != Enums.ItemType.HeldByParty
                                && ItemManager.Items[client.Player.Inventory[i].Num].Type != Enums.ItemType.HeldInBag) {
                                bool held = false;

                                for (int j = 0; j < Constants.MAX_ACTIVETEAM; j++) {
                                    if (client.Player.Team[j] != null
                                        && client.Player.Team[j].HeldItemSlot == i) {
                                        held = true;
                                    }

                                }

                                if (!held) {
                                    int slot = i;
                                    int amount = client.Player.Inventory[slot].Amount;
                                    int X = client.Player.Inventory[slot].Num;
                                    string tag = client.Player.Inventory[slot].Tag;
                                    int j = client.Player.FindBankSlot(X, amount);
                                    if (j == -1) {
                                        Messenger.PlayerMsg(client, "The storage can't store all items!", Text.BrightRed);
                                        return;
                                    }

                                    client.Player.TakeItemSlot(slot, amount, true);
                                    client.Player.GiveBankItem(X, amount, tag, j);

                                }
                            }
                        }
                        Messenger.PlayerMsg(client, "Items were sent to storage!", Text.Yellow);
                        EnterArena(client, client.Player.GetActiveRecruit(), client.Player.Map, param2, param3, null);
                    }
                    break;
                case 62: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "SaunaCavern");
                    }
                    break;
                case 64: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "CrystalRuins");
                    }
                    break;
                case 66: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "FrozenCitadel");
                    }
                    break;
                case 68: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "SouthernSea");
                    }
                    break;
                case 69: {
                        BossBattles.RunPostIntroStoryBossBattle(client, "LenilePit");
                    }
                    break;
                case 70: {
                        Messenger.PlayerWarp(client, 1035, 9, 7);
                    }
                    break;
                case 71: {//teach tutor move
                        int species = client.Player.GetActiveRecruit().Species;

                        List<int> eggMoves = GenerateTutorMoveset(species, client.Player.GetActiveRecruit().Form, param1.ToInt());

                        Messenger.PlayerMsg(client, "GOOOOONG!", Text.BrightGreen);
                        Messenger.PlaySound(client, "magic1011.wav");
                        Messenger.SpellAnim(498, client.Player.MapID, client.Player.X, client.Player.Y);
                        if (eggMoves.Count > 0) {
                            client.Player.GetActiveRecruit().LearnNewMove(eggMoves[Server.Math.Rand(0, eggMoves.Count)]);
                            Messenger.SendPlayerMoves(client);
                        } else {
                            Messenger.PlayerMsg(client, "But nothing happened...", Text.Grey);
                        }
                    }
                    break;

               }
            } catch (Exception ex) {
                Messenger.AdminMsg("Error: StoryScript " + scriptNum + ": " + param1 + "-" + param2 + "-" + param3, Text.Black);

                Messenger.AdminMsg(ex.ToString(), Text.Black);
            }
        }
Beispiel #2
0
        public static void StartBossBattle(Client client, InstancedMap bossMap)
        {
            if (bossMap.TempStatus.GetStatus("Boss") != null) return;

            switch (bossMap.MapBase) {
                case 1422: {//regice
                        // Currently in mission, warp to normal map
                        // TODO: Add regice code here [Scripts]
                        //if (client.Player.ActiveMission != null && client.Player.ActiveMission.WonderMail.Code == "regicecode") {
                        //    Messenger.PlayerWarp(client, 1422, 10, 22);
                        //    StoryManager.PlayStory(client, 994);
                        //} else {// Not in mission, warp to instanced map
                        //    //if (Ranks.IsAllowed(index, Enums.Rank.Moniter)) {
                        //    InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //    MapCloner.CloneMapTiles(MapManager.RetrieveMap(1422), map);
                        //    map.MapBase = 1422;
                        //    Messenger.PlayerWarp(client, map, 10, 21);
                        //    StoryManager.PlayStory(client, 989);
                        //    //}
                        //}
                    }
                    break;
                case 914: {//jirachi
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(914), map);
                        map.MapBase = 914;
                        Messenger.PlayerWarp(client, map, 9, 12);
                        StoryManager.PlayStory(client, 149);
                    }
                    break;
                case 89: {//steelix
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(89), map);
                        map.MapBase = 89;
                        Messenger.PlayerWarp(client, map, 9, 11);
                        map.SetNpcSpawnPoint(1, 9, 5);
                        map.SetNpc(1, 465);
                        //map.SpawnNpc(1);
                    }
                    break;
                case 590: {//dynamo
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(590), map);
                        map.MapBase = 590;
                        Messenger.PlayerWarp(client, map, 10, 7);
                        map.SetNpc(1, 276);
                        map.SetNpc(2, 277);
                        map.SetNpc(3, 278);
                        //map.SpawnNpc(1);
                        //map.SpawnNpc(2);
                        //map.SpawnNpc(3);
                    }
                    break;
                case 569: {//groudon
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(569), map);
                        map.MapBase = 569;
                        Messenger.PlayerWarp(client, map, 10, 13);
                        StoryManager.PlayStory(client, 154);
                    }
                    break;
                case 667: {//honchkrow
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(667), map);
                        map.MapBase = 667;
                        //NetScript.LockPlayer(index);
                        Messenger.PlayerWarp(client, map, 10, 20);
                        //if (Ranks.IsDisallowed(index, Enums.Rank.StoryWriter)) {
                        if (client.Player.GetDungeonCompletionCount(15) < 1) {
                            StoryManager.PlayStory(client, 159);
                        } else {
                            StoryManager.PlayStory(client, 162);
                        }
                    }
                    break;
                case 424: {//hermi cave
                        //ObjectFactory.GetPlayer(index).IncrementDungeonCompletionCount(9, 1);
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(424), map);
                        map.MapBase = 424;
                        if (client.Player.GetDungeonCompletionCount(9) < 2) {
                            map.SetAttribute(9, 16, Enums.TileType.Item, 370, 1, 0, "", "", "");
                            map.SetAttribute(10, 16, Enums.TileType.Item, 371, 1, 0, "", "", "");
                        } else {
                            map.SetAttribute(9, 15, Enums.TileType.Item, 263, 4, 0, "", "", "");
                            map.SetAttribute(10, 15, Enums.TileType.Item, 264, 4, 0, "", "", "");
                            map.SetAttribute(8, 16, Enums.TileType.Item, 265, 4, 0, "", "", "");
                            map.SetAttribute(11, 16, Enums.TileType.Item, 266, 4, 0, "", "", "");
                            map.SetAttribute(8, 17, Enums.TileType.Item, 266, 4, 0, "", "", "");
                            map.SetAttribute(11, 17, Enums.TileType.Item, 265, 4, 0, "", "", "");
                            map.SetAttribute(9, 18, Enums.TileType.Item, 264, 4, 0, "", "", "");
                            map.SetAttribute(10, 18, Enums.TileType.Item, 263, 4, 0, "", "", "");
                            map.SetAttribute(9, 16, Enums.TileType.Blocked, 0, 0, 0, "", "", "");
                            map.SetAttribute(10, 16, Enums.TileType.Blocked, 0, 0, 0, "", "", "");
                            map.SetAttribute(9, 17, Enums.TileType.Blocked, 0, 0, 0, "", "", "");
                            map.SetAttribute(10, 17, Enums.TileType.Blocked, 0, 0, 0, "", "", "");
                            map.SetTile(9, 15, 118400, 7, 5);
                            map.SetTile(10, 15, 118432, 7, 5);
                            map.SetTile(9, 16, 118848, 7, 5);
                            map.SetTile(10, 16, 118880, 7, 5);
                            map.SetTile(9, 17, 119296, 7, 5);
                            map.SetTile(10, 17, 119328, 7, 5);
                            //map.SetTile(9, 15, 128, 8448, 7, 5);
                            //map.SetTile(10, 15, 160, 8448, 7, 5);
                            //map.SetTile(9, 16, 128, 8480, 7, 5);
                            //map.SetTile(10, 16, 160, 8480, 7, 5);
                            //map.SetTile(9, 17, 128, 8512, 7, 5);
                            //map.SetTile(10, 17, 160, 8512, 7, 5);
                            map.SetAttribute(9, 23, Enums.TileType.Story, 147, 2, 0, "", "", "");
                        }
                        Messenger.PlayerWarp(client, map, 9, 30);
                        //if (ObjectFactory.GetPlayer(index).GetDungeonCompletionCount(9) >= 2) {
                        //    NetScript.PlaySound(index, "magic68.wav");
                        //NetScript.PlayStory(index, 147);
                        //}
                    }
                    break;
                case 503: {//registeel
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(503), map);
                        map.MapBase = 503;
                        Messenger.PlayerWarp(client, map, 9, 12);
                        StoryManager.PlayStory(client, 37);
                    }
                    break;
                case 1108: {//mysterious jungle
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(1108), map);
                        map.MapBase = 1108;
                        Messenger.PlayerWarp(client, map, 10, 13);
                        if (client.Player.HasItem(479) > 0) {
                            StoryManager.PlayStory(client, 165);
                        } else {
                            StoryManager.PlayStory(client, 164);
                        }
                    }
                    break;
                case 174: {//pokemas
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(174), map);
                        //map.MapBase = 174;
                        //Messenger.PlayerWarp(client, map, 12, 19);
                        //StoryManager.PlayStory(client, 170);
                    }
                    break;
                case 465: {//heatran
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        MapCloner.CloneMapTiles(MapManager.RetrieveMap(465), map);
                        map.MapBase = 465;
                        Messenger.PlayerWarp(client, map, 10, 27);
                        map.SetNpc(1, 404);
                        map.SetNpcSpawnPoint(1, 10, 6);
                        //map.SpawnNpc(1);
                    }
                    break;
                case 1563: {//xatu
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1563), map);
                        //map.MapBase = 1563;
                        //Messenger.PlayerWarp(client, map, 7, 3);
                        StoryManager.PlayStory(client, 175);
                    }
                    break;
                //case "Darkrai": {
                //        //instanced map
                //        //warp
                //        //story
                //    }
                //    break;
                case 1287: {//tiny grotto
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1287), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1287), map);
                        //map.MapBase = 1287;
                        //Messenger.PlayerWarp(client, map, 9, 10);

                        StoryManager.PlayStory(client, 102);
                        //map.SetNpc(0, 502);
                        //map.SetNpcSpawnPoint(0, 9, 3);
                    }
                    break;
                case 114: {//sour root mini
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(114), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(114), map);
                        //map.MapBase = 114;
                        //Messenger.PlayerWarp(client, map, 7, 12);

                        StoryManager.PlayStory(client, 138);
                    }
                    break;
                case 115: {//sour root
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(115), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(115), map);
                        //map.MapBase = 115;
                        //Messenger.PlayerWarp(client, map, 10, 10);

                        StoryManager.PlayStory(client, 136);
                    }
                    break;
                case 255: {//seaside cavern
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(255), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(255), map);
                        //map.MapBase = 255;
                        //map.SetTile(9, 4, 6, 0, 4, 3);
                        //map.SetAttribute(9, 4, Server.Enums.TileType.Blocked, 0, 0, 0, "", "", "");
                        //Messenger.PlayerWarp(client, map, 9, 9);

                        StoryManager.PlayStory(client, 115);
                    }
                    break;
                case 1609: {
                        InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        IMap originalMap = MapManager.RetrieveMap(1609);
                        MapCloner.CloneMapTileProperties(originalMap, map);
                        MapCloner.CloneMapTiles(originalMap, map);

                        Messenger.PlayerWarp(client, map, 11, 29);
                    }
                    break;
                case 1288: {//cliffside
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1288), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1288), map);
                        //map.MapBase = 1288;
                        //Messenger.PlayerWarp(client, map, 10, 10);

                        StoryManager.PlayStory(client, 118);
                    }
                    break;
                case 531: {//thunderstorm forest
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(531), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(531), map);
                        //map.MapBase = 531;
                        //Messenger.PlayerWarp(client, map, 9, 13);

                        StoryManager.PlayStory(client, 122);
                    }
                    break;
                case 1248: {//sauna cavern mini
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1248), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1248), map);
                        //map.MapBase = 1248;
                        //Messenger.PlayerWarp(client, map, 9, 12);

                        StoryManager.PlayStory(client, 142);
                    }
                    break;
                case 1263: {//sauna cavern
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1263), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1263), map);
                        //map.MapBase = 1263;
                        //Messenger.PlayerWarp(client, map, 10, 12);

                        StoryManager.PlayStory(client, 140);
                    }
                    break;
                case 1392: {//crystal ruins
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1392), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1392), map);
                        //map.MapBase = 1392;
                        //Messenger.PlayerWarp(client, map, 9, 11);

                        StoryManager.PlayStory(client, 186);
                    }
                    break;
                case 1394: {//frozen citadel
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1394), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1394), map);
                        //map.MapBase = 1394;
                        //Messenger.PlayerWarp(client, map, 10, 10);

                        StoryManager.PlayStory(client, 188);
                    }
                    break;
                case 1362: {//southern sea
                        //InstancedMap map = new InstancedMap(MapManager.GenerateMapID("i"));
                        //MapCloner.CloneMapTiles(MapManager.RetrieveMap(1362), map);
                        //MapCloner.CloneMapGeneralProperties(MapManager.RetrieveMap(1362), map);
                        //map.MapBase = 1362;
                        //Messenger.PlayerWarp(client, map, 9, 12);

                        StoryManager.PlayStory(client, 144);
                    }
                    break;
                case 1335: {//Chandalure
                        StoryManager.PlayStory(client, 217);
                    }
                    break;
                case 718: {//rotom forme
                        StoryManager.PlayStory(client, 215);
                    }
                    break;
                case 534: {//lapras
                        StoryManager.PlayStory(client, 216);
                    }
                    break;
                case 1638: {//skylift
                        StoryManager.PlayStory(client, 197);
                    }
                    break;
                case 1048: {//Exbel Woods Clearing
                        StoryManager.PlayStory(client, 196);
                    }
                    break;
                case 1851: {//beach bunker
                        StoryManager.PlayStory(client, 203);
                    }
                    break;
                case 1637: {//snowveil lair
                        StoryManager.PlayStory(client, 326);
                    }
                    break;
                case 1670: {//snowveil pit
                        StoryManager.PlayStory(client, 328);
                    }
                    break;
                case 1662: {//snowveil end
                        StoryManager.PlayStory(client, 330);
                    }
                    break;
                case 1722: {//articuno
                        StoryManager.PlayStory(client, 170);
                    }
                    break;
                case 1526: {//Deep Winden Forest Clearing
                        StoryManager.PlayStory(client, 322);
                    }
                    break;
                case 1744: {//Inferno Volcano Core
                        StoryManager.PlayStory(client, 393);
                    }
                    break;
                case 1745: {//Mysterious Jungle Undergrowth
                        StoryManager.PlayStory(client, 346);
                    }
                    break;
                case 1765: {//Inferno Volcano
                        StoryManager.PlayStory(client, 141);
                    }
                    break;
                case 1701: {//Sacred Tower, Fiery Passage
                        StoryManager.PlayStory(client, 370);
                    }
                    break;
                case 1702: {//Sacred Tower, Garden Passage
                        StoryManager.PlayStory(client, 371);
                    }
                    break;
                case 1703: {//Sacred Tower, Aquatic Passage
                        StoryManager.PlayStory(client, 372);
                    }
                    break;
                case 1704: {//Sacred Tower, Frigid Passage
                        StoryManager.PlayStory(client, 373);
                    }
                    break;
                case 1705: {//Sacred Tower, Electrical Passage
                        StoryManager.PlayStory(client, 374);
                    }
                    break;
                case 1706: {//Sacred Tower, Malign Passage
                        StoryManager.PlayStory(client, 375);
                    }
                    break;
                case 1707: {//Sacred Tower, Esoteric Passage
                        StoryManager.PlayStory(client, 376);
                    }
                    break;
                case 1708: {//Sacred Spire
                        StoryManager.PlayStory(client, 378);
                    }
                    break;
                case 1692: {//Tanren Dojo, Hitmonchan
                        StoryManager.PlayStory(client, 247);
                    }
                    break;
                case 1694: {//Tanren Dojo, Hitmonlee
                        StoryManager.PlayStory(client, 267);
                    }
                    break;
                case 1715: {//Tanren Dojo, Hitmontop
                        StoryManager.PlayStory(client, 323);
                    }
                    break;
                case 982: {//Honeydrop Meadow Clearing
                        StoryManager.PlayStory(client, 352);
                    }
                    break;
                case 1994: {//Boss Rush 1
                        StoryManager.PlayStory(client, 354);
                    }
                    break;
                case 1990: {//Boss Rush 2
                        StoryManager.PlayStory(client, 355);
                    }
                    break;
                case 1983: {//Boss Rush 3
                        StoryManager.PlayStory(client, 356);
                    }
                    break;
                case 539: {//Boss Rush 4
                        StoryManager.PlayStory(client, 357);
                    }
                    break;
                case 496: {//Boss Rush 5
                        StoryManager.PlayStory(client, 358);
                    }
                    break;
                case 1786: {//Boggy Wastes Chamber
                        StoryManager.PlayStory(client, 360);
                    }
                    break;
                case 787: {//Boggy Wastes Lair
                        StoryManager.PlayStory(client, 362);
                    }
                    break;
                case 1754: {//Tanren Mines, Dead End
                        StoryManager.PlayStory(client, 425);
                    }
                    break;
                case 1954: {//Tanren Mines Vestibule
                        StoryManager.PlayStory(client, 210);
                    }
                    break;
                case 1136: {//Tanren Mines End
                        StoryManager.PlayStory(client, 214);
                    }
                    break;
            }
        }