Пример #1
0
 public override void Stop()
 {
     if (thread != null && thread.IsAlive)
     {
         thread.Abort();
     }
     AutoItX3Declarations.AU3_Send("{4 UP}{CTRLUP}", 0);
     Console.WriteLine("Auto laugh state changed off");
 }
Пример #2
0
 public void AutoSmiteFunc()
 {
     while (true)
     {
         foreach (Minion minion in Engine.GetAll <Minion>())
         {
             //Console.WriteLine(unit.name);
             if (minion.name.StartsWith("SRU") && !minion.name.Contains("Mini") && !minion.name.Contains("Wall")) //temporary workaround for the new summoners rift
             {
                 if (!minion.IsVisible())                                                                         //must be visible to smite
                 {
                     continue;
                 }
                 if (minion.hp > 0 && !minion.isDead)
                 {
                     MainChampion myHero = Champion.Me;
                     if (myHero == null)
                     {
                         break;
                     }
                     if (minion.hp < minion.maxhp && myHero.DistanceFrom(minion) < SMITE_RANGE && Engine.CanCastSpell(smiteKey))
                     {
                         Engine.FloatingText(minion, "Ready To Smite", MessageType.Red);
                         Console.WriteLine("written ready to smite");
                     }
                     int myLevel = myHero.level;
                     if (myLevel < 1 || myLevel > 18) // happens sometimes when the game ends
                     {
                         break;
                     }
                     if (minion.hp <= smiteDmg[myLevel - 1])
                     {
                         //check distance
                         if (myHero.DistanceFrom(minion) < SMITE_RANGE && Engine.CanCastSpell(smiteKey))
                         {
                             //maybe install a mouse hook to disable mouse movement while moving mouse and smiting
                             Console.WriteLine("smiting " + minion.name + DateTime.Now);
                             //move camera
                             Engine.LookAtTarget(minion);
                             AutoItX3Declarations.AU3_MouseMove(Win32.GetSystemMetrics(0) / 2, Win32.GetSystemMetrics(1) / 2, 0);
                             AutoItX3Declarations.AU3_Send(smiteKey, 0);
                         }
                     }
                 }
             }
         }
         System.Threading.Thread.Sleep(20);
     }
 }
Пример #3
0
        public frmGUI()
        {
            AutoItX3Declarations.AU3_Opt("SendKeyDownDelay", 100);

            myDelegate = hookFunction;

            InitializeComponent();
            rdbInjectManually.Checked = false;
            btnInject.Enabled         = false;

            foreach (Process p in Process.GetProcesses())
            {
                if (p.ProcessName == "League of Legends")
                {
                    if (Injector.AlreadyInjected(p, Directory.GetCurrentDirectory() + "\\" + dllName))
                    {
                        new Thread(delegate()
                        {
                            Thread.Sleep(100);
                            AfterInject();
                        }).Start();
                    }
                    break;
                }
            }

            modules = new List <Module>();
            modules.Add(new AutoLaugh(Keys.F9, 5, 5));
            modules.Add(new AutoSmite(Keys.F8, 5, 25, rdbSmiteF.Checked ? "F" : "D"));
            modules.Add(new IgniteIndicator(Keys.F7, 5, 45));
            modules.Add(new WardRevealer(Keys.F6, 5, 65));
            modules.Add(new CloneDetector(Keys.F5, 5, 85));

            hookPtr = SetWindowsHookEx(13, myDelegate, IntPtr.Zero, 0); //WH_KEYBOARD_LL=13
            if (hookPtr == IntPtr.Zero)
            {
                MessageBox.Show("Failed to hook");
                Close();
            }
            Console.WriteLine("keyboard hook installed"); //im a hooker yo
        }
Пример #4
0
 public void AutoLaughFunc()
 {
     while (true)
     {
         IntPtr hWnd = Win32.FindWindow(null, "League of Legends (TM) Client");
         if (Engine.IsLolRunning)
         {
             if (Win32.GetForegroundWindow() == hWnd)
             {
                 AutoItX3Declarations.AU3_Send("{CTRLDOWN}4{CTRLUP}", 0);
                 Console.WriteLine("Laugh");
             }
         }
         else
         {
             Stop();
             return;
         }
         System.Threading.Thread.Sleep(2000);
     }
 }