public static void Animate_OnCommand( CommandEventArgs e ) { if ( e.Length == 6 ) { e.Mobile.Animate( e.GetInt32( 0 ), e.GetInt32( 1 ), e.GetInt32( 2 ), e.GetBoolean( 3 ), e.GetBoolean( 4 ), e.GetInt32( 5 ) ); } else { e.Mobile.SendMessage( "Format: Animate <action> <frameCount> <repeatCount> <forward> <repeat> <delay>" ); } }
private static void SetGuarded_OnCommand(CommandEventArgs e) { Mobile from = e.Mobile; if (e.Length == 1) { GuardedRegion reg = from.Region as GuardedRegion; if (reg == null) { from.SendMessage("You are not in a guardable region."); } else { reg.Disabled = !e.GetBoolean(0); if (reg.Disabled) from.SendMessage("The guards in this region have been disabled."); else from.SendMessage("The guards in this region have been enabled."); } } else { from.SendMessage("Format: SetGuarded <true|false>"); } }
public static void SetSaves_OnCommand( CommandEventArgs e ) { if ( e.Length == 1 ) { m_SavesEnabled = e.GetBoolean( 0 ); e.Mobile.SendMessage( "Saves have been {0}.", m_SavesEnabled ? "enabled" : "disabled" ); } else { e.Mobile.SendMessage( "Format: SetSaves <true | false>" ); } }
public static void Sound_OnCommand(CommandEventArgs e) { if (e.Length == 1) PlaySound(e.Mobile, e.GetInt32(0), true); else if (e.Length == 2) PlaySound(e.Mobile, e.GetInt32(0), e.GetBoolean(1)); else e.Mobile.SendMessage("Format: Sound <index> [toAll]"); }
public static void SetProfiles_OnCommand(CommandEventArgs e) { if (e.Length == 1) Core.Profiling = e.GetBoolean(0); else Core.Profiling = !Core.Profiling; e.Mobile.SendMessage("Profiling has been {0}.", Core.Profiling ? "enabled" : "disabled"); }
public override void ExecuteList( CommandEventArgs e, ArrayList list ) { e.Mobile.SendGump( new WarningGump( 1060637, 30720, String.Format( "You are about to insert {0} objects. This cannot be undone without a full server revert.<br><br>Continue?", list.Count ), 0xFFC000, 420, 280, new WarningGumpCallback( OnConfirmCallback ), new object[] { e, list, ( e.Length < 1 || !e.GetBoolean( 0 ) ) } ) ); AddResponse( "Awaiting confirmation..." ); }
public override void Execute( CommandEventArgs e, object obj ) { Target t = new DesignInsertTarget( new List<HouseFoundation>(), ( e.Length < 1 || !e.GetBoolean( 0 ) ) ); t.Invoke( e.Mobile, obj ); }
private static void ScheduleServerRestart_OnCommand(CommandEventArgs e) { if (e.Length == 1) { if (e.GetBoolean(0)) { m_RestartTime = DateTime.Now.Date + RestartTime; if (m_RestartTime < DateTime.Now) m_RestartTime += TimeSpan.FromDays(1.0); e.Mobile.SendMessage("A server restart has been scheduled for {0} {1}.", m_RestartTime.ToLongDateString(), m_RestartTime.ToLongTimeString()); } else { CalculateRegularRestartTime(); e.Mobile.SendMessage("The additional restart has been canceled. The server will restart on {0} {1}.", m_RestartTime.ToLongDateString(), m_RestartTime.ToLongTimeString()); } } else e.Mobile.SendMessage("The server will restart on {0} at {1}.", m_RestartTime.ToLongDateString(), m_RestartTime.ToLongTimeString()); }
public static void SetDonations_OnCommand(CommandEventArgs e) { if (e.Length == 1) { ms_ClaimDonationsBlocked = !e.GetBoolean(0);//Note: true leads to donations not being blocked! e.Mobile.SendMessage("Donations have been {0}.", ms_ClaimDonationsBlocked ? "disabled" : "enabled"); e.Mobile.SendMessage("Warning: Donations will be reactivated on server restart!"); } else { e.Mobile.SendMessage("Donations are {0}.", ms_ClaimDonationsBlocked ? "disabled" : "enabled"); e.Mobile.SendMessage("Format: SetDonations <true | false>"); } }