Exemplo n.º 1
0
 public void Dispose()
 {
     AbilityPanel.OnDeactivate();
     SmartSphere.OnDeactivate();
     ComboPanel.OnDeactivate();
     AutoSunStrike.OnDeactivate();
     ExortForFarmMode.OnDeactivate();
     Factory?.Dispose();
 }
        private void CreateUI()
        {
            // Pause button
            this.b_pause = new Button()
            {
                IsBorder               = false,
                Text                   = string.Empty,
                BackgroundImage        = WaveContent.Assets.Textures.pause_bt_PNG,
                PressedBackgroundImage = WaveContent.Assets.Textures.pause_bt_pressed_PNG,
                HorizontalAlignment    = HorizontalAlignment.Right,
                VerticalAlignment      = VerticalAlignment.Top,
                Margin                 = new Thickness(0, WaveServices.ViewportManager.TopEdge + 10, 10, 0),
            };
            this.b_pause.Click += (s, o) =>
            {
                SoundsManager.Instance.PlaySound(SoundsManager.SOUNDS.Button);
                WaveServices.ScreenContextManager.Push(new ScreenContext(new PauseScene(this)));
            };
            EntityManager.Add(this.b_pause);

            // Ready! Go! Timeout!
            this.messagePanel = new MessagePanel(MessagePanel.MessageType.HurryUp)
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center,
            };
            EntityManager.Add(this.messagePanel);

            // Stadistics
            this.stadisticsPanel = new StadisticsPanel()
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                Margin = new Thickness(0, WaveServices.ViewportManager.TopEdge, 0, 0),
            };
            EntityManager.Add(this.stadisticsPanel);

            // HighScore
            this.highScorePanel = new HighScorePanel()
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                Margin = new Thickness(0, 100, 0, 0),
            };
            EntityManager.Add(this.highScorePanel);

            // Combo
            this.comboPanel = new ComboPanel(new Vector2(WaveServices.ViewportManager.VirtualWidth / 2, WaveServices.ViewportManager.TopEdge + 150));
            EntityManager.Add(this.comboPanel);

            // Scoreboard
            this.scoreboardPanel = new ScoreboardPanel(this.comboPanel)
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Top,
                Margin = new Thickness(0, WaveServices.ViewportManager.TopEdge, 0, 0),
            };
            EntityManager.Add(this.scoreboardPanel);
        }
Exemplo n.º 3
0
        public Config(Invoker invoker)
        {
            Invoker                  = invoker;
            Factory                  = MenuFactory.Create("Invoker Crappahilation");
            ComboKey                 = Factory.Item("Combo Key", new KeyBind('G'));
            MinDisInOrbwalk          = Factory.Item("Min distance in orbwalk", new Slider(1, 1, 600));
            DrawMinDistanceInOrbwalk = Factory.Item("Draw this range", true);
            InvokeTime               = Factory.Item("Time between spheres in combo", new Slider(1, 1, 200));
            AfterInvokeDelay         = Factory.Item("Delay after Invoke", new Slider(1, 1, 500));
            SsExtraDelay             = Factory.Item("Sun Strike Extra Delay", new Slider(15, 0, 25));
            SsExtraDelay.Item.SetTooltip("dec this value if you cant hit target by ss");
            //Ensage.SDK.Orbwalker.Modes.Farm
            SmartInvoke = Factory.Item("Smart invoke", false);
            SmartInvoke.Item.SetTooltip("will check for spheres before invoke");

            ExpInvoke = Factory.Item("Experemental invoke", true);
            ExpInvoke.Item.SetTooltip("Enable this if your hero cant use invoke properly and disable [SmartInvoke]");

            ExtraDelayAfterSpells = Factory.Item("Extra delay after each ability in combo", true);
            ExtraDelayAfterSpells.Item.SetTooltip("Enable this if your hero sometimes not use abilities");

            AutoIceWall = Factory.Item("Dummy IceWall", true);
            AutoIceWall.Item.SetTooltip("Hero will run to the enemy");

            SmartMove = Factory.Item("Move to target if ability out of range", true);
            Cataclysm = Factory.Item("Use SS'cataclysm (talant) in combo", false);

            AbilityPanel     = new AbilityPanel(this);
            ComboPanel       = new ComboPanel(this);
            SmartSphere      = new SmartSphere(this);
            AutoSunStrike    = new AutoSunStrike(this);
            AutoGhostWalk    = new AutoGhostWalk(this);
            Prepare          = new Prepare(this);
            ExortForFarmMode = new ExortForFarmMode(this);
            CustomCombos     = new CustomCombos(this);

            var panel = Factory.Menu("Abilities");
            var dict  = invoker.AbilityInfos.Select(x => x.Ability.Name).ToDictionary(result => result, result => true);

            AbilitiesInCombo = panel.Item("Abilities in combo", new AbilityToggler(dict));
            var dict2 = new Dictionary <string, bool>
            {
                { AbilityId.item_blink.ToString(), true },
                { AbilityId.item_sheepstick.ToString(), true },
                { AbilityId.item_shivas_guard.ToString(), true },
                { AbilityId.item_orchid.ToString(), true },
                { AbilityId.item_bloodthorn.ToString(), true },
            };

            ItemsInCombo = panel.Item("Items in combo", new AbilityToggler(dict2));

            //Factory.Target.TextureName = "npc_dota_hero_invoker";
            //Factory.Target.ShowTextWithTexture = true;
        }
Exemplo n.º 4
0
        public Config(Invoker invoker)
        {
            Invoker          = invoker;
            Factory          = MenuFactory.Create("Invoker Crappahilation");
            ComboKey         = Factory.Item("Combo Key", new KeyBind('G'));
            InvokeTime       = Factory.Item("Time between spheres in combo", new Slider(1, 1, 200));
            AfterInvokeDelay = Factory.Item("Delay after Invoke", new Slider(1, 1, 500));
            SsExtraDelay     = Factory.Item("Sun Strike Extra Delay", new Slider(15, 0, 25));
            SsExtraDelay.Item.SetTooltip("dec this value if you cant hit target by ss");
            //Ensage.SDK.Orbwalker.Modes.Farm
            SmartInvoke = Factory.Item("Smart invoke", true);
            SmartInvoke.Item.SetTooltip("will check for spheres before invoke");

            AutoIceWall = Factory.Item("Dummy IceWall", true);
            AutoIceWall.Item.SetTooltip("Hero will run to the enemy");

            AbilityPanel     = new AbilityPanel(this);
            ComboPanel       = new ComboPanel(this);
            SmartSphere      = new SmartSphere(this);
            AutoSunStrike    = new AutoSunStrike(this);
            AutoGhostWalk    = new AutoGhostWalk(this);
            Prepare          = new Prepare(this);
            ExortForFarmMode = new ExortForFarmMode(this);

            var panel = Factory.Menu("Abilities");
            var dict  = invoker.AbilityInfos.Select(x => x.Ability.Name).ToDictionary(result => result, result => true);

            AbilitiesInCombo = panel.Item("Abilities in combo", new AbilityToggler(dict));
            var dict2 = new Dictionary <string, bool>
            {
                { AbilityId.item_blink.ToString(), true },
                { AbilityId.item_sheepstick.ToString(), true },
                { AbilityId.item_shivas_guard.ToString(), true },
                { AbilityId.item_orchid.ToString(), true },
                { AbilityId.item_bloodthorn.ToString(), true },
            };

            ItemsInCombo = panel.Item("Items in combo", new AbilityToggler(dict2));

            //Factory.Target.TextureName = "npc_dota_hero_invoker";
            //Factory.Target.ShowTextWithTexture = true;
        }
Exemplo n.º 5
0
 public Config(InvokerCrappahilationPaid main)
 {
     Main              = main;
     Factory           = MenuFactory.Create("Invoker");
     ComboKey          = Factory.Item("Combo key", new KeyBind('0'));
     RefresherBehavior = Factory.Item("Refresher Behavior",
                                      new StringList("After Meteor+Blast", "When 95% of abilities are on cd", "In both cases"));
     PrepareKey         = Factory.Item("Prepare key", new KeyBind('0'));
     UseForges          = Factory.Item("Use forges in Combo", true);
     UseNecros          = Factory.Item("Use necros (and archer's purge) in Combo", true);
     AutoPurge          = Factory.Item("Use necros's purge not in Combo", false);
     UseEul             = Factory.Item("Use eul in Dynamic Combo", true);
     UseIceWall         = Factory.Item("Use IceWall in Dynamic Combo", true);
     BackToDynamicCombo = Factory.Item("Back to dynamic combo after custom combo", true);
     UseCataclysm       = Factory.Item("Min targets in eul/tornado for cataclysm", new Slider(1, 0, 5));
     //ComboType = new ComboType(this);
     AbilityPanel  = new AbilityPanel(this);
     AutoSunStrike = new AutoSunStrike(this);
     SmartSphere   = new SmartSphere(this);
     AutoGhostWalk = new AutoGhostWalk(this);
     FastInvoke    = new InvokeHelper(this);
     ComboPanel    = new ComboPanel(this);
     Prepare       = new Prepare(Main);
 }
Exemplo n.º 6
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (!Main.gameMenu && (Main.LocalPlayer.controlInv || TBAInputs.OpenCollection.JustPressed))
            {
                Visible = false;
            }

            if (TBAInputs.StandPose.GetAssignedKeys().Count <= 0 ||
                TBAInputs.ContextAction.GetAssignedKeys().Count <= 0 ||
                TBAInputs.ExtraAction01.GetAssignedKeys().Count <= 0 ||
                TBAInputs.ExtraAction02.GetAssignedKeys().Count <= 0)
            {
                Main.NewText("Whoops! It looks like you forgot to setup your hotkeys! Go to Settings -> Controls and scroll down. Bind all hotkeys from this mod & try again");
                Visible = false;
                return;
            }

            if (NeedsToUpdateAutopsyReport && CurrentStand != null)
            {
                NeedsToUpdateAutopsyReport = false;

                StandComboGrid.Clear();

                CurrentCombos.Clear();
                CurrentStand.AddCombos(CurrentCombos);

                foreach (StandCombo combo in CurrentCombos)
                {
                    if (combo.Inputs.Count <= 0)
                    {
                        continue;
                    }

                    List <UIElement> inputElements = new List <UIElement>();

                    foreach (string s in combo.Inputs)
                    {
                        if (s == MouseClick.LeftClick.ToString())
                        {
                            inputElements.Add(new UIMouseClick((int)MouseClick.LeftClick, 10));
                        }

                        if (s == MouseClick.RightClick.ToString())
                        {
                            inputElements.Add(new UIMouseClick((int)MouseClick.RightClick, 10));
                        }

                        if (s == MouseClick.MiddleClick.ToString())
                        {
                            inputElements.Add(new UIMouseClick((int)MouseClick.MiddleClick, 10));
                        }

                        if (s == MouseClick.LeftHold.ToString())
                        {
                            inputElements.Add(new UIMouseClick((int)MouseClick.LeftClick, 120));
                        }

                        if (s == MouseClick.RightHold.ToString())
                        {
                            inputElements.Add(new UIMouseClick((int)MouseClick.RightClick, 120));
                        }

                        if (s.Length == 1)
                        {
                            inputElements.Add(new UIButtonPress(s));
                        }
                    }

                    ComboPanel comboPanel = new ComboPanel(combo.ComboName, inputElements);

                    StandComboGrid.Add(comboPanel);
                }
            }

            RecalculateChildren();
            Recalculate();
        }