public bool OnCommand(Character chr, string args) { try { chr.IsInvisible = !chr.IsInvisible; if (!chr.IsInvisible) { chr.WriteLine("You are no longer invisible.", ProtocolYuusha.TextType.Status); if (chr is PC) { Conference.FriendNotify(chr as PC, true); if (chr.PCState == Globals.ePlayerState.CONFERENCE) { (chr as PC).SendToAllInConferenceRoom(Conference.GetStaffTitle(chr as PC) + chr.Name + " has entered the room.", ProtocolYuusha.TextType.Enter); } } } else { chr.WriteLine("You are now invisible.", ProtocolYuusha.TextType.Status); if (chr is PC) { (chr as PC).SendToAllInConferenceRoom(Conference.GetStaffTitle(chr as PC) + chr.Name + " has left the world.", ProtocolYuusha.TextType.Exit); Conference.FriendNotify(chr as PC, false); } } if (chr is PC) { PC.SaveField(chr.UniqueID, "invisible", chr.IsInvisible, null); } } catch (Exception e) { Utils.LogException(e); } return(true); }