Code:
foreach (DictionaryEntry DE in World.AllChars) { Character Charr = (Character)DE.Value; if (Charr.MyClient.Online) { listBox1.SelectedItem = listBox1.SelectedItem; Charr.MyClient.Drop(); return; } }
only problem is that even you select a different character it disconnects the very first one
im guessing it has to do with looking for the number if items in the listbox and then clicking it and disconnecting that client corresponding to the object number