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 } } } }
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()); } }