public static void EventSink_Login(LoginEventArgs e) { if (e.Mobile.RawStatTotal > e.Mobile.StatCap && e.Mobile.AccessLevel == AccessLevel.Player) { e.Mobile.SendGump(new LowerStatsGump(e.Mobile)); } }
private static void OnLogin(LoginEventArgs e) { foreach (TownHouse house in BaseHouse.GetHouses(e.Mobile).OfType<TownHouse>()) { (house).ForSaleSign.CheckDemolishTimer(); } }
public static void OnLogin( LoginEventArgs e ) { BaseHouse house = BaseHouse.FindHouseAt( e.Mobile ); if ( house != null && !house.Public && !house.IsFriend( e.Mobile ) ) e.Mobile.Location = house.BanLocation; }
public static void OnLogin( LoginEventArgs e ) { Mobile from = e.Mobile; if ( from == null || from.AccessLevel < AccessLevel.Counselor ) return; if ( HasDisconnected( from ) ) { if ( !m_MoveHistory.ContainsKey( from ) ) m_MoveHistory[from] = new LocationInfo( from.Location, from.Map ); LocationInfo dest = GetRandomDestination(); from.Location = dest.Location; from.Map = dest.Map; } else if ( m_MoveHistory.ContainsKey( from ) ) { LocationInfo orig = m_MoveHistory[from]; from.SendMessage( "Your character was moved from {0} ({1}) due to a detected client crash.", orig.Location, orig.Map ); m_MoveHistory.Remove( from ); } }
private static void OnLogin(LoginEventArgs e) { if (e.Mobile.AccessLevel >= AccessLevel.Counselor) { SendToolbar(e.Mobile); } }
private static void OnLogin(LoginEventArgs e) { if (CMOptions.LoginPopup) { SendCentralGump(e.Mobile as PlayerMobile); } }
public static void EventSink_Login(LoginEventArgs e) { if (e.Mobile is PlayerMobile) { SlayerTitleAttachment attachment = FindAttachment(e.Mobile); } }
private static void EventSink_Login( LoginEventArgs e ) { Account acct = e.Mobile.Account as Account; if ( acct == null ) return; DateTime now = DateTime.Now; for ( int i = 0; i < m_Givers.Count; ++i ) { GiftGiver giver = m_Givers[i]; if ( now < giver.Start || now >= giver.Finish ) continue; // not in the correct timefream if ( acct.Created > (giver.Start - giver.MinimumAge) ) continue; // newly created account if ( acct.LastLogin >= giver.Start ) continue; // already got one giver.DelayGiveGift( TimeSpan.FromSeconds( 5.0 ), e.Mobile ); } acct.LastLogin = now; }
private static void Player_Login( LoginEventArgs args ) { Mobile m = args.Mobile; Account acct = m.Account as Account; NetState ns = m.NetState; Console.WriteLine( "Login: {0}: Account:{1}, Has logged in with character:{2} - {3}", ns, acct, m.Name, DateTime.Now); }
private static void OnLogin(LoginEventArgs e) { if (CMOptions.ModuleEnabled && e.Mobile != null) { Invalidate(e.Mobile); } }
public static void OnLogin( LoginEventArgs e ) { AnimalFormContext context = AnimalForm.GetContext( e.Mobile ); if( context != null && context.SpeedBoost ) e.Mobile.Send( SpeedControl.MountSpeed ); }
private static void OnLogin( LoginEventArgs e ) { if ( e.Mobile.AccessLevel != AccessLevel.Player && s_ErrorLog.Count != 0 && !s_Checked.Contains( e.Mobile ) ) ErrorsNotifyGump.SendTo( e.Mobile ); }
private static void HiddenVillageEventSink_Login( LoginEventArgs args ) { Mobile m = args.Mobile; Container pack = m.Backpack; if ( pack != null ) { List<HiddenVillagePass> passs = pack.FindItemsByType<HiddenVillagePass>(); for ( int i = 0; i < passs.Count; ++i ) { HiddenVillagePass pass = passs[i]; if ( pass != null ) { m.CloseGump( typeof( HiddenVillageIconGump ) ); m.SendGump( new HiddenVillageIconGump(m) ); } } } if (m.AccessLevel >= AccessLevel.Counselor) { m.SendMessage(68,"Because your a GM you get the HV pass!!"); m.CloseGump( typeof( HiddenVillageIconGump ) ); m.SendGump(new HiddenVillageIconGump(m)); } }
/// <summary> /// Sends a toolbar to staff members upon login. /// </summary> private static void OnLogin(LoginEventArgs e) { if (e.Mobile.AccessLevel >= AccessLevel.Counselor) { e.Mobile.CloseGump(typeof(Toolbar)); SendToolbar(e.Mobile); } }
static void OnLogin(LoginEventArgs args) { MusicName toPlay = Config.SingleMusic; if (Config.PlayRandomMusic) toPlay = MusicList[Utility.Random(MusicList.Length)]; args.Mobile.Send(PlayMusic.GetInstance(toPlay)); }
private static void World_Login( LoginEventArgs args ) { Mobile m = args.Mobile; if (args.Mobile.AccessLevel < AccessLevel.GameMaster) { World.Broadcast( 0x35, true, "{0} has logged into the DragonKnight's world.", args.Mobile.Name ); // to edit the message just make sure you only change what is in the " " and not the {0} because that is the players name. } }
private static void EventSink_Login(LoginEventArgs args) { if (Enabled) { Mobile m = args.Mobile; m.CloseGump(typeof(RandomTOTDGump)); m.SendGump(new RandomTOTDGump()); } }
private static void World_Login(LoginEventArgs args) { Mobile m = args.Mobile; if (args.Mobile.AccessLevel < AccessLevel.Administrator)//Edit AccessLevel to show its set for GameMaster { World.Broadcast(0x35, true, "{0} has logged into the world.", args.Mobile.Name);//Edit Message } }
public static void OnLogin( LoginEventArgs e ) { if ( e.Mobile is PlayerMobile ) { PlayerMobile pm = (PlayerMobile)e.Mobile; pm.VisibilityList.Clear(); } }
public static void OnLogin( LoginEventArgs e ) { Mobile m = e.Mobile; Rectangle2D rect = LeverPuzzleController.lr_Rect; if ( m.X >= rect.X && m.X <= (rect.X+10) && m.Y >= rect.Y && m.Y <= (rect.Y+10) && m.Map == Map.Internal ) { Timer kick = new LeverPuzzleController.LampRoomKickTimer( m ); kick.Start(); } }
private static void OnPlayerLogin( LoginEventArgs e ) { if ( ! AuctionSystem.Running ) return; foreach( AuctionItem auction in AuctionSystem.Pending ) { auction.SendMessage( e.Mobile ); } }
/// <summary> /// On player login, broadcast a message. /// </summary> public static void EventSink_Login(LoginEventArgs e) { if (e.Mobile.Player) { if (e.Mobile.AccessLevel <= m_AnnounceLevel) CommandHandlers.BroadcastMessage(AccessLevel.Player, m_LoginHue, String.Format(m_LoginMessage, e.Mobile.Name)); else //broadcast any other level to the staff CommandHandlers.BroadcastMessage(AccessLevel.Counselor, m_LoginHue, String.Format(m_LoginMessage, e.Mobile.Name)); } }
private static void OnLogin(LoginEventArgs e) { if (e == null || !(e.Mobile is PlayerMobile)) { return; } var user = (PlayerMobile)e.Mobile; AllChannels.Where(c => user.AccessLevel <= c.Access && c.Available && c.AutoJoin).ForEach(c => c.Join(user)); }
private static void EventSink_Login( LoginEventArgs args ) { Mobile m = args.Mobile; if( m.AccessLevel < AccessLevel.Administrator ) BroadcastMessage( AccessLevel.GameMaster, 0x5D, String.Format( "{0} has entered the realm.", m.RawName ) ); Console.WriteLine( "Login: {0}: Logged in with character \'{1}\'", m.NetState, m.RawName ); ((Player)m).AdjustBody(); }
private static void EventSink_Login(LoginEventArgs e) { PlayerMobile pm = e.Mobile as PlayerMobile; if (pm != null) //Taran: This can be null sometimes { if (pm.AccessLevel == AccessLevel.Player && (pm.Name == "Generic Player" || (pm.GameTime < TimeSpan.FromSeconds(30.0) && !CheckName(pm.Name)))) { e.Mobile.CantWalk = true; e.Mobile.SendGump(new NamingGump(e.Mobile)); } } }
private static void Player_Login(LoginEventArgs args) { try { Mobile m = args.Mobile; Account acct = m.Account as Account; NetState ns = m.NetState; Console.WriteLine("Login: {0}: Account '{1}', Has logged in with character '{2}'", ns, acct, m.Name); } catch { Console.WriteLine("Character retrival failed."); } }
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; //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES for (int i = 0; i < SkillInfo.Table.Length; i++) //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES { //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES m.Skills[i].Cap = 15100.0;//ADD NEW INDIVIDUAL SKILL CAPS HERE //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES //THESE LINES ADDED TO BRING NEW SKILL CAPS TO PRE-EXISTING PLAYERMOBILES m.SendMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.", args.Mobile.Name, userCount == 1 ? "is" : "are", userCount, userCount == 1 ? "" : "s", itemCount, itemCount == 1 ? "" : "s", mobileCount, mobileCount == 1 ? "" : "s" ); PlayerMobile pm = (PlayerMobile)m; if ( pm.OwesBackTaxes == true ) { if ( pm.City != null ) { if ( Banker.Withdraw( m, pm.BackTaxesAmount ) ) { m.SendMessage( "You have paid your back taxes in full from the money in your bank account." ); pm.City.CityTreasury += pm.BackTaxesAmount; pm.OwesBackTaxes = false; pm.BackTaxesAmount = 0; } else { int balance = Banker.GetBalance( m ); if ( Banker.Withdraw( m, balance ) ) { pm.City.CityTreasury += balance; pm.BackTaxesAmount -= 0; m.SendMessage( "You have made a payment on your back taxes of {0} you now owe {1} in back taxes.", balance, pm.BackTaxesAmount ); } } } else { pm.OwesBackTaxes = false; pm.BackTaxesAmount = 0; } } } }
public static void On_Login( LoginEventArgs args ) { PlayerMobile pm = args.Mobile as PlayerMobile; if ( pm == null ) return; SendUpdateMsg( (PlayerMobile)args.Mobile ); if ( SendAdMessage && pm.LastLogin+Ad_Time < DateTime.Now && pm.LastLogin != DateTime.MinValue ) pm.SendGump( new WarningGump( 1060637, 30720, Ad_Prompt, 0xFFFFFF, 320, 240, new WarningGumpCallback( OpenBrowser_Callback ), null ) ); pm.LastLogin = DateTime.Now; }
public static void OnLogin(LoginEventArgs args) { Mobile mobile = args.Mobile; MobileObject mo = new MobileObject(); mo.Mobile = mobile; mo.IsNightSightOn = !mobile.CanBeginAction(typeof(LightCycle)); m_LoginQueue.Enqueue(mo); }
static void OnLogin(LoginEventArgs args) { var m = args.Mobile; if (m.AccessLevel > AccessLevel.Player) return; var skills = m.Skills; for (int i = 0; i < skills.Length; i++) { skills[i].CapFixedPoint = Config.IndividualSkillCap; skills[i].BaseFixedPoint = Math.Min(skills[i].BaseFixedPoint, skills[i].CapFixedPoint); } m.SkillsCap = Config.TotalSkillCap; for (int j = 0; (m.SkillsTotal > m.SkillsCap) && (j < skills.Length); j++) { double diff = ((m.SkillsTotal - m.SkillsCap) / 10) + 1; if (skills[SkillName.Focus].Base > 0) { skills[SkillName.Focus].Base = Math.Max(skills[SkillName.Focus].Base - diff, 0); continue; } if (skills[SkillName.Meditation].Base > 0) { skills[SkillName.Meditation].Base = Math.Max(skills[SkillName.Meditation].Base - diff, 0); continue; } int lowestSkillId = -1; double lowestSkillBase = Config.IndividualSkillCap; for (int i = 0; i < skills.Length; i++) { if (skills[i].Base > 0 && skills[i].Base < lowestSkillBase) { lowestSkillId = Math.Max(lowestSkillId, i); lowestSkillBase = skills[i].Base; } } if (lowestSkillId == -1) break; skills[lowestSkillId].Base = Math.Max(skills[lowestSkillId].Base - diff, 0); } }
public static void OnLogin(LoginEventArgs args) { Mobile m = args.Mobile; m.CheckLightLevels(true); }