/// <summary> /// Macro Message [Example] Hello /// </summary> /// <param name="Message">Message to send</param> /// <param name="Sound">Sound to use</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent macro(string Message, SoundCodes Sound) { ChatEvent ce = new ChatEvent(); ce.Message = Message; ce.ChatType = ChatTypes.Macro; ce.SoundCode = Sound; return(ce); }
/// <summary> /// Zone Message(with attached sound code): [Example] *zone Hello %2 /// </summary> /// <param name="Message">Message to send</param> /// <param name="SoundCode">Sound code</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent zone(string Message, SoundCodes SoundCode) { ChatEvent ce = new ChatEvent(); ce.Message = Message; ce.SoundCode = SoundCode; ce.ChatType = ChatTypes.Zone; return(ce); }
/// <summary> /// Arena Message(with attached sound code): [Example] *arena Hello %2 /// </summary> /// <param name="Message">Message to send</param> /// <param name="SoundCode">Sound code</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent arena(string Message, SoundCodes SoundCode) { ChatEvent ce = new ChatEvent(); ce.Message = Message; ce.SoundCode = SoundCode; ce.ChatType = ChatTypes.Arena; return(ce); }
/// <summary> /// <para>Use this if you want to only send message when debug is set to true. [Arena]</para> /// <para>Make sure to:</para> /// <para>1: have your bot set ?chat [Your Debug Chat], any chat,any chat (debug chat must be your first registered chat)</para> /// <para>2: set debug to true if you want to use it</para> /// <para>3: use this method to send it</para> /// <para>Usage: ShortChat msg = new ShortChat()</para> /// <para>Game(msg.debugChan("Message to send"));</para> /// </summary> /// <param name="Message">Message to send</param> /// /// <param name="SoundCode">Sound code you want to use</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent debugArena(string Message, SoundCodes Sound) { if (!m_Debug) { return(null); } Message = "[ DEBUG ] " + Message; return(arena(Message, Sound)); }
/// <summary> /// Sends message to a player's team (frequency)(with attached sound code): [Example] "Hello %2 /// </summary> /// <param name="PlayerName">Player's Name</param> /// <param name="Message">Message to send</param> /// <param name="SoundCode">Sound code</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent team_pm(string PlayerName, string Message, SoundCodes SoundCode) { ChatEvent ce = new ChatEvent(); ce.Message = Message; ce.PlayerName = PlayerName; ce.SoundCode = SoundCode; ce.ChatType = ChatTypes.TeamPrivate; return(ce); }
/// <summary> /// <para>Send a private team message using freq number with attached sound code.</para> /// <para>YOU MUST SEND A PLAYER LIST ON INITIALIZATION FOR THIS TO WORK</para> /// </summary> /// <param name="Frequency">Freq number to send message to</param> /// <param name="Message">Message to send</param> /// <returns>Returns Configured ChatEvent</returns> public ChatEvent team_pm(ushort Frequency, string Message, SoundCodes SoundCode) { if (m_PlayerList == null) { return(null); } SSPlayer ssp = m_PlayerList.Find(player => player.Frequency == Frequency); if (ssp == null) { return(null); } return(team_pm(ssp.PlayerName, Message, SoundCode)); }
public SoundDef(string str) { string[] s = str.Split('|'); sndType = (SoundCodes)Enum.Parse(typeof(SoundCodes), s[0], true); frequency = int.Parse(s[1]); time = int.Parse(s[2]); }