public override void OnPublicMessage(Mobile from, string text) { if (text.Length > 128 || (text = text.Trim()).Length == 0) { return; } Party p = Party.Get(from); if (p != null) { p.SendPublicMessage(from, text); foreach (Data data in Data.Datas.Values) { if (data.GlobalW && !p.Contains(data.Mobile)) { data.Mobile.SendMessage(data.GlobalWC, "(Global) <World->Party> {0}: {1}", from.Name, text); } } } else { from.SendLocalizedMessage(3000211); // You are not in a party. } }
public static void EventSink_PlayerDeath(Mobile from) { Party p = Get(from); if (p != null) { Mobile m = from.LastKiller; if (m == from) { p.SendPublicMessage(from, "I killed myself !!"); } else if (m == null) { p.SendPublicMessage(from, "I was killed !!"); } else { p.SendPublicMessage(from, $"I was killed by {m.Name} !!"); } } }
public static void EventSink_PlayerDeath(Mobile from, Mobile killer, Container cont) { Party p = Party.Get(from); if (p != null) { Mobile m = killer; if (m == from) { p.SendPublicMessage(from, "I killed myself !!"); } else if (m == null) { p.SendPublicMessage(from, "I was killed !!"); } else { p.SendPublicMessage(from, string.Format("I was killed by {0} !!", m.Name)); } } }
public static void EventSink_PlayerDeath(PlayerDeathEventArgs e) { Mobile from = e.Mobile; Party p = Party.Get(from); if (p != null) { Mobile m = from.LastKiller; if (m == from) { p.SendPublicMessage(from, "I killed myself !!"); } else if (m == null) { p.SendPublicMessage(from, "I was killed !!"); } else { p.SendPublicMessage(from, String.Format("I was killed by {0} !!", m.Name)); } } }
public override void OnPublicMessage(Mobile from, string text) { if (text.Length > 128 || (text = text.Trim()).Length == 0) { return; } Party p = Party.Get(from); if (p != null) { p.SendPublicMessage(from, text); } else { from.SendLocalizedMessage(3000211); // You are not in a party. } }