private static void EventSink_MobileCreated(MobileCreatedEventArgs e) { if (e.Mobile is PlayerMobile) { PlayerMobile pm = (PlayerMobile)e.Mobile; Mobile m_Mobile = e.Mobile; Account a_Account = ((Account)m_Mobile.Account); Container pack = m_Mobile.Backpack; pack.DropItem(new GoldLooter()); if (!Convert.ToBoolean(a_Account.GetTag("FirstChar"))) { Console.WriteLine("Account: {0}", a_Account.Username); if (pack != null) { Spellbook book = new NecromancerSpellbook(); book.Content = book.BookCount == 64 ? book.Content = ulong.MaxValue : (1ul << book.BookCount) - 1; pack.DropItem(book); book = new Spellbook(); book.Content = book.BookCount == 64 ? book.Content = ulong.MaxValue : (1ul << book.BookCount) - 1; pack.DropItem(book); book = new MysticBook(); book.Content = book.BookCount == 64 ? book.Content = ulong.MaxValue : (1ul << book.BookCount) - 1; pack.DropItem(book); pack.DropItem(new Runebook(10)); pack.DropItem(new MythicCharacterToken()); pack.DropItem(new SoulstoneFragmentToken()); pack.DropItem(new SoulstoneFragmentToken()); a_Account.SetTag("FirstChar", "true"); } } } }
public static void CacheName(MobileCreatedEventArgs e) { if (NameCache.ContainsKey(e.Mobile.GetType())) { return; } BaseCreature bc = e.Mobile as BaseCreature; if (bc != null && !bc.Blessed && !bc.IsInvulnerable && (bc.Owners == null || bc.Owners.Count == 0)) { AddNameToCache(bc.GetType()); } }