Exemplo n.º 1
0
        private void Stunner_Tick(object sender, EventArgs e)
        {
            Hotkeys hotkeys = new Hotkeys();

            hotkeys.RefreshAbilities();

            int targetID = MemoryFunctions.GetTarget();

            if (targetID == -1)
            {
                return;
            }

            Character selected = new Character((uint)targetID, true);


            if (selected.UsingAbilityID != 0)
            {
                lbl_CurrAbility.Content = selected.UsingAbilityID.ToString("X");
            }

            bool found = false;

            foreach (var item in lst_StunID.Items)
            {
                if (selected.UsingAbilityID.ToString("X").ToLower() == item.ToString().ToLower())
                {
                    found = true;
                    break;
                }
            }

            if (found)
            {
                if (hotkeys[109].PercentReady == 100)
                {
                    Global.PauseInput = true;
                    Utilities.Keyboard.KeyBoardHelper.Ctrl(Keys.D3);
                }
            }
            else
            {
                Global.PauseInput = false;
            }
        }
Exemplo n.º 2
0
 private void btn_Start_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     _hotkeys.RefreshAbilities();
     _targetMonitor.Start();
     this.Title = "Cure Bot: Running...";
 }
Exemplo n.º 3
0
        public override void Fight(Character user, Character monster, Recast recast)
        {
            base.Fight(user, monster, recast);
            bool dotNeeded        = !monster.ContainsStatusEffect(246, user.ID, true);
            bool dragonkickNeeded = !monster.ContainsStatusEffect(98, 0, false);
            bool lockIcon;

            monster.Target();
            recast.Refresh(2.0);



            try
            {
                ePosition position = monster.Position(user);

                Hotkeys        hotkeys            = new Hotkeys();
                Hotkeys.Hotkey highlightedAbility = null;

                hotkeys.RefreshAbilities();

                _mnkHelper.txt_Title.Content = "Position: " + position.ToString();


                if (user.ContainsStatusEffect(103, 0, false) == false && hotkeys[63].PercentReady == 100)
                {
                    hotkeys[63].UseAbility();
                }

                int colorOffset = (int)((hotkeys.Abilities[53].PercentReady - 25) * 3.4);
                if (colorOffset > 255)
                {
                    colorOffset = 255;
                }

                if (hotkeys.Abilities[53].PercentReady < 75)
                {
                    _mnkHelper.txt_Current.Foreground =
                        new SolidColorBrush(Color.FromRgb(255, 0, 255));
                    lockIcon = true;
                }
                else
                {
                    lockIcon = false;
                    _mnkHelper.txt_Current.Foreground = new SolidColorBrush(Color.FromRgb((byte)(255 - colorOffset), (byte)colorOffset, 0));
                }


                if (user.ContainsStatusEffect(110, 0, false))
                {
                    if (position == ePosition.Side)
                    {
                        highlightedAbility = hotkeys.Abilities[56]; // Snap Punch
                    }
                    else if (position == ePosition.Back)
                    {
                        highlightedAbility = hotkeys.Abilities[54]; // True Strike
                    }
                    else
                    {
                        highlightedAbility = hotkeys.Abilities[56]; // Snap Punch
                    }
                    if (hotkeys.Abilities[53].PercentReady > 50 && lockIcon == false)
                    {
                        SetCurrentAbilityImage(highlightedAbility.ID, recast, true, dotNeeded, dragonkickNeeded);
                    }
                }
                else
                {
                    foreach (KeyValuePair <short, Hotkeys.Hotkey> hk in hotkeys.Abilities)
                    {
                        if (hk.Value.Highlighted)
                        {
                            if (user.ContainsStatusEffect(101, 0, false) == false && hk.Value.ID == 61 && user.TP_Current >= 60) // Twin Snakes if damage buff is down
                            {
                                highlightedAbility = hk.Value;
                                break;
                            }
                            else if (hk.Value.ID == 58 && user.TP_Current >= 40) // Haymaker
                            {
                                highlightedAbility = hk.Value;
                                break;
                            }
                            else if (position == ePosition.Side)
                            {
                                if (hk.Value.ID == 61 && user.TP_Current >= 60) // Twin Snakes
                                {
                                    highlightedAbility = hk.Value;
                                }
                                else if (hk.Value.ID == 56 && user.TP_Current >= 50) // Snap Punch
                                {
                                    highlightedAbility = hk.Value;
                                }
                            }
                            else if (position == ePosition.Back)
                            {
                                if (hk.Value.ID == 54 && user.TP_Current >= 50) // True Strike
                                {
                                    highlightedAbility = hk.Value;
                                }
                                else if (hk.Value.ID == 66 && monster.ContainsStatusEffect(246, user.ID, true) == false && user.TP_Current >= 50) // Demolish DOT
                                {
                                    highlightedAbility = hk.Value;
                                }
                                else if (hk.Value.ID == 56 && user.TP_Current >= 50) // Snap Punch
                                {
                                    if (highlightedAbility != null)
                                    {
                                        if (highlightedAbility.ID == 66)
                                        {
                                            continue;
                                        }
                                    }

                                    highlightedAbility = hk.Value;
                                }
                            }
                            else
                            {
                                if (hk.Value.ID != 72 && hk.Value.ID != 36 && user.TP_Current >= 60)
                                {
                                    highlightedAbility = hk.Value;
                                }
                            }
                        }
                    }

                    // Check for highlighted abilities if there is no position combos available.
                    if (highlightedAbility == null)
                    {
                        foreach (KeyValuePair <short, Hotkeys.Hotkey> hk in hotkeys.Abilities)
                        {
                            if (hk.Value.Highlighted)
                            {
                                if (user.ContainsStatusEffect(101, 0, false) == false && hk.Value.ID == 61 && user.TP_Current >= 60)
                                // Twin Snakes if damage buff is down
                                {
                                    highlightedAbility = hk.Value;
                                    break;
                                }

                                if (hk.Value.ID == 66 && monster.ContainsStatusEffect(246, user.ID, true) == false && user.TP_Current >= 50)
                                // Demolish DOT
                                {
                                    highlightedAbility = hk.Value;
                                    break;
                                }

                                if (hk.Value.ID != 72 && hk.Value.ID != 36 && user.TP_Current >= 60)
                                {
                                    highlightedAbility = hk.Value;
                                }
                            }
                        }
                    }

                    if (highlightedAbility == null)
                    {
                        if (lockIcon == false)
                        {
                            if (monster.ContainsStatusEffect(106, user.ID, true) == false)
                            {
                                SetCurrentAbilityImage(68, recast, false, dotNeeded, dragonkickNeeded);
                                // Touch of Death
                            }
                            else if (position == ePosition.Back)
                            {
                                SetCurrentAbilityImage(53, recast, false, dotNeeded, dragonkickNeeded);
                            }
                            else if (position == ePosition.Side)
                            {
                                SetCurrentAbilityImage(74, recast, false, dotNeeded, dragonkickNeeded);
                            }
                            else
                            {
                                SetCurrentAbilityImage(53, recast, false, dotNeeded, dragonkickNeeded);
                            }
                        }
                    }
                    else
                    {
                        if (hotkeys.Abilities[53].PercentReady > 75 && lockIcon == false)
                        {
                            SetCurrentAbilityImage(highlightedAbility.ID, recast, false, dotNeeded, dragonkickNeeded);
                        }
                    }
                }



                if (recast.SubAbilities.Contains(80) == false && user.TP_Current < 450)
                {
                    hotkeys.Abilities[80].UseAbility(); // Invigorate
                }
                else if (hotkeys.Abilities[53].PercentReady > 80 && hotkeys.Abilities[53].InRange == 1)
                {
                    if (highlightedAbility != null) // Use Combo
                    {
                        highlightedAbility.UseAbility();
                    }
                    else if (monster.ContainsStatusEffect(106, user.ID, true) == false && user.TP_Current >= 80) // Touch of Death
                    {
                        hotkeys.Abilities[68].UseAbility();
                    }
                    else if (position == ePosition.Back && user.TP_Current >= 60)
                    {
                        hotkeys.Abilities[53].UseAbility(); // Start Bootshine Combo
                    }
                    else if (position == ePosition.Side && user.TP_Current >= 60)
                    {
                        hotkeys.Abilities[74].UseAbility(); // Start Dragonkick
                    }
                    else if (user.TP_Current >= 60)
                    {
                        hotkeys.Abilities[53].UseAbility();
                    }
                }
                else if (hotkeys.Abilities[53].InRange == 1)
                {
                    if (recast.Abilities.Contains(3) == false || recast.SubAbilities.Contains(85) == false)
                    {
                        Utilities.Keyboard.KeyBoardHelper.KeyPress(Keys.Dash);
                    }
                    else if (recast.Abilities.Contains(8) == false && user.ContainsStatusEffect(112, 0, false) == false && user.ContainsStatusEffect(113, 0, false) == false && user.Level >= 50)
                    {
                        hotkeys.Abilities[69].UseAbility(); // Perfect Balance
                    }
                    else if (recast.Abilities.Contains(5) == false)
                    {
                        hotkeys.Abilities[64].UseAbility(); // Steel Peak
                    }
                    else if (recast.Abilities.Contains(7) == false)
                    {
                        hotkeys.Abilities[67].UseAbility();                                                     // Howling Fist
                    }
                    else if (hotkeys[36].PercentReady >= 99 && hotkeys[36].IsInHotbar && hotkeys[36].Activated) // Mercy Stroke
                    {
                        hotkeys[36].UseAbility();
                    }
                }
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.StackTrace.ToString());
            }
        }
Exemplo n.º 4
0
        public override void Fight(Character user, Character monster, Recast recast)
        {
            base.Fight(user, monster, recast);

            //byte distance = monster.Distance;
            monster.Target();
            recast.Refresh(2.0);
            user.Refresh();

            ePosition position = monster.Position(user);

            Hotkeys hotkeys = new Hotkeys();

            Hotkeys.Hotkey highlightedAbility = null;

            hotkeys.RefreshAbilities();

            if (hotkeys.Abilities[92].InRange == 0)
            {
                return;
            }

            foreach (KeyValuePair <short, Hotkeys.Hotkey> hk in hotkeys.Abilities)
            {
                if (hk.Value.Highlighted && hk.Value.ID != 89)
                {
                    highlightedAbility = hk.Value;
                }
            }


            if (recast.Abilities.Contains(2) == false && user.TP_Current < 450)
            {
                hotkeys.Abilities[80].UseAbility(); // Invigorate
            }
            else if (recast.WeaponSpecials.Count == 0 && hotkeys.Abilities[75].InRange == 1)
            {
                //if (distance > 7)
                //{
                //    hotkeys.Abilities[90].UseAbility(); // Piercing Talon
                //} else
                if (highlightedAbility != null)
                {
                    if (highlightedAbility.ID == 84 && recast.Abilities.Contains(4) == false)
                    {
                        hotkeys.Abilities[83].UseAbility(); // Life Surge for Full Thrust
                    }
                    else
                    {
                        highlightedAbility.UseAbility();
                    }
                }
                else if (user.ContainsStatusEffect(115, 0, false) == false && position == ePosition.Side)
                //Heavy Thrust Dmg Buff From Side
                {
                    hotkeys.Abilities[79].UseAbility();
                }
                else if (monster.ContainsStatusEffect(119, user.ID, true) == false) //Phlebotomize DOT
                {
                    hotkeys.Abilities[91].UseAbility();
                }
                else if (position == ePosition.Back && monster.ContainsStatusEffect(121, user.ID, true) == false)
                {
                    hotkeys.Abilities[81].UseAbility(); // Start Impulse Drive Combo
                }
                else
                {
                    hotkeys.Abilities[75].UseAbility(); // Start True Thrust Combo
                }
            }
            else
            {
                if ((recast.Abilities.Contains(5) == false || recast.SubAbilities.Contains(59) == false) && hotkeys.Abilities[75].InRange == 1)
                // Blood for Blood or Internal Release
                {
                    Utilities.Keyboard.KeyBoardHelper.KeyPress(Keys.D0);
                }

                if (monster.Name.Contains("Titan") == false)
                {
                    if (recast.Abilities.Contains(7) == false && recast.Abilities.Contains(10) == false)
                    {
                        hotkeys.Abilities[93].UseAbility(); // Power Surge
                    }
                    else if (recast.Abilities.Contains(10) == false)
                    {
                        hotkeys.Abilities[96].UseAbility(); // Dragonfire Dive
                    }
                    else if (recast.Abilities.Contains(6) == false)
                    {
                        hotkeys.Abilities[92].UseAbility(); // Jump
                    }
                    else if (recast.Abilities.Contains(9) == false)
                    {
                        hotkeys.Abilities[95].UseAbility(); // Spineshatter drive
                    }
                }
            }
        }
Exemplo n.º 5
0
        public override void Fight(Character user, Character monster, Recast recast)
        {
            base.Fight(user, monster, recast);
            bool    ignoreDOT = false;
            Hotkeys hotkeys   = new Hotkeys();

            hotkeys.RefreshAbilities();

            if (hotkeys[STRAIGHTSHOT].InRange == 0)
            {
                return;
            }

            //UIWindow ui = new UIWindow();
            //ui.RefreshPointers();

            //  if (ui.GetActiveWindowName() == "chatlog")
            //      return;

            monster.Target();
            recast.Refresh(2.1);
            user.Refresh();

            if (user.ContainsStatusEffect2(451, (float)3.5))
            {
                Debug.Print("Cursed Voice");
                SoundModule.PlayAsyncSound("cursedVoice.wav");

                while (user.ContainsStatusEffect(451, 0, false))
                {
                    Thread.Sleep(100);
                }

                Thread.Sleep(200);
                user.Refresh();
            }

            if (monster.Name.ToLower().Contains("renaud"))
            {
                return;
            }


            // Stop for turn 6 ability
            if (monster.UsingAbilityID == 1949)
            {
                //Utilities.Keyboard.KeyBoardHelper.Ctrl(Keys.D6);
                return;
            }

            List <Character> nearMobs = monster.MonstersNear(100.0);

            // Blight Turn 6
            if (nearMobs.Any(mob => mob.UsingAbilityID == 1949))
            {
                //Utilities.Keyboard.KeyBoardHelper.Ctrl(Keys.D6);
                return;
            }



            // Turn 7 Petrification
            if (nearMobs.Any(mob => mob.UsingAbilityID == 1979))
            {
                SoundModule.PlayAsyncSound("petrification.wav");
                //Utilities.Keyboard.KeyBoardHelper.Ctrl(Keys.D6);
                return;
            }
            if (nearMobs.Any(mob => mob.UsingAbilityID == 1969))
            {
                SoundModule.PlayAsyncSound("petrification.wav");
                //Utilities.Keyboard.KeyBoardHelper.Ctrl(Keys.D6);
                return;
            }

            if (user.ContainsStatusEffect(452, 0, false))
            {
                SoundModule.PlayAsyncSound("Shriek.wav");
            }

            //if (nearMobs.Any(mob => mob.UsingAbilityID == 1967))
            //{
            //    if (user.ContainsStatusEffect(452, 0, false))
            //    {
            //        SoundModule.PlayAsyncSound("Shriek.wav");
            //    }
            //    else
            //    {
            //        SoundModule.PlayAsyncSound("Shriek2.wav");
            //    }
            //}

            if (MemoryFunctions.GetGroundCursor() > 0)
            {
                return;
            }

            foreach (string mobToIgnore in _ignoreDOTMobs)
            {
                if (monster.Name.ToLower().Contains(mobToIgnore.ToLower()) &&
                    monster.Name.ToLower().Contains("gaoler") == false)
                {
                    ignoreDOT = true;
                }
            }

            if (MemoryFunctions.GetMapID() == 364 && monster.Name.Contains("Good King") == false)
            {
                ignoreDOT = true;
            }


            if (hotkeys[INTERNALRELEASE].PercentReady >= 99 &&
                user.Level >= 26 && Global.DisableBuffs == false && user.TP_Current >= 40 && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(INTERNALRELEASE, 21, MemoryFunctions.ActionType.Ability);
                hotkeys[INTERNALRELEASE].UseAbility();
            }
            else if (recast.WeaponSpecials.Count == 0)
            {
                if ((user.ContainsStatusEffect(130, 0, false, (float)3.0) == false ||
                     user.ContainsStatusEffect(122, 0, false)) && user.Level >= 2 && user.TP_Current >= 70)
                {
                    //MemoryFunctions.ForceAction(STRAIGHTSHOT, 20, MemoryFunctions.ActionType.WS);
                    hotkeys[STRAIGHTSHOT].UseAbility();
                }
                else if (monster.ContainsStatusEffect(124, user.ID, true, (float)2.5) == false &&
                         user.Level >= 6 && user.TP_Current >= 100 && ignoreDOT == false && monster.StatusEffects().Count < 29)
                {
                    //MemoryFunctions.ForceAction(VENOMOUSBITE, 20, MemoryFunctions.ActionType.WS);
                    hotkeys[VENOMOUSBITE].UseAbility();
                }
                else if (monster.ContainsStatusEffect(129, user.ID, true, (float)2.5) == false &&
                         user.Level >= 30 && user.TP_Current >= 100 && monster.StatusEffects().Count < 29 &&
                         (ignoreDOT == false || monster.Name.ToLower().Contains("infernal nail")))
                {
                    //MemoryFunctions.ForceAction(WINDBITE, 20, MemoryFunctions.ActionType.WS);
                    hotkeys[WINDBITE].UseAbility();
                }
                else if (hotkeys[HAYMAKER].Highlighted && user.Level >= 10 && user.TP_Current >= 40)
                {
                    //MemoryFunctions.ForceAction(HAYMAKER, 20, MemoryFunctions.ActionType.WS);
                    hotkeys[HAYMAKER].UseAbility();
                }
                else if (user.TP_Current >= 60)
                {
                    //MemoryFunctions.ForceAction(HEAVYSHOT, 20, MemoryFunctions.ActionType.WS);
                    hotkeys[HEAVYSHOT].UseAbility();
                }
            }
            else if (hotkeys[INVIGORATE].PercentReady >= 100 && user.Level >= 4 &&
                     user.TP_Current <= 550 && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(INVIGORATE, 20, MemoryFunctions.ActionType.Ability);
                hotkeys[INVIGORATE].UseAbility();
            }
            else if (hotkeys[RAGINGSTRIKES].PercentReady >= 100 && user.Level >= 4 && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(RAGINGSTRIKES, 19, MemoryFunctions.ActionType.Ability);
                hotkeys[RAGINGSTRIKES].UseAbility();
            }
            else if (hotkeys[BLOODFORBLOOD].PercentReady >= 100 && user.Level >= 38 &&
                     monster.Name.Contains("Twintania") == false &&
                     monster.Name.Contains("Conflagration") == false && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            // && user.ContainsStatusEffect(125, 0, false) == false
            {
                //MemoryFunctions.ForceAction(BLOODFORBLOOD, 20, MemoryFunctions.ActionType.Ability);
                hotkeys[BLOODFORBLOOD].UseAbility();
            }
            else if (
                hotkeys[BLOODFORBLOOD].PercentReady >= 100 && user.Level >= 38 && monster.Name.Contains("Twintania") &&
                monster.Health_Percent <= 55 && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            // && user.ContainsStatusEffect(125, 0, false) == false
            {
                //MemoryFunctions.ForceAction(BLOODFORBLOOD, 20, MemoryFunctions.ActionType.Ability);
                hotkeys[BLOODFORBLOOD].UseAbility();
            }
            else if (hotkeys[HAWKSEYE].PercentReady >= 100 && user.Level >= 26 && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(HAWKSEYE, 15, MemoryFunctions.ActionType.Ability);
                hotkeys[HAWKSEYE].UseAbility();
            }
            else if (hotkeys[BARRAGE].PercentReady >= 100 &&
                     user.Level >= 38 && monster.Name.Contains("Twintania") == false &&
                     monster.Name.Contains("Conflagration") == false && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(BARRAGE, 12, MemoryFunctions.ActionType.Ability);
                hotkeys[BARRAGE].UseAbility();
            }
            else if (hotkeys[BARRAGE].PercentReady >= 100 &&
                     user.Level >= 38 && monster.Name.Contains("Twintania") &&
                     monster.Health_Percent <= 55 && Global.DisableBuffs == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(BARRAGE, 12, MemoryFunctions.ActionType.Ability);
                hotkeys[BARRAGE].UseAbility();
            }

            else if (hotkeys[BLOODLETTER].PercentReady >= 99 && user.Level >= 12 && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(BLOODLETTER, 16, MemoryFunctions.ActionType.Ability);
                hotkeys[BLOODLETTER].UseAbility();
            }
            else if (monster.Health_Percent <= 20 &&
                     hotkeys[MISERYSEND].PercentReady >= 99 && user.Level >= 8 && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(MISERYSEND, 16, MemoryFunctions.ActionType.Ability);
                hotkeys[MISERYSEND].UseAbility();
            }
            else if (
                hotkeys[BLUNTARROW].PercentReady >= 99 && user.Level >= 42 && Global.StunBotOpen == false && hotkeys[HEAVYSHOT].PercentReady <= 78)
            {
                //MemoryFunctions.ForceAction(BLUNTARROW, 16, MemoryFunctions.ActionType.Ability);
                hotkeys[BLUNTARROW].UseAbility();
            }
        }