Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void LoginMessages(Client.GameClient client)
- {
- #region lacb
- if (client.Entity.lacb >= 10 & client.Entity.lacb <= 300)
- {//MenaMagice
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 1, true);
- }
- if (client.Entity.lacb >= 300 & client.Entity.lacb <= 600)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 2, true);
- }
- if (client.Entity.lacb >= 600 & client.Entity.lacb <= 900)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 3, true);
- }
- if (client.Entity.lacb >= 900 & client.Entity.lacb <= 1300)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 4, true);
- }
- if (client.Entity.lacb >= 1300 & client.Entity.lacb <= 1600)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 5, true);
- }
- if (client.Entity.lacb >= 1600 & client.Entity.lacb <= 1900)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 6, true);
- }
- if (client.Entity.lacb >= 1900 & client.Entity.lacb <= 2200)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 7, true);
- }
- if (client.Entity.lacb >= 2200 & client.Entity.lacb <= 2800)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 8, true);
- }
- if (client.Entity.lacb >= 2800 & client.Entity.lacb <= 3400)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 9, true);
- }
- if (client.Entity.lacb >= 3400 & client.Entity.lacb <= 4200)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 10, true);
- }
- if (client.Entity.lacb >= 4200 & client.Entity.lacb <= 5400)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 11, true);
- }
- if (client.Entity.lacb >= 5400 & client.Entity.lacb <= 6800)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 12, true);
- }
- if (client.Entity.lacb >= 6800)
- {
- client.Entity.Update((byte)AhmedKorwash.Network.GamePackets.Update.mantos, 13, true);
- }
- #endregion
- #region AutoHunt
- AutoHunt AutoHunt = new AutoHunt();
- AutoHunt.Icon = 391;
- client.Send(AutoHunt);
- #endregion
- #region Inbox In Server.
- int count = 1;
- for (int i = 0; i < count; i++)
- {
- MsgMailList.PrizeInfo prize = new MsgMailList.PrizeInfo()
- {
- ID = (uint)i,
- Time = 10,
- Sender = "Egypt (Gift)".ToString(),
- Subject = "Honoring special to you you the new player.".ToString(),
- Message = "We are honored that they have joined us and we will give you a gift for choosing our server. Enjoy and if you have a server problem please continue with the owner." + i.ToString(),
- goldprize = 1000,
- cpsprize = 0,
- // ItemPrize = 800111,
- //Message2 = "We are seeking l help you every one of you and let you to enjoy." + i.ToString(),
- };
- client.Prizes.Add(prize.ID, prize);
- }
- #endregion
- #region Inbox
- if (client.Prizes.Count > 0)
- {
- MsgMailList.SendMailbox(client, true);
- }
- #endregion
- #region SendReload
- Game.Entity.SendReload(client);
- #endregion
- #region CrossServer
- if (CrossServer.IsWar == true)
- {
- client.Country = CrossServer.GetCountry(client.Entity.CountryID);
- AhmedKorwash.Countrys country = new AhmedKorwash.Countrys();
- country.id = client.Entity.CountryID;
- country.Name = CrossServer.GetCountry(client.Entity.CountryID);
- country.Score = 0;
- country.wins = 0;
- if (!CrossServer.Countrys.ContainsKey(country.id))
- {
- CrossServer.Countrys.Add(country.id, country);
- }
- }
- #endregion
- #region SecondaryPassword
- Database.Wharehousepw.reset_whpass(client);
- if (client.WarehousePW != 0 && client.ForgetWHPass == false)
- {
- WareHousePassword whp = new WareHousePassword(true);
- whp.type = WareHousePassword.PasswordCorrect;
- whp.OldPassword = 0x1;
- client.Send(whp);
- }
- else if (client.WarehousePW != 0 && client.ForgetWHPass == true)
- {
- WareHousePassword whp = new WareHousePassword(true);
- whp.type = WareHousePassword.Termination;
- whp.OldPassword = 0x1;
- whp.NewPassword = client.ForgetWHPassDate;
- client.Send(whp);
- }
- #endregion
- #region Flower and kiss Icon
- client.Send(new FlowerPacket(client.Entity.Flowers, client));
- client.Send(new KissPacket(client.Entity.Kisses, client));
- #endregion
- #region CPClaim
- Data datas = new Data(true);
- datas.UID = client.Entity.UID;
- datas.ID = 116;
- datas.dwParam = 1197;
- client.Send(datas);
- #endregion
- #region MsgTrainingInfo
- if (client.Entity.MapID == 601)
- {
- OfflineTGStats sts = new OfflineTGStats(true);
- var T1 = new TimeSpan(DateTime.Now.Ticks);
- var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks);
- ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes);
- minutes = (ushort)Math.Min((ushort)900, minutes);
- sts.TotalTrainingMinutesLeft = (ushort)(900 - minutes);
- sts.TrainedMinutes = minutes;
- ulong exp = client.Entity.Experience;
- byte level = client.Entity.Level;
- double expballGain = (double)300 * (double)minutes / (double)900;
- while (expballGain >= 100)
- {
- expballGain -= 100;
- exp += client.ExpBall;
- }
- if (expballGain != 0)
- exp += (uint)(client.ExpBall * (expballGain / 100));
- while (exp >= Database.DataHolder.LevelExperience(level))
- {
- exp -= Database.DataHolder.LevelExperience(level);
- level++;
- }
- double percent = (double)exp * (double)100 / (double)Database.DataHolder.LevelExperience(level);
- sts.Character_NewExp = (ulong)(percent * 100000);
- sts.Character_AcquiredLevel = level;
- sts.Send(client);
- }
- #endregion
- client.Entity.MyAchievement.Send();
- client.NoDieJoin = true;
- if (!(client.Entity.VIPLevel == 6 || client.Account.State >= Database.AccountTable.AccountState.ProjectManager))
- client.Send(new Message("" + Database.HelpDesk.Register + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website));
- for (ushort i = 1415; i <= 1423; i++)
- if (!client.Spells.ContainsKey(i))
- client.AddSpell(new Spell(true) { ID = i });
- #region WentToComplete
- client.Filtering = true;
- if (client.WentToComplete) return;
- RemoveBadSkills(client);
- client.WentToComplete = true;
- client.Entity.SendUpdates = true;
- #endregion
- #region Champion
- DateTime now = DateTime.Now;
- if (now.Hour == 20 && now.Minute >= 55 || now.Hour == 21 && now.Minute <= 25)
- if (client.ChampionStats.SignedUp)
- client.Send(Champion.ChampionKernel.SignUp().BuildPacket());
- #endregion
- #region RemoveBadSkills
- if (client.Entity.Class >= 40 && client.Entity.Class <= 45)
- {
- client.RemoveSpell(new Spell(true) { ID = 1025 });//SuperMan
- }
- if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
- {
- client.RemoveSpell(new Spell(true) { ID = 6002 });//PiosnStar
- }
- if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
- {
- client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
- }
- if (client.Entity.Class >= 132 && client.Entity.Class <= 135)
- {
- client.RemoveSpell(new Spell(true) { ID = 10425 });//tranq
- }
- if (client.Entity.Class >= 50 && client.Entity.Class <= 55)
- {
- client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
- }
- if (client.Entity.Class >= 10 && client.Entity.Class <= 15)
- {
- client.RemoveSpell(new Spell(true) { ID = 1025 });//Superman
- }
- if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
- {
- client.RemoveSpell(new Spell(true) { ID = 11180 });//MortalDrag
- }
- if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
- {
- client.RemoveSpell(new Spell(true) { ID = 11190 });//MortalDrag
- }
- if (client.Entity.Class >= 142 && client.Entity.Class <= 145)
- {
- client.RemoveSpell(new Spell(true) { ID = 11200 });//MortalDrag
- }
- if (client.Entity.Class >= 42 && client.Entity.Class <= 45)
- {
- client.RemoveSpell(new Spell(true) { ID = 10425 });//Tranquality
- }
- if (client.Entity.Class >= 10 && client.Entity.Class <= 15)
- {
- client.RemoveSpell(new Spell(true) { ID = 6002 });//Poisonstar
- }
- #endregion
- #region TQPoint
- if (client.TQPoint > 0)
- {
- Attack send = new Attack(true);
- send.InteractType = AhmedKorwash.Network.GamePackets.Attack.ClaimCP;
- client.Send(send.ToArray());
- }
- #endregion
- foreach (var Guild in Kernel.Guilds.Values)
- {
- Guild.SendName(client);
- }
- #region Sever Time
- ServerTime time = new ServerTime();
- time.Year = (uint)DateTime.Now.Year;
- time.Month = (uint)DateTime.Now.Month;
- time.DayOfYear = (uint)DateTime.Now.DayOfYear;
- time.DayOfMonth = (uint)DateTime.Now.Day;
- time.Hour = (uint)DateTime.Now.Hour;
- time.Minute = (uint)DateTime.Now.Minute;
- time.Second = (uint)DateTime.Now.Second;
- client.Send(time);
- #endregion
- bool going = false;
- #region Elite pk
- Parallel.ForEach(ElitePKTournament.Tournaments, epk =>
- {
- if (epk.State != ElitePK.States.GUI_Top8Ranking)
- going = true;
- });
- if (going)
- {
- ElitePKBrackets brackets = new ElitePKBrackets(true, 0);
- brackets.Type = ElitePKBrackets.EPK_State;
- brackets.OnGoing = true;
- client.Send(brackets);
- }
- #endregion
- client.Entity.DoubleExperienceTime = (ushort)(client.Entity.DoubleExperienceTime + (1 - 1));
- client.Entity.HeavenBlessing = (ushort)(client.Entity.HeavenBlessing + (1 - 1));
- #region Quiz
- if (Kernel.QuizShow.Open)
- Kernel.QuizShow.AddPlayer(client);
- client.Entity.Update(Network.GamePackets.Update.QuizPoints, client.Entity.QuizPoints, true);
- #endregion
- #region Mentor
- if (client.Mentor != null)
- {
- if (client.Mentor.IsOnline)
- {
- MentorInformation Information = new MentorInformation(true);
- Information.Mentor_Type = 1;
- Information.Mentor_ID = client.Mentor.Client.Entity.UID;
- Information.Apprentice_ID = client.Entity.UID;
- Information.Enrole_Date = client.Mentor.EnroleDate;
- Information.Mentor_Level = client.Mentor.Client.Entity.Level;
- Information.Mentor_Class = client.Mentor.Client.Entity.Class;
- Information.Mentor_PkPoints = client.Mentor.Client.Entity.PKPoints;
- Information.Mentor_Mesh = client.Mentor.Client.Entity.Mesh;
- Information.Mentor_Online = true;
- Information.Shared_Battle_Power = client.Entity.BattlePowerFrom(client.Mentor.Client.Entity);
- Information.String_Count = 3;
- Information.Mentor_Name = client.Mentor.Client.Entity.Name;
- Information.Apprentice_Name = client.Entity.Name;
- Information.Mentor_Spouse_Name = client.Mentor.Client.Entity.Spouse;
- client.ReviewMentor();
- client.Send(Information);
- ApprenticeInformation AppInfo = new ApprenticeInformation();
- AppInfo.Apprentice_ID = client.Entity.UID;
- AppInfo.Apprentice_Level = client.Entity.Level;
- AppInfo.Apprentice_Class = client.Entity.Class;
- AppInfo.Apprentice_PkPoints = client.Entity.PKPoints;
- AppInfo.Apprentice_Experience = client.AsApprentice.Actual_Experience;
- AppInfo.Apprentice_Composing = client.AsApprentice.Actual_Plus;
- AppInfo.Apprentice_Blessing = client.AsApprentice.Actual_HeavenBlessing;
- AppInfo.Apprentice_Name = client.Entity.Name;
- AppInfo.Apprentice_Online = true;
- AppInfo.Apprentice_Spouse_Name = client.Entity.Spouse;
- AppInfo.Enrole_date = client.Mentor.EnroleDate;
- AppInfo.Mentor_ID = client.Mentor.ID;
- AppInfo.Mentor_Mesh = client.Mentor.Client.Entity.Mesh;
- AppInfo.Mentor_Name = client.Mentor.Name;
- AppInfo.Type = 2;
- client.Mentor.Client.Send(AppInfo);
- }
- else
- {
- MentorInformation Information = new MentorInformation(true);
- Information.Mentor_Type = 1;
- Information.Mentor_ID = client.Mentor.ID;
- Information.Apprentice_ID = client.Entity.UID;
- Information.Enrole_Date = client.Mentor.EnroleDate;
- Information.Mentor_Online = false;
- Information.String_Count = 2;
- Information.Mentor_Name = client.Mentor.Name;
- Information.Apprentice_Name = client.Entity.Name;
- client.Send(Information);
- }
- }
- #endregion
- #region Nobility
- NobilityInfo update = new NobilityInfo(true);
- update.Type = NobilityInfo.Icon;
- update.dwParam = client.NobilityInformation.EntityUID;
- update.UpdateString(client.NobilityInformation);
- client.Send(update);
- #endregion
- #region Merchant
- client.Entity.Update(Update.Merchant, 255, false);
- #endregion
- #region Equipment && Item
- foreach (ConquerItem item in client.Inventory.Objects)
- item.Send(client);
- foreach (ConquerItem item in client.Equipment.Objects)
- {
- if (item != null)
- {
- if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
- {
- item.Send(client);
- }
- else
- {
- client.Equipment.DestroyArrow(item.Position);
- }
- }
- }
- client.LoadItemStats();
- if (!client.Equipment.Free(5))
- {
- if (IsArrow(client.Equipment.TryGetItem(5).ID))
- {
- if (client.Equipment.Free(4))
- client.Equipment.DestroyArrow(5);
- else
- {
- if (client.Equipment.TryGetItem(4).ID / 1000 != 500)
- client.Equipment.DestroyArrow(5);
- }
- }
- }
- client.GemAlgorithm();
- client.CalculateStatBonus();
- client.CalculateHPBonus();
- client.Entity.Stamina = 100;
- #endregion
- #region WelcomeMessages
- string[] wm = File.ReadAllLines(Constants.WelcomeMessages);
- foreach (string line in wm)
- {
- if (line.Length == 0)
- continue;
- if (line[0] == ';')
- continue;
- client.Send(new Message(line, System.Drawing.Color.Red, Message.Talk));
- }
- #endregion
- #region Login Alert System
- if (client.Action == 2)
- {
- byte[] Packet = null;
- Packet = new byte[0];
- Packet = new AhmedKorwash.Network.GamePackets.LastLoginAlert(client)
- {
- LastCheck = (uint)client.Account.LastCheck.Ticks,
- IP = client.Entity.IPLast
- }.
- ToArray();
- client.Send(Packet);
- }
- #endregion
- #region New Titles
- if (client.Entity.Titles.Count > 0)
- {
- TitlePacket tpacket = new TitlePacket(true);
- tpacket.Identifier = client.Entity.UID;
- tpacket.Title = client.Entity.MyTitle;
- tpacket.Type = TitlePacket.Types.Switch;
- tpacket.Count = 1;
- tpacket.Add((byte)client.Entity.MyTitle);
- client.Entity.MyTitle = tpacket.Title;
- client.Send(tpacket);
- }
- #endregion
- #region Double Exp
- if (Program.Today == DayOfWeek.Saturday || Program.Today == DayOfWeek.Sunday || Program.Today == DayOfWeek.Monday || Program.Today == DayOfWeek.Thursday || Program.Today == DayOfWeek.Tuesday || Program.Today == DayOfWeek.Wednesday || Program.Today == DayOfWeek.Friday)
- client.Send(new Message("Double experience is on.", System.Drawing.Color.Red, Message.World));
- #endregion
- #region Vip
- if (client.Entity.VIPLevel > 0)
- {
- Network.GamePackets.VipStatus vip = new Network.GamePackets.VipStatus();
- client.Send(vip.ToArray());
- }
- client.Entity.VIPLevel = (byte)(client.Entity.VIPLevel + 0);
- #endregion
- #region MapStatus
- client.Send(new MapStatus() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status, Weather = Database.MapsTable.MapInformations[client.Map.ID].Weather });
- if (client.Entity.Hitpoints == 0)
- {
- ushort[] Point = Database.DataHolder.FindReviveSpot(client.Map.ID);
- client.Entity.Teleport(Point[0], Point[1], Point[2]);
- client.Entity.Hitpoints = 1;
- }
- #endregion
- client.Entity.HandleTiming = true;
- if (client.Entity.MentorBattlePower != 0)
- client.Entity.Update(Network.GamePackets.Update.MentorBattlePower, client.Entity.MentorBattlePower, false);
- if (client.Guild != null)
- {
- client.Guild.SendAllyAndEnemy(client);
- client.Entity.GuildBattlePower = client.Guild.GetSharedBattlepower(client.AsMember.Rank);
- }
- #region Broadcast
- if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID > 2)
- client.Send(new Network.GamePackets.Message(Game.ConquerStructures.Broadcast.CurrentBroadcast.Message, "ALLUSERS", Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityName, System.Drawing.Color.Red, Network.GamePackets.Message.BroadcastMessage));
- #endregion
- client.Entity.Update(Update.RaceShopPoints, client.RacePoints, false);
- #region BlessTime
- client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, client.BlessTime, false);
- if (client.Entity.HeavenBlessing != 0)
- client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false);
- #endregion
- #region ClaimableItem
- if (client.ClaimableItem.Count > 0)
- foreach (var item in client.ClaimableItem.Values)
- item.Send(client);
- #endregion
- #region DeatinedItem
- if (client.DeatinedItem.Count > 0)
- foreach (var item in client.DeatinedItem.Values)
- item.Send(client);
- #endregion
- client.Equipment.UpdateEntityPacket();
- #region ChiPowers
- client.Send(new ChiPowers(true).Query(client));
- SendChiRankings(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, client);
- #endregion
- DateTime Now64 = DateTime.Now;
- #region BloodshedSea
- if (client.Entity.MapID == 3846)
- {
- Data data = new Data(true);
- data.UID = client.Entity.UID;
- data.dwParam = 3846;
- data.ID = 104;
- data.TimeStamp = Time64.Now;
- data.dwParam = 16755370;
- client.Send(data);
- client.SendScreen(data, true);
- client.Screen.Reload(null);
- }
- #endregion
- ChangeAppearance(client, (AppearanceType)client.Appearance);
- client.Entity.UpdateEffects(true);
- client.Entity.BoundCps = client.Entity.BoundCps;
- client.Entity.FirstCreditPoints = client.Entity.FirstCreditPoints;
- client.Entity.Energy = client.Entity.Energy;
- client.Entity.Update(Network.GamePackets.Update.AvailableSlots, 300, false);
- client.Entity.Update(Network.GamePackets.Update.ExtraInventory, client.Entity.ExtraInventory, false);
- #region Inner
- if (!Game.InnerPower.InnerPowerPolle.TryGetValue(client.Entity.UID, out client.Entity.InnerPower))
- client.Entity.InnerPower = new Game.InnerPower(client.Entity.Name, client.Entity.UID);
- client.Entity.InnerPower.UpdateStatus();
- #endregion
- #region Merchant
- if (client.Entity.Merchant == 255)
- {
- client.Entity.Update((byte)Update.Merchant, 255, 0);
- }
- else if (client.Entity.Merchant == 1)
- {
- Attack send = new Attack(true);
- send.InteractType = AhmedKorwash.Network.GamePackets.Attack.MerchantProgress;
- client.Send(send.ToArray());
- }
- #endregion
- #region Storages
- new CoatStorage().Login(client);
- new TitleStorage().Login(client);
- if (client.Entity.WTitles == null)
- {
- new TitleStorage().AddTitle(client, 4001, 1000, false);
- new TitleStorage().AddTitle(client, 6001, 20, false);
- new TitleStorage().AddTitle(client, 6002, 21, false);
- new TitleStorage().AddTitle(client, 6003, 22, false);
- new TitleStorage().AddTitle(client, 6004, 23, false);
- new TitleStorage().AddTitle(client, 6005, 6005, false);
- new TitleStorage().AddTitle(client, 1, 1000, false);
- new TitleStorage().AddTitle(client, 2018, 1, false);
- new TitleStorage().AddTitle(client, 2001, 2, false);
- new TitleStorage().AddTitle(client, 2002, 3, false);
- new TitleStorage().AddTitle(client, 2003, 4, false);
- new TitleStorage().AddTitle(client, 2004, 5, false);
- new TitleStorage().AddTitle(client, 2005, 6, false);
- new TitleStorage().AddTitle(client, 2006, 7, false);
- new TitleStorage().AddTitle(client, 2020, 2020, false);
- new TitleStorage().AddTitle(client, 2021, 2021, false);
- new TitleStorage().AddTitle(client, 2022, 2022, false);
- new TitleStorage().AddTitle(client, 2023, 2023, false);
- new TitleStorage().AddTitle(client, 2024, 2024, false);
- new TitleStorage().AddTitle(client, 2025, 2025, false);
- new TitleStorage().AddTitle(client, 2028, 2028, false);
- new TitleStorage().AddTitle(client, 2029, 2029, false);
- new TitleStorage().AddTitle(client, 2030, 2030, false);
- new TitleStorage().AddTitle(client, 2031, 2031, false);
- }
- client.Entity.UTitlePoints = client.Entity.WTitles.Points;
- #endregion
- client.LoadItemStats();
- }
Advertisement
Add Comment
Please, Sign In to add comment