Exemple #1
0
        public void KillEverything()
        {
            if (this.label_target_name.InvokeRequired)
            {
                KillEverything_Callback d = new KillEverything_Callback(KillEverything);
                label_target_name.Invoke(d);
                return;
            }

            //try to kill everything...
            Globals.gamedata.running = false;

            Util.Stop_Connections();

            Util.KillThreads();

            System.Threading.Thread.Sleep(Globals.SLEEP_KillReset);

            Util.Setup_Threads();

            if (Globals.gamedata.login_failed)
            {
                Globals.gamedata.login_failed = false;
                menuItem_cmd_logon_Click(null, null);
            }
        }
Exemple #2
0
        private void UpdateKeyboard()
        {
            KeyboardState state = keyboard.GetCurrentState();

            bool pressed = false;

            foreach (Key k in state.PressedKeys)
            {
                if (k.ToString() == Globals.DirectInputKey)
                {
                    pressed = true;

                    if (Globals.DirectInputLast == false)
                    {
                        Globals.l2net_home.Toggle_Botting();
                        //Util.KillThreads();
                        Globals.DirectInputLast = true;
                    }
                    else
                    {
                    }
                }
                else if (Globals.DirectInputSetup == true)
                {
                    Globals.DirectInputSetupValue = k.ToString();

                    try
                    {
                        Globals.DirectInputSetup = false;
                        Globals.setupwindow.label_toggle_key.Text        = Globals.DirectInputSetupValue;
                        Globals.setupwindow.button_change_toggle.Enabled = true;

                        Globals.setupwindow.button_change_kill.Enabled   = true;
                        Globals.setupwindow.comboBox_voice.Enabled       = true;
                        Globals.setupwindow.textBox_l2path.Enabled       = true;
                        Globals.setupwindow.textBox_key.Enabled          = true;
                        Globals.setupwindow.comboBox_texturemode.Enabled = true;
                        Globals.setupwindow.comboBox_viewrange.Enabled   = true;
                    }
                    catch
                    {
                    }
                }
                else if (k.ToString() == Globals.DirectInputKey2)
                {
                    pressed = true;

                    if (Globals.DirectInputLast2 == false)
                    {
                        Globals.DirectInputLast2 = true;
                        Util.KillThreads();
                        Util.Stop_Connections();
                    }
                    else
                    {
                    }
                }
                else if (Globals.DirectInputSetup2 == true)
                {
                    Globals.DirectInputSetupValue2 = k.ToString();

                    try
                    {
                        Globals.DirectInputSetup2 = false;
                        Globals.setupwindow.label_kill_key.Text        = Globals.DirectInputSetupValue2;
                        Globals.setupwindow.button_change_kill.Enabled = true;

                        Globals.setupwindow.button_change_toggle.Enabled = true;
                        Globals.setupwindow.comboBox_voice.Enabled       = true;
                        Globals.setupwindow.textBox_l2path.Enabled       = true;
                        Globals.setupwindow.textBox_key.Enabled          = true;
                        Globals.setupwindow.comboBox_texturemode.Enabled = true;
                        Globals.setupwindow.comboBox_viewrange.Enabled   = true;
                    }
                    catch
                    {
                    }
                }
            }

            if (pressed == false)
            {
                Globals.DirectInputLast  = false;
                Globals.DirectInputLast2 = false;
            }
        }
Exemple #3
0
 public static void Kill()
 {
     Util.KillThreads();
     System.Windows.Forms.Application.Exit();
 }