private static void Game_OnUpdate(EventArgs args) { #region Init if (Bkb == null || !Bkb.IsValid) { Bkb = MyHero.FindItem("item_black_king_bar"); } if (Dagger == null || !Dagger.IsValid) { Dagger = MyHero.FindItem("item_blink"); } if (Spell1 == null || !Spell1.IsValid) { Spell1 = MyHero.Spellbook.Spell1; } if (Spell2 == null || !Spell2.IsValid) { Spell2 = MyHero.Spellbook.Spell2; } if (Spell4 == null || !Spell4.IsValid) { Spell4 = MyHero.Spellbook.Spell4; } #endregion #region Lets combo if (!Menu.Item("combokey").GetValue <KeyBind>().Active) { _globalTarget = null; return; } if (_globalTarget == null || !_globalTarget.IsValid) { _globalTarget = ClosestToMouse(MyHero); } if (_globalTarget == null || !_globalTarget.IsValid || !_globalTarget.IsAlive || !MyHero.CanCast()) { return; } ComboInAction(_globalTarget); #endregion }