private static void EventSink_Login(LoginEventArgs args) { int userCount = NetState.Instances.Count; int itemCount = World.Items.Count; int mobileCount = World.Mobiles.Count; Mobile m = args.Mobile; if (m.AccessLevel >= AccessLevel.GameMaster) { m.SendMessage("You can type '[helpadmin' to learn the commands for this server."); } else { m.SendMessage("You can use the 'Help' button on your paperdoll for more information."); } //Unique Naming System// #region CheckName if ((m.Name == CharacterCreation.GENERIC_NAME || !CharacterCreation.CheckDupe(m, m.Name)) && m.AccessLevel < AccessLevel.GameMaster) { m.CantWalk = true; m.SendGump(new NameChangeGump(m)); } #endregion //Unique Naming System// }
private static void EventSink_Login(LoginEventArgs args) { int userCount = NetState.Instances.Count; int itemCount = World.Items.Count; int mobileCount = World.Mobiles.Count; // Init CS = Init.Chat_Server; // CS.LastMessage = CHAN.WORLD; Mobile m = args.Mobile; if (args.Mobile is PlayerMobile) { PlayerMobile pm = args.Mobile as PlayerMobile; pm.SendGump(new ShowTool(pm)); } if (m.AccessLevel >= AccessLevel.GameMaster) { m.SendMessage("You can type '[helpadmin' to learn the commands for this server."); } else { m.SendMessage("You can use the 'Help' button on your paperdoll for more information."); } /* string messages = "Use [pm to send mail. [Helpinfo for player commands. [viewissues to report problems or suggestions. There is a Wiki and forum on uosunrise.com"; * Bittiez.BoxerChat.Chat.AddMessage(CS.Messages, args.Mobile, messages, 1); * Bittiez.BoxerChat.Chat.SendGump((int)CHAN.WORLD, args.Mobile); * foreach (Item i in World.Items.Values) * if (i is Gold) * { * goldcount += ((Gold)i).Amount; * } * else if (i is BankCheck) * goldcount += ((BankCheck)i).Worth; * * string message = String.Format("There {0} currently {1} user{2} with {3} item{4} {5} mobile{6} in the world.",userCount == 1 ? "is" : "are",userCount, userCount == 1 ? "" : "s",itemCount, itemCount == 1 ? "" : "s",mobileCount, mobileCount == 1 ? "" : "s"); * // * // need to fix message order and staff/player notification * // * * if (args.Mobile is PlayerMobile && args.Mobile.AccessLevel < AccessLevel.Counselor) * { * * Bittiez.BoxerChat.Chat.AddMessage(CS.Messages, args.Mobile, message, 1); * Bittiez.BoxerChat.Chat.SendGump((int)CHAN.WORLD, args.Mobile); * }*/ //Unique Naming System// #region CheckName if ((m.Name == CharacterCreation.GENERIC_NAME || !CharacterCreation.CheckDupe(m, m.Name)) && m.AccessLevel < AccessLevel.GameMaster) { m.CantWalk = true; m.SendGump(new NameChangeGump(m)); } #endregion //Unique Naming System// }
public static void Initialize() { if (Accounts.Count == 0) { var key = ConsoleKey.D; if (!AutoCreateDefaultOwnerAccount) { Console.WriteLine("This server has no accounts."); Console.Write("Do you want to create the owner account now? (y/n), " + "Or create the default owner account? (d)"); key = Console.ReadKey(true).Key; } switch (key) { case ConsoleKey.Y: { Console.WriteLine(); Console.Write("Username: "******"Password: "******"Account created."); break; } case ConsoleKey.D: { var account = new Account(DefaultOwnerAcctName, DefaultOwnerAcctPassword) { AccessLevel = AccessLevel.Owner }; var args = new CharacterCreatedEventArgs( null, account, DefaultOwnerPlayerName, false, Race.Human.RandomSkinHue(), 130, 130, 130, Utility.RandomList(AccountHandler.StartingCities), new SkillNameValue[] { new(SkillName.Alchemy, 0), new(SkillName.Anatomy, 0), new(SkillName.Archery, 0), }, Race.Human.RandomSkinHue(), Utility.RandomDyedHue(), Utility.RandomDyedHue(), Race.Human.RandomHair(false), Race.Human.RandomFacialHair(false), Race.Human.RandomHairHue(), 0, Race.Human ); CharacterCreation.HandleCharacterCreation(args); Console.WriteLine($"Default owner account created ({DefaultOwnerAcctName} / {DefaultOwnerAcctPassword})."); break; }