예제 #1
0
        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.Handled = true;
            }

            if (e.KeyCode == (Keys)Enum.Parse(typeof(Keys), Config.Default.macroTPKey))
            {
                autoTP = 11;

                foreach (Client c in clients)
                {
                    Native.SendString(c.clientProcess, "/teleport " + tbxMainPlayer.Text);
                }
            }


            if (running == 1 && keysToSend.Contains(e.KeyCode))
            {
                foreach (Client c in clients)
                {
                    Native.SendUp(c.clientProcess, e.KeyCode);
                }
            }
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     foreach (Client c in clients)
     {
         Native.SendString(c.clientProcess, "poop");
     }
 }
예제 #3
0
        public void Teleport()
        {
            string player = "";

            main.Invoke((MethodInvoker) delegate() { player = main.tbxMainPlayer.Text; });
            main.autoTP = 11;

            foreach (Keys keyDown in pressedKeys.ToArray()) //Send all the keys up so they don't interfere with the /tp
            {
                foreach (Client c in main.clients)
                {
                    Native.SendUp(c.clientProcess, keyDown);
                }
            }

            Thread.Sleep(Config.Default.debugTPDelay);

            foreach (Client c in main.clients)
            {
                Native.SendString(c.clientProcess, "/teleport " + player);
            }

            foreach (Keys keyDown in pressedKeys.ToArray())
            {
                foreach (Client c in main.clients)
                {
                    Native.SendDown(c.clientProcess, keyDown);
                }
            }
        }
예제 #4
0
        private void tmrChecker_Tick(object sender, EventArgs e)
        {
            //Performance
            lblPerformance.Text = "CPU " + (int)perfCPU.NextValue() + "%  |  RAM: ";

            for (int i = 0; i < clients.Count; i++)
            {
                if (!clients[i].clientProcess.HasExited)
                {
                    lblPerformance.Text += "[" + i + "] " + clients[i].clientProcess.PagedMemorySize64 / 1024 / 1024 + "mb   :   ";
                }
            }

            lblPerformance.Location = new Point(this.Width - 50 - lblPerformance.Size.Width, lblPerformance.Location.Y);

            //Auto TP

            if (autoTP > 0)
            {
                autoTP--;
            }

            lblTPCountdown.Text = "Able to teleport in " + autoTP + "...";

            if (autoTP == 0)
            {
                if (chkAutoTeleport.Checked && running == 1)
                {
                    autoTP = 11;

                    foreach (Client c in clients)
                    {
                        Native.SendString(c.clientProcess, "/teleport " + tbxMainPlayer.Text);
                    }
                }
            }
        }