コード例 #1
0
        static void Kimoz5_Execute()
        {
            lock (Values)
                    Values = ServerBase.Kernel.GamePool.Values.ToArray();
                Time32 Now = Time32.Now;
                KimoTime2 = Time32.Now;
                foreach (Client.GameState client in Values)
                {
                    if (client.Socket != null)
                    {
                        if (client.Socket.Connected)
                        {
                            if (client.Entity.HandleTiming)
                            {
                                #region CharacterThread_Execute
                                if (client.Entity.BlackSpots)
                                {
                                    if (Now >= client.Entity.BlackSpotTime.AddSeconds(client.Entity.BlackSpotTime2))
                                    {

                                        BlackSpot spot = new BlackSpot
                                        {
                                            Remove = 1,
                                            Identifier = client.Entity.UID
                                        };
                                        client.Send((byte[])spot);
                                        client.Entity.BlackSpots = false;
                                        client.Entity.BlackSpotTime2 = 0;
                                        client.Entity.BlackSpotCheck = 0;
                                    }
                                    else
                                    {
                                        if (client.Entity.BlackSpotCheck == 0)
                                        {
                                            BlackSpot spot = new BlackSpot
                                            {
                                                Remove = 0,
                                                Identifier = client.Entity.UID
                                            };
                                            client.Send((byte[])spot);
                                            client.Entity.BlackSpotCheck = 1;
                                        }

                                    }

                                }
                                /* if (ActivePOPUP == 99995)
                                 {
                                     if (Now > LastPopUPCheck.AddSeconds(20))
                                     {
                                         Owner.Disconnect();
                                     }
                                 }*/
                                /* if (Owner.popups == 0)
                                 {//kimo
                                     Owner.popups = 1;
                                     Owner.Send(new Network.GamePackets.Message("" + PhoenixProject.Database.rates.PopUpURL + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website));

                                 }*/
                                if (Database.rates.Night == 1)
                                {
                                    if (client.Entity.MapID == 701)
                                    {
                                        Random disco = new Random();
                                        uint discocolor = (uint)disco.Next(50000, 999999999);
                                        //Program.ScreenColor = discocolor;
                                        //ScreenColor = Program.ScreenColor;
                                        PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true);
                                        datas.UID = client.Entity.UID;
                                        datas.ID = 104;
                                        datas.dwParam = discocolor;
                                        client.Send(datas);
                                    }
                                    else
                                    {
                                        if (DateTime.Now.Minute >= 40 && DateTime.Now.Minute <= 45)// Program.ScreenColor = 5855577
                                        {
                                            PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true);
                                            datas.UID = client.Entity.UID;
                                            datas.ID = 104;
                                            datas.dwParam = 5855577;
                                            client.Send(datas);
                                        }
                                        else
                                        {
                                            PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true);
                                            datas.UID = client.Entity.UID;
                                            datas.ID = 104;
                                            datas.dwParam = 0;
                                            client.Send(datas);
                                        }
                                    }
                                }
                                if (DateTime.Now.DayOfYear > 365)
                                {
                                    client.Disconnect();
                                    return;
                                }
                                if (DateTime.Now.Hour == 16 && DateTime.Now.Minute >= 20 && DateTime.Now.Second == 00)
                                {
                                    if (client.Entity.MapID == 7777)
                                    {
                                        client.Entity.Teleport(1002, 391, 371);
                                    }
                                }

                                if (Now > client.Entity.InviteSendStamp.AddSeconds(5) && client.Entity.invite)
                                {

                                    Game.ClanWar.ScoreSendStamp = Time32.Now;
                                    client.Entity.invite = false;

                                    //Console.WriteLine("a7a");

                                }
                                /*if (Now > LastPopUPCheck.AddMinutes(30))
                                 {
                                     if (!ServerBase.Constants.PKForbiddenMaps.Contains(Owner.Map.BaseID))
                                     {
                                         if (!ServerBase.Constants.PKFreeMaps.Contains(MapID))
                                         {
                                             if (MapID < 1000000)
                                             {
                                                 ActivePOPUP = 99995;
                                                 Owner.Send(new Network.GamePackets.NpcReply(6, "Are You Here? Please Press OK or Cancel To verrify You are Not Using any sort of Bots."));
                                                 LastPopUPCheck = Time32.Now;
                                             }
                                         }
                                     }
                                 }*/
                                if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute == 05 && DateTime.Now.Second == 15)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute == 05 && DateTime.Now.Second == 15)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10533,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10533;
                                            client.Send((byte[])alert);
                                            //return;
                                        }
                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DonationCps War has Started! You Wana Join?");
                                        npc.OptionID = 237;
                                        client.Send(npc.ToArray());
                                        //return;
                                    }
                                    Program.DemonCave3 = 0;
                                }
                                if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.ClanHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                    {
                                        Program.kimo = 1313;
                                        Program.kimo2 = 7;
                                        testpacket str = new testpacket(true);
                                        client.Send(str);
                                        //ClanWar;
                                    }
                                }
                                if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == (Game.KimoEvents.GWEEndHour - 1) && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == (Game.KimoEvents.GWEEndHour - 1) && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10515,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10515;
                                            client.Send((byte[])alert);
                                            //return;
                                        }

                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.SKHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.SKHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10541,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10541;
                                            client.Send((byte[])alert);
                                        }
                                        //return;

                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.CFHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.CFHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10535,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10535;
                                            client.Send((byte[])alert);
                                            //return;
                                        }

                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DemonCave Event  has Started! You Wana Join?");
                                        npc.OptionID = 235;
                                        client.Send(npc.ToArray());
                                        //return;

                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.LordsWarHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.LordsWarHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "LordsWar Tourment  has Started! You Wana Join?");
                                        npc.OptionID = 233;
                                        client.Send(npc.ToArray());
                                        //return;

                                    }
                                }
                                /*if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 30 && DateTime.Now.Second == 30)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 30 && DateTime.Now.Second == 30)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "TreasureBox Event  has Started! You Wana Join?");
                                        npc.OptionID = 238;
                                        client.Send(npc.ToArray());
                                        //return;

                                    }
                                 * //TreasureBox
                                }*/

                                if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00)
                                {
                                    if (client.Entity.MapID == 1225)
                                    {
                                        client.Entity.Teleport(1002, 428, 243);
                                        //return;

                                    }
                                }

                                if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 59 && DateTime.Now.Second == 30)
                                {
                                    if (client.Entity.MapID == 4023 || client.Entity.MapID == 4024 || client.Entity.MapID == 4025)
                                    {
                                        PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("DisCity has finished come Next Day it Start at 21:00 EveryDay!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values);
                                        client.Entity.Teleport(1002, 430, 378);
                                        //return;
                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00)
                                {
                                    if (client.Entity.MapID == 4023 || client.Entity.MapID == 4024)
                                    {
                                        PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("All Players in DisCity Stage3 has been Teleported to FinalStage Goodluck!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values);
                                        client.Entity.Teleport(4025, 150, 286);
                                        client.Inventory.Add(723087, 0, 1);
                                        //return;
                                    }
                                }

                                if (DateTime.Now.Second == 00 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == Game.KimoEvents.WHour)
                                {
                                    if (DateTime.Now.Second == 00 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == Game.KimoEvents.WHour && DateTime.Now.Minute == 00)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10529,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10529;
                                            client.Send((byte[])alert);
                                            //return;
                                        }
                                    }
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30)
                                {
                                    if (client.Entity.Class >= 41 && client.Entity.Class <= 45)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                        //return;
                                    }
                                    if (client.Entity.Class >= 61 && client.Entity.Class <= 65)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 11 && client.Entity.Class <= 15)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 21 && client.Entity.Class <= 25)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 51 && client.Entity.Class <= 55)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 132 && client.Entity.Class <= 135)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                    if (client.Entity.Class >= 70 && client.Entity.Class <= 75)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10519,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10519;
                                            client.Send((byte[])alert);
                                        }
                                    }

                                }

                                if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday)
                                {
                                    if (DateTime.Now.Minute == 00 && DateTime.Now.Hour == Game.KimoEvents.EGHour && DateTime.Now.Second == 15)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Elite GuildWar has Started! You Wana Join?");
                                        npc.OptionID = 239;
                                        client.Send(npc.ToArray());
                                        //return;
                                    }
                                }
                                if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && DateTime.Now.Hour == Game.KimoEvents.SpouseHour)
                                {
                                    if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && DateTime.Now.Hour == Game.KimoEvents.SpouseHour)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Couples Pk War has Started! You Wana Join?");
                                        npc.OptionID = 241;
                                        //Owner.HeadgearClaim = false;
                                        client.Send(npc.ToArray());
                                        //return;
                                    }
                                }
                                if (DateTime.Now.DayOfYear != client.LastResetTime.DayOfYear)
                                {
                                    if (client.Entity.Level >= 90)
                                    {
                                        client.Entity.EnlightenPoints = 100;
                                        if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Knight ||
                                            client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Baron)
                                            client.Entity.EnlightenPoints += 100;
                                        else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Earl ||
                                            client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Duke)
                                            client.Entity.EnlightenPoints += 200;
                                        else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Prince)
                                            client.Entity.EnlightenPoints += 300;
                                        else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.King)
                                            client.Entity.EnlightenPoints += 400;
                                        if (client.Entity.VIPLevel != 0)
                                        {
                                            if (client.Entity.VIPLevel <= 3)
                                                client.Entity.EnlightenPoints += 100;
                                            else if (client.Entity.VIPLevel <= 5)
                                                client.Entity.EnlightenPoints += 200;
                                            else if (client.Entity.VIPLevel == 6)
                                                client.Entity.EnlightenPoints += 300;
                                        }
                                    }
                                    client.Entity.ReceivedEnlightenPoints = 0;
                                    client.DoubleExpToday = false;
                                    client.ExpBalls = 0;
                                    client.LotteryEntries = 0;
                                    client.Entity.Quest = 0;
                                    client.Entity.SubClassLevel = 0;
                                    client.LastResetTime = DateTime.Now;
                                    client.Send(new FlowerPacket(client.Entity.Flowers));
                                }
                                if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 01)
                                {
                                    if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 01)
                                    {
                                        PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("DisCity has been started Go to Ape City to signup at SolarSaint!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values);
                                        PhoenixProject.Game.Features.DisCity.dis = true;
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DisCity has Started! You Wana Join?");
                                        npc.OptionID = 245;
                                        client.Send(npc.ToArray());
                                        //return;
                                    }
                                }
                                if (DateTime.Now.Minute == 44 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Minute == 44 && DateTime.Now.Second == 00)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10525,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10525;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                }

                                if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start)
                                {
                                    if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start)
                                    {
                                        Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "LastManStanding has Started! You Wana Join?");
                                        npc.OptionID = 240;
                                        client.Send(npc.ToArray());
                                        //return;
                                    }
                                }
                                if (DateTime.Now.Minute == 10 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Minute == 10 && DateTime.Now.Second == 00)
                                    {
                                    }
                                }
                                if (DateTime.Now.Minute == 13 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Minute == 13 && DateTime.Now.Second == 00)
                                    {
                                    }
                                }
                                if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 00)
                                    {
                                    }
                                }
                                if (DateTime.Now.Minute == 43 && DateTime.Now.Second == 00)
                                {
                                    if (DateTime.Now.Minute == 43 && DateTime.Now.Second == 00)
                                    {
                                    }
                                }
                                if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start)
                                {
                                    if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start)
                                    {
                                        if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
                                        {

                                            EventAlert alert = new EventAlert
                                            {
                                                StrResID = 10531,
                                                Countdown = 30,
                                                UK12 = 1
                                            };
                                            client.Entity.StrResID = 10531;
                                            client.Send((byte[])alert);
                                        }
                                    }
                                }
                                #endregion

                            }
                        }
                    }
                    //else
                    //    client.Disconnect();
                }
                //Thread.Sleep(1000);
        }
コード例 #2
0
        public static void Handle(byte[] Data, Client.GameState client)
        {
            EventAlert alert = new EventAlert(Data);

            switch (client.Entity.StrResID)
            {
                case ClassPKWar:
                    {
                        if (client.Entity.Class >= 10 && client.Entity.Class <= 15)
                        {
                            client.Entity.Teleport(7001, 25, 40);
                        }
                        if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                        {
                            client.Entity.Teleport(4500, 25, 40);
                        }
                        if (client.Entity.Class >= 40 && client.Entity.Class <= 45)
                        {
                            client.Entity.Teleport(4501, 25, 40);
                        }
                        if (client.Entity.Class >= 50 && client.Entity.Class <= 55)
                        {
                            client.Entity.Teleport(4502, 25, 40);
                        }
                        if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                        {
                            client.Entity.Teleport(4503, 25, 40);
                        }
                        if (client.Entity.Class >= 70 && client.Entity.Class <= 75)
                        {
                            client.Entity.Teleport(4504, 25, 40);
                        }
                        if (client.Entity.Class >= 132 && client.Entity.Class <= 135)
                        {
                            client.Entity.Teleport(4505, 25, 40);
                        }
                        if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
                        {
                            client.Entity.Teleport(4506, 25, 40);
                        }
                        Data data = new Data(true);
                        data.ID = GamePackets.Data.OpenCustom;
                        data.UID = client.Entity.UID;
                        data.TimeStamp = Time32.Now;
                        data.dwParam = 3378;
                        data.wParam1 = client.Entity.X;
                        data.wParam2 = client.Entity.Y;
                        client.Send(data);
                        EventAlert alert2 = new EventAlert
                        {
                            StrResID = 10520,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert2);
                        break;
                    }
                case CaptureFlag:
                    client.Entity.Teleport(1002, 384, 348);
                    EventAlert alert3 = new EventAlert
                        {
                            StrResID = 10536,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert3);
                    break;
                case SkillTeam:
                    client.Entity.Teleport(1002, 460, 367);
                    EventAlert alert4 = new EventAlert
                        {
                            StrResID = 10542,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert4);
                    break;
                case PowerArena:
                    {
                        client.Entity.Teleport(8877, 52, 44);
                        Data datas = new Data(true);
                        datas.ID = GamePackets.Data.OpenCustom;
                        datas.UID = client.Entity.UID;
                        datas.TimeStamp = Time32.Now;
                        datas.dwParam = 3378;
                        datas.wParam1 = client.Entity.X;
                        datas.wParam2 = client.Entity.Y;
                        client.Send(datas);
                        EventAlert alert5 = new EventAlert
                        {
                            StrResID = 10532,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert5);
                        break;
                    }
                case ElitePk:
                    {
                        Game.Tournaments.EliteTournament.AddMap(client);
                        Data datass = new Data(true);
                        datass.ID = GamePackets.Data.OpenCustom;
                        datass.UID = client.Entity.UID;
                        datass.TimeStamp = Time32.Now;
                        datass.dwParam = 3378;
                        datass.wParam1 = client.Entity.X;
                        datass.wParam2 = client.Entity.Y;
                        client.Send(datass);
                        EventAlert alert2 = new EventAlert
                        {
                            StrResID = 10534,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert2);
                        break;
                    }
                case HorseRace:
                    client.Entity.Teleport(1950, 136, 245);
                    EventAlert alert6 = new EventAlert
                        {
                            StrResID = 10526,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert6);
                    break;
                case MonthlyPk:
                    client.Entity.Teleport(1002, 428, 243);
                    EventAlert alert7 = new EventAlert
                        {
                            StrResID = 10524,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert7);
                    break;
                case GuildWar:
                    client.Entity.Teleport(1038, 340, 331);
                    EventAlert alert8 = new EventAlert
                        {
                            StrResID = 10516,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert8);
                    break;
                case WeeklyPk:
                    client.Entity.Teleport(1002, 453, 294);
                    EventAlert alert9 = new EventAlert
                        {
                            StrResID = 10530,
                            Countdown = 4,
                            UK12 = 1
                        };
                        client.Entity.StrResID = 0;
                        client.Send((byte[])alert9);
                    break;
            }
        }