public static void OnSpeech(SpeechEventArgs e) { if (m_AFK.Contains(e.Mobile.Serial.Value)) { AFK afk = (AFK)m_AFK[e.Mobile.Serial.Value]; if (afk == null) { e.Mobile.SendMessage("Afk object missing!"); return; } afk.wakeUp(); } }
public static void OnLogout(LogoutEventArgs e) { if (m_AFK.Contains(e.Mobile.Serial.Value)) { AFK afk = (AFK)m_AFK[e.Mobile.Serial.Value]; if (afk == null) { e.Mobile.SendMessage("L'objet AFK est manquant!"); return; } afk.wakeUp(); } }
public static void OnDeath(PlayerDeathEventArgs e) { if (m_AFK.Contains(e.Mobile.Serial.Value)) { AFK afk = (AFK)m_AFK[e.Mobile.Serial.Value]; if (afk == null) { e.Mobile.SendMessage("Afk object missing!"); return; } e.Mobile.PlaySound(e.Mobile.Female ? 814 : 1088); afk.wakeUp(); } }
public static void AFK_OnCommand( CommandEventArgs e ) { Mobile m = e.Mobile; AFK afk; m_AFK.TryGetValue( m, out afk ); if ( afk != null ) afk.WakeUp(); else { AFK timer = new AFK( m, e.ArgString.Trim() ); m_AFK.Add( m, timer ); timer.Start(); } }
public static void AFK_OnCommand(CommandEventArgs e) { if (m_AFK.Contains(e.Mobile.Serial.Value)) { AFK afk = (AFK)m_AFK[e.Mobile.Serial.Value]; if (afk == null) { e.Mobile.SendMessage("Afk object missing!"); return; } afk.wakeUp(); } else { m_AFK.Add(e.Mobile.Serial.Value, new AFK(e.Mobile, e.ArgString.Trim())); e.Mobile.SendMessage("AFK enabled."); } }
public static void AFK_OnCommand(CommandEventArgs e) { Mobile m = e.Mobile; AFK afk; m_AFK.TryGetValue(m, out afk); if (afk != null) { afk.WakeUp(); } else { AFK timer = new AFK(m, e.ArgString.Trim()); m_AFK.Add(m, timer); timer.Start(); } }
public static void AFK_OnCommand(CommandEventArgs e) { if (m_AFK.Contains(e.Mobile.Serial.Value)) { AFK afk = (AFK)m_AFK[e.Mobile.Serial.Value]; if (afk == null) { e.Mobile.SendMessage("L'objet AFK est manquant!"); return; } afk.wakeUp(); } else { m_AFK.Add(e.Mobile.Serial.Value, new AFK(e.Mobile, e.ArgString.Trim())); e.Mobile.SendMessage("AFK activé."); e.Mobile.Emote("*est AFK*"); } }