namespace Devoid { using Devoid.Net.Server; using Devoid.Properties; using Devoid.Sessions; using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.IO; using System.Runtime.CompilerServices; using System.Threading; using System.Windows.Forms; public class frmBotPanel : Form { private ToolStrip botTools; internal ToolStripButton cmdAdd; private ToolStripButton cmdDance; private ToolStripButton cmdGetItem; private ToolStripButton cmdLoadList; private ToolStripButton cmdMoveToCoords; private ToolStripButton cmdRaidMode; private ToolStripButton cmdRandomMoving; internal ToolStripButton cmdRemove; private ToolStripButton cmdSelectAll; private ToolStripButton cmdSendToMyRoom; private ToolStripButton cmdShout; private ToolStripButton cmdToRoom; private ToolStripButton cmdWave; private ColumnHeader colRoom; private ColumnHeader colUsername; private IContainer components = null; private OpenFileDialog fileBrowser; private ToolStripLabel lblChat; private ToolStripLabel lblMovements; internal ToolStripLabel lblPassword; private ToolStripLabel lblSendToRoom; private ToolStripLabel lblStatuses; internal ToolStripLabel lblUsername; private ToolStripLabel lblX; private ToolStripLabel lblY; internal ListView lvBots; private Thread mRaidModeWorker; private Thread mRandomMovingWorker; internal ToolStrip toolsAccounts; private ToolStripSeparator toolStripSeparator1; private ToolStripSeparator toolStripSeparator2; private ToolStripSeparator toolStripSeparator3; private ToolStripSeparator toolStripSeparator4; private ToolStripSeparator toolStripSeparator5; private ToolStripSeparator toolStripSeparator6; private ToolStripSeparator toolStripSeparator7; private ToolStripTextBox txtChatMessage; private ToolStripTextBox txtItem; internal ToolStripTextBox txtPassword; private ToolStripTextBox txtRoomID; internal ToolStripTextBox txtUsername; private ToolStripTextBox txtX; private ToolStripTextBox txtY; public frmBotPanel() { this.InitializeComponent(); } public void addBot(string Username) { if (base.InvokeRequired) { base.Invoke(new botWorker(this.addBot), new object[] { Username }); } else { this.lvBots.Items.Add(Username, Username, 0); this.lvBots.Items[this.lvBots.Items.Count - 1].SubItems.Add("0"); } } private void botListLoader(string filename) { int num = 0; StreamReader reader = new StreamReader(filename); for (string str = reader.ReadLine(); (str != null) && (num <= 0x37); str = reader.ReadLine()) { string[] strArray = str.Split(new char[] { Convert.ToChar(9) }); if (((strArray.Length == 2) && !Engine.Sessions.containsSession(strArray[0])) && this.logSingleBotIn(strArray[0], strArray[1])) { num++; } } } private void cmdAdd_Click(object sender, EventArgs e) { string text = this.txtUsername.Text; if (!Engine.Sessions.containsSession(text)) { string password = this.txtPassword.Text; if ((text.Length == 0) || (password.Length == 0)) { Engine.Interface.showMessageBox("Please fill in both fields.", "Devoid : input", MessageBoxIcon.Asterisk); } else { new BotLoginWorker(this.logSingleBotIn).BeginInvoke(text, password, null, null); } } } private void cmdDance_Click(object sender, EventArgs e) { foreach (userSession session in this.getSelectedSessions()) { session.Connection.Dance(); } } private void cmdGetItem_Click(object sender, EventArgs e) { string text = this.txtItem.Text; foreach (userSession session in this.getSelectedSessions()) { session.Connection.getItem(text); } } private void cmdLoadList_Click(object sender, EventArgs e) { this.cmdLoadList.Enabled = false; if (this.fileBrowser.ShowDialog() == DialogResult.OK) { string fileName = this.fileBrowser.FileName; if (File.Exists(fileName)) { new botListLoaderWorker(this.botListLoader).BeginInvoke(fileName, null, null); } } this.cmdLoadList.Enabled = true; } private void cmdMoveToCoords_Click(object sender, EventArgs e) { int num; int num2; if (int.TryParse(this.txtX.Text, out num) && int.TryParse(this.txtY.Text, out num2)) { foreach (userSession session in this.getSelectedSessions()) { session.Connection.moveTo(num, num2); } } } private void cmdRaidMode_Click(object sender, EventArgs e) { if (this.mRaidModeWorker == null) { this.mRaidModeWorker = new Thread(new ThreadStart(this.handleRaidMode)); this.mRaidModeWorker.Start(); this.cmdRaidMode.Text = "Stop"; } else { try { this.mRaidModeWorker.Abort(); } catch { } this.mRaidModeWorker = null; this.cmdRaidMode.Text = "Raid mode"; } } private void cmdRandomMoving_Click(object sender, EventArgs e) { if (this.mRandomMovingWorker == null) { this.cmdRandomMoving.Text = "Stop"; this.mRandomMovingWorker = new Thread(new ThreadStart(this.handleRandomMoving)); this.mRandomMovingWorker.Start(); } else { try { this.mRandomMovingWorker.Abort(); } catch { } this.mRandomMovingWorker = null; this.cmdRandomMoving.Text = "Random moving"; } } private void cmdRemove_Click(object sender, EventArgs e) { foreach (userSession session in this.getSelectedSessions()) { try { session.Connection.Disconnect(); } catch { } } } private void cmdSelectAll_Click(object sender, EventArgs e) { foreach (ListViewItem item in this.lvBots.Items) { item.Selected = true; } } private void cmdSendToMyRoom_Click(object sender, EventArgs e) { if (((Engine.Sessions.trackerSession != null) && (Engine.Sessions.trackerSession.Connection != null)) && Engine.Sessions.trackerSession.Connection.isLoggedIn) { int roomID = Engine.Sessions.trackerSession.Connection.roomID; foreach (userSession session in this.getSelectedSessions()) { session.Connection.enterRoom(roomID, false); } } } private void cmdShout_Click(object sender, EventArgs e) { string text = this.txtChatMessage.Text; foreach (userSession session in this.getSelectedSessions()) { session.Connection.Shout(text); } } private void cmdToRoom_Click(object sender, EventArgs e) { int result = 0; if (int.TryParse(this.txtRoomID.Text, out result)) { foreach (userSession session in this.getSelectedSessions()) { session.Connection.enterRoom(result, true); } } } private void cmdWave_Click(object sender, EventArgs e) { foreach (userSession session in this.getSelectedSessions()) { session.Connection.Wave(); } } protected override void Dispose(bool disposing) { if (disposing && (this.components != null)) { this.components.Dispose(); } base.Dispose(disposing); } private void fileBrowser_FileOk(object sender, CancelEventArgs e) { } private void frmBotPanel_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; base.Hide(); } private void frmBotPanel_Load(object sender, EventArgs e) { } public List getSelectedSessions() { List list = new List(); foreach (ListViewItem item in this.lvBots.SelectedItems) { userSession session = Engine.Sessions.getSession(item.Text); if ((session != null) && session.Connection.isLoggedIn) { list.Add(session); } } return list; } private void handleRaidMode() { try { Random random; Dictionary dictionary; bool flag; goto Label_01CA; Label_0007: random = new Random(DateTime.Now.Millisecond + DateTime.Now.Second); Monitor.Enter(dictionary = Engine.Sessions.mSessions); try { foreach (userSession session in Engine.Sessions.mSessions.Values) { if (session.Connection.isLoggedIn && (session.Connection.roomID > 0)) { switch (Engine.generateRandomInt(0, 9)) { case 0: session.Connection.Wave(); break; case 1: session.Connection.Dance(); break; case 2: session.Connection.getItem(random.Next(1, 0x1a).ToString()); break; case 3: case 4: case 5: { string text = Engine.extSettings.getRandomRaidText(); if (text.Length > 0) { session.Connection.Shout(text); } break; } case 6: case 7: case 8: { int maxValue = 0x4b; if (!session.Connection.inPublicSpace) { maxValue = 30; } int x = random.Next(1, maxValue); int y = random.Next(1, maxValue); session.Connection.moveTo(x, y); break; } } } } } catch { } finally { Monitor.Exit(dictionary); } Thread.Sleep(100); Label_01CA: flag = true; } catch (ThreadAbortException) { } return; } private void handleRandomMoving() { try { Random random; Dictionary dictionary; bool flag; goto Label_0106; Label_0007: random = new Random(DateTime.Now.Millisecond + DateTime.Now.Second); Monitor.Enter(dictionary = Engine.Sessions.mSessions); try { foreach (userSession session in Engine.Sessions.mSessions.Values) { if (session.Connection.isLoggedIn && (session.Connection.roomID > 0)) { int maxValue = 0x4b; if (!session.Connection.inPublicSpace) { maxValue = 30; } int x = random.Next(1, maxValue); int y = random.Next(1, maxValue); session.Connection.moveTo(x, y); } } } catch { } finally { Monitor.Exit(dictionary); } Thread.Sleep(0xfa0); Label_0106: flag = true; } catch (ThreadAbortException) { } return; } private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(frmBotPanel)); this.toolStripSeparator5 = new ToolStripSeparator(); this.txtPassword = new ToolStripTextBox(); this.lblPassword = new ToolStripLabel(); this.txtUsername = new ToolStripTextBox(); this.lvBots = new ListView(); this.colUsername = new ColumnHeader(); this.colRoom = new ColumnHeader(); this.toolStripSeparator1 = new ToolStripSeparator(); this.cmdMoveToCoords = new ToolStripButton(); this.toolsAccounts = new ToolStrip(); this.lblUsername = new ToolStripLabel(); this.cmdAdd = new ToolStripButton(); this.cmdRemove = new ToolStripButton(); this.toolStripSeparator2 = new ToolStripSeparator(); this.cmdLoadList = new ToolStripButton(); this.cmdSelectAll = new ToolStripButton(); this.lblX = new ToolStripLabel(); this.lblStatuses = new ToolStripLabel(); this.toolStripSeparator4 = new ToolStripSeparator(); this.toolStripSeparator6 = new ToolStripSeparator(); this.txtY = new ToolStripTextBox(); this.txtItem = new ToolStripTextBox(); this.lblY = new ToolStripLabel(); this.lblChat = new ToolStripLabel(); this.txtX = new ToolStripTextBox(); this.txtChatMessage = new ToolStripTextBox(); this.toolStripSeparator7 = new ToolStripSeparator(); this.txtRoomID = new ToolStripTextBox(); this.lblMovements = new ToolStripLabel(); this.toolStripSeparator3 = new ToolStripSeparator(); this.botTools = new ToolStrip(); this.lblSendToRoom = new ToolStripLabel(); this.cmdToRoom = new ToolStripButton(); this.cmdSendToMyRoom = new ToolStripButton(); this.cmdRandomMoving = new ToolStripButton(); this.cmdShout = new ToolStripButton(); this.cmdWave = new ToolStripButton(); this.cmdDance = new ToolStripButton(); this.cmdGetItem = new ToolStripButton(); this.fileBrowser = new OpenFileDialog(); this.cmdRaidMode = new ToolStripButton(); this.toolsAccounts.SuspendLayout(); this.botTools.SuspendLayout(); base.SuspendLayout(); this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new Size(6, 0x17); this.txtPassword.BorderStyle = BorderStyle.FixedSingle; this.txtPassword.Name = "txtPassword"; this.txtPassword.Size = new Size(0x80, 0x15); this.txtPassword.Text = "passw0rd"; this.lblPassword.Name = "lblPassword"; this.lblPassword.Size = new Size(0x35, 13); this.lblPassword.Text = "Password"; this.txtUsername.BorderStyle = BorderStyle.FixedSingle; this.txtUsername.Name = "txtUsername"; this.txtUsername.Size = new Size(130, 0x15); this.txtUsername.Text = "Nillus"; this.lvBots.BorderStyle = BorderStyle.FixedSingle; this.lvBots.Columns.AddRange(new ColumnHeader[] { this.colUsername, this.colRoom }); this.lvBots.Dock = DockStyle.Top; this.lvBots.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0); this.lvBots.FullRowSelect = true; this.lvBots.GridLines = true; this.lvBots.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.lvBots.HideSelection = false; this.lvBots.Location = new Point(0, 0x2c); this.lvBots.Name = "lvBots"; this.lvBots.Size = new Size(0x174, 320); this.lvBots.Sorting = SortOrder.Ascending; this.lvBots.TabIndex = 0x22; this.lvBots.UseCompatibleStateImageBehavior = false; this.lvBots.View = View.Details; this.colUsername.Text = "Username"; this.colUsername.Width = 0xae; this.colRoom.Text = "Room ID"; this.colRoom.Width = 0x66; this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new Size(6, 0x17); this.cmdMoveToCoords.AutoSize = false; this.cmdMoveToCoords.ImageTransparentColor = Color.Magenta; this.cmdMoveToCoords.Name = "cmdMoveToCoords"; this.cmdMoveToCoords.Size = new Size(110, 20); this.cmdMoveToCoords.Text = "Move to coords"; this.cmdMoveToCoords.ToolTipText = "Send to this room"; this.cmdMoveToCoords.Click += new EventHandler(this.cmdMoveToCoords_Click); this.toolsAccounts.GripStyle = ToolStripGripStyle.Hidden; this.toolsAccounts.Items.AddRange(new ToolStripItem[] { this.lblUsername, this.txtUsername, this.lblPassword, this.txtPassword, this.cmdAdd, this.cmdRemove, this.toolStripSeparator2, this.cmdLoadList, this.toolStripSeparator1, this.cmdSelectAll }); this.toolsAccounts.LayoutStyle = ToolStripLayoutStyle.Flow; this.toolsAccounts.Location = new Point(0, 0); this.toolsAccounts.Name = "toolsAccounts"; this.toolsAccounts.Size = new Size(0x174, 0x2c); this.toolsAccounts.TabIndex = 0x23; this.lblUsername.Name = "lblUsername"; this.lblUsername.Size = new Size(0x37, 13); this.lblUsername.Text = "Username"; this.cmdAdd.Image = (Image) manager.GetObject("cmdAdd.Image"); this.cmdAdd.ImageTransparentColor = Color.Magenta; this.cmdAdd.Name = "cmdAdd"; this.cmdAdd.Size = new Size(0x57, 20); this.cmdAdd.Text = "Add account"; this.cmdAdd.Click += new EventHandler(this.cmdAdd_Click); this.cmdRemove.Alignment = ToolStripItemAlignment.Right; this.cmdRemove.Image = (Image) manager.GetObject("cmdRemove.Image"); this.cmdRemove.ImageTransparentColor = Color.Magenta; this.cmdRemove.Name = "cmdRemove"; this.cmdRemove.Size = new Size(0x6b, 20); this.cmdRemove.Text = "Remove account"; this.cmdRemove.Click += new EventHandler(this.cmdRemove_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new Size(6, 0x17); this.cmdLoadList.AutoSize = false; this.cmdLoadList.Image = Resources.book_open; this.cmdLoadList.ImageTransparentColor = Color.Magenta; this.cmdLoadList.Name = "cmdLoadList"; this.cmdLoadList.Size = new Size(90, 20); this.cmdLoadList.Text = "Load list"; this.cmdLoadList.Click += new EventHandler(this.cmdLoadList_Click); this.cmdSelectAll.Image = Resources.link; this.cmdSelectAll.ImageTransparentColor = Color.Magenta; this.cmdSelectAll.Name = "cmdSelectAll"; this.cmdSelectAll.Size = new Size(0x45, 20); this.cmdSelectAll.Text = "Select all"; this.cmdSelectAll.Click += new EventHandler(this.cmdSelectAll_Click); this.lblX.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0); this.lblX.Name = "lblX"; this.lblX.Size = new Size(0x11, 13); this.lblX.Text = "X:"; this.lblX.TextAlign = ContentAlignment.BottomCenter; this.lblStatuses.Name = "lblStatuses"; this.lblStatuses.Size = new Size(0x26, 13); this.lblStatuses.Text = "Status"; this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Size = new Size(6, 0x17); this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Size = new Size(6, 0x17); this.txtY.AutoSize = false; this.txtY.BorderStyle = BorderStyle.FixedSingle; this.txtY.Name = "txtY"; this.txtY.Size = new Size(30, 0x15); this.txtY.Text = "5"; this.txtItem.BorderStyle = BorderStyle.FixedSingle; this.txtItem.Name = "txtItem"; this.txtItem.Size = new Size(40, 0x15); this.txtItem.Text = "24"; this.lblY.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0); this.lblY.Name = "lblY"; this.lblY.Size = new Size(0x11, 13); this.lblY.Text = "Y:"; this.lblY.TextAlign = ContentAlignment.BottomCenter; this.lblChat.AutoSize = false; this.lblChat.Name = "lblChat"; this.lblChat.Size = new Size(0x26, 13); this.lblChat.Text = "Chat"; this.txtX.AutoSize = false; this.txtX.BorderStyle = BorderStyle.FixedSingle; this.txtX.Name = "txtX"; this.txtX.Size = new Size(0x23, 0x15); this.txtX.Text = "5"; this.txtChatMessage.AutoSize = false; this.txtChatMessage.BorderStyle = BorderStyle.FixedSingle; this.txtChatMessage.Name = "txtChatMessage"; this.txtChatMessage.Size = new Size(200, 0x15); this.txtChatMessage.Text = "REVANCHE! :D"; this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Size = new Size(6, 0x17); this.txtRoomID.BorderStyle = BorderStyle.FixedSingle; this.txtRoomID.Name = "txtRoomID"; this.txtRoomID.Size = new Size(100, 0x15); this.txtRoomID.Text = "1337"; this.lblMovements.Name = "lblMovements"; this.lblMovements.Size = new Size(0x26, 13); this.lblMovements.Text = "Moves"; this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new Size(6, 0x17); this.botTools.Dock = DockStyle.Bottom; this.botTools.GripStyle = ToolStripGripStyle.Hidden; this.botTools.Items.AddRange(new ToolStripItem[] { this.lblSendToRoom, this.toolStripSeparator3, this.txtRoomID, this.cmdToRoom, this.cmdSendToMyRoom, this.lblMovements, this.toolStripSeparator4, this.lblX, this.txtX, this.lblY, this.txtY, this.cmdMoveToCoords, this.cmdRandomMoving, this.lblChat, this.toolStripSeparator5, this.txtChatMessage, this.cmdShout, this.lblStatuses, this.toolStripSeparator6, this.cmdWave, this.cmdDance, this.toolStripSeparator7, this.txtItem, this.cmdGetItem, this.cmdRaidMode }); this.botTools.LayoutStyle = ToolStripLayoutStyle.Flow; this.botTools.Location = new Point(0, 0x18c); this.botTools.Name = "botTools"; this.botTools.Size = new Size(0x174, 0x5c); this.botTools.TabIndex = 0x24; this.botTools.Text = "toolStrip1"; this.lblSendToRoom.Name = "lblSendToRoom"; this.lblSendToRoom.Size = new Size(0x27, 13); this.lblSendToRoom.Text = "Rooms"; this.cmdToRoom.Image = Resources.house_go; this.cmdToRoom.ImageTransparentColor = Color.Magenta; this.cmdToRoom.Name = "cmdToRoom"; this.cmdToRoom.Size = new Size(0x6f, 20); this.cmdToRoom.Text = "Send to this room"; this.cmdToRoom.ToolTipText = "Send to this room"; this.cmdToRoom.Click += new EventHandler(this.cmdToRoom_Click); this.cmdSendToMyRoom.Image = Resources.house_link; this.cmdSendToMyRoom.ImageTransparentColor = Color.Magenta; this.cmdSendToMyRoom.Name = "cmdSendToMyRoom"; this.cmdSendToMyRoom.Size = new Size(0x6c, 20); this.cmdSendToMyRoom.Text = "Send to my room"; this.cmdSendToMyRoom.Click += new EventHandler(this.cmdSendToMyRoom_Click); this.cmdRandomMoving.Image = (Image) manager.GetObject("cmdRandomMoving.Image"); this.cmdRandomMoving.ImageTransparentColor = Color.Magenta; this.cmdRandomMoving.Name = "cmdRandomMoving"; this.cmdRandomMoving.Size = new Size(0x67, 20); this.cmdRandomMoving.Text = "Random moving"; this.cmdRandomMoving.Click += new EventHandler(this.cmdRandomMoving_Click); this.cmdShout.Image = Resources.user_comment; this.cmdShout.ImageTransparentColor = Color.Magenta; this.cmdShout.Name = "cmdShout"; this.cmdShout.Size = new Size(100, 20); this.cmdShout.Text = "Shout message"; this.cmdShout.Click += new EventHandler(this.cmdShout_Click); this.cmdWave.Image = Resources.flag_blue; this.cmdWave.ImageTransparentColor = Color.Magenta; this.cmdWave.Name = "cmdWave"; this.cmdWave.Size = new Size(0x37, 20); this.cmdWave.Text = "Wave"; this.cmdWave.Click += new EventHandler(this.cmdWave_Click); this.cmdDance.Image = Resources.group_go; this.cmdDance.ImageTransparentColor = Color.Magenta; this.cmdDance.Name = "cmdDance"; this.cmdDance.Size = new Size(0x39, 20); this.cmdDance.Text = "Dance"; this.cmdDance.Click += new EventHandler(this.cmdDance_Click); this.cmdGetItem.Image = Resources.pill_go; this.cmdGetItem.ImageTransparentColor = Color.Magenta; this.cmdGetItem.Name = "cmdGetItem"; this.cmdGetItem.Size = new Size(0x43, 20); this.cmdGetItem.Text = "Get item"; this.cmdGetItem.Click += new EventHandler(this.cmdGetItem_Click); this.fileBrowser.FileName = "accounts"; this.fileBrowser.Filter = "Accountlists|*.txt"; this.fileBrowser.FileOk += new CancelEventHandler(this.fileBrowser_FileOk); this.cmdRaidMode.Image = Resources.lightning; this.cmdRaidMode.ImageTransparentColor = Color.Magenta; this.cmdRaidMode.Name = "cmdRaidMode"; this.cmdRaidMode.Size = new Size(0x4d, 20); this.cmdRaidMode.Text = "Raid mode"; this.cmdRaidMode.Click += new EventHandler(this.cmdRaidMode_Click); base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(0x174, 0x1e8); base.Controls.Add(this.lvBots); base.Controls.Add(this.toolsAccounts); base.Controls.Add(this.botTools); base.Icon = (Icon) manager.GetObject("$this.Icon"); base.Name = "frmBotPanel"; this.Text = "Devoid : bot control panel"; base.TopMost = true; base.Load += new EventHandler(this.frmBotPanel_Load); base.FormClosing += new FormClosingEventHandler(this.frmBotPanel_FormClosing); this.toolsAccounts.ResumeLayout(false); this.toolsAccounts.PerformLayout(); this.botTools.ResumeLayout(false); this.botTools.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); } private bool logSingleBotIn(string Username, string Password) { userSession pSession = Engine.Site.LogUserIn(Username, Password); if ((pSession != null) && Engine.Site.SetSsoTicketForSessionUser(pSession)) { pSession.Connection = new userConnection(pSession, null); pSession.Connection.ConnectToServer(); if (Engine.DEBUG_ENABLED) { Engine.Log("Successfully logged bot " + Username + " in."); } return true; } if (Engine.DEBUG_ENABLED) { Engine.Log("Bot login failed (user: " + Username + "), check credentials etc."); } return false; } public void modBot(string Username, int colID, string Value) { if (base.InvokeRequired) { base.Invoke(new botModder(this.modBot), new object[] { Username, colID, Value }); } else { try { this.lvBots.Items[Username].SubItems[colID].Text = Value; } catch { } } } public void removeBot(string Username) { if (base.InvokeRequired) { base.Invoke(new botWorker(this.removeBot), new object[] { Username }); } else { this.lvBots.Items.RemoveByKey(Username); } } private delegate void botListLoaderWorker(string filename); private delegate bool BotLoginWorker(string Username, string Password); private delegate void botModder(string Username, int ColumnIndex, string Value); private delegate void botWorker(string Username); } }