Beispiel #1
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("SkinHack", "SkinHack", true);

            var settings = Config.AddSubMenu(new Menu("Settings", "Settings"));
            settings.AddItem(new MenuItem("Champions", "Reskin Champions").SetValue(true));
            //settings.AddItem(new MenuItem("Pets", "Reskin Pets").SetValue(true));
            settings.AddItem(new MenuItem("Minions", "Pool Party Minions").SetValue(false));

            foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
            {
                var champMenu = new Menu(hero.ChampionName, hero.ChampionName);
                var modelUnit = new ModelUnit(hero);

                PlayerList.Add(modelUnit);

                if (hero.IsMe)
                {
                    Player = modelUnit;
                }

                foreach (Dictionary<string, object> skin in ModelManager.GetSkins(hero.ChampionName))
                {
                    Console.WriteLine(skin["name"].ToString());
                    var skinName = skin["name"].ToString().Equals("default")
                        ? hero.ChampionName
                        : skin["name"].ToString();
                    var skinId = (int) skin["num"];

                    var changeSkin = champMenu.AddItem(new MenuItem(skinName, skinName).SetValue(false));

                    if (hero.BaseSkinId.Equals(skinId) || changeSkin.IsActive())
                    {
                        changeSkin.SetValue(true);
                        modelUnit.SetModel(hero.CharData.BaseSkinName, skinId);
                    }

                    var hero1 = hero;
                    changeSkin.ValueChanged += (s, e) =>
                    {
                        if (e.GetNewValue<bool>())
                        {
                            champMenu.Items.ForEach(
                                p =>
                                {
                                    if (p.GetValue<bool>() && p.Name != skinName)
                                    {
                                        p.SetValue(false);
                                    }
                                });
                            modelUnit.SetModel(hero1.ChampionName, skinId);
                        }
                    };
                }
                Config.AddSubMenu(champMenu);
            }
            Config.AddToMainMenu();

            Game.OnInput += Game_OnInput;
        }
Beispiel #2
0
        private static void Game_OnInput(GameInputEventArgs args)
        {
            if (!args.Input.StartsWith("/"))
            {
                return;
            }

            if (args.Input.StartsWith("/model"))
            {
                args.Process = false;
                var model = args.Input.Replace("/model ", string.Empty).GetValidModel();

                if (!model.IsValidModel())
                {
                    return;
                }

                Player.SetModel(model);
                return;
            }

            if (args.Input.StartsWith("/skin"))
            {
                args.Process = false;
                try
                {
                    var skin = Convert.ToInt32(args.Input.Replace("/skin ", string.Empty));
                    Player.SetModel(Player.Unit.CharData.BaseSkinName, skin);
                }
                catch {}
            }
        }
Beispiel #3
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("SkinHack", "SkinHack", true);

            foreach (var hero in ObjectManager.Get <Obj_AI_Hero>())
            {
                var champMenu = new Menu(hero.ChampionName, hero.ChampionName);
                var modelUnit = new ModelUnit(hero);

                PlayerList.Add(modelUnit);

                if (hero.IsMe)
                {
                    Player = modelUnit;
                }

                foreach (Dictionary <string, object> skin in ModelManager.GetSkins(hero.ChampionName))
                {
                    var skinName = skin["name"].ToString().Equals("default")
                        ? hero.ChampionName
                        : skin["name"].ToString();
                    var changeSkin = champMenu.AddItem(new MenuItem(skinName, skinName).SetValue(false));

                    if (changeSkin.IsActive())
                    {
                        modelUnit.SetModel(hero.BaseSkinName, (int)skin["num"]);
                    }

                    changeSkin.ValueChanged += (s, e) =>
                    {
                        if (e.GetNewValue <bool>())
                        {
                            champMenu.Items.ForEach(
                                p =>
                            {
                                if (p.GetValue <bool>() && p.Name != skinName)
                                {
                                    p.SetValue(false);
                                }
                            });
                            modelUnit.SetModel(hero.ChampionName, (int)skin["num"]);
                        }
                    };
                }
                Config.AddSubMenu(champMenu);
            }
            Config.AddToMainMenu();

            Game.OnInput += Game_OnInput;
        }
Beispiel #4
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            var skins = Enumerable.Range(0, 44).Select(n => n.ToString()).ToArray();


            Config = new Menu("SkinHack", "SkinHack", true);


            var champs = Config.AddSubMenu(new Menu("Champions", "Champions"));

            champs.AddItem(new MenuItem("Champions", "Reskin Champions").SetValue(true));

            foreach (var hero in HeroManager.AllHeroes.Where(h => !h.ChampionName.Equals("Ezreal")))
            {
                var champMenu = new Menu(hero.ChampionName, hero.ChampionName + hero.Team);
                var modelUnit = new ModelUnit(hero);

                PlayerList.Add(modelUnit);

                if (hero.IsMe)
                {
                    Player = modelUnit;
                }

                foreach (Dictionary <string, object> skin in ModelManager.GetSkins(hero.ChampionName))
                {
                    //Console.WriteLine(skin["name"].ToString());
                    var skinName = skin["name"].ToString().Equals("default")
                        ? hero.ChampionName
                        : skin["name"].ToString();
                    var skinId = (int)skin["num"];

                    var changeSkin = champMenu.AddItem(new MenuItem(skinName, skinName).SetValue(false));

                    if (hero.BaseSkinId.Equals(skinId) || changeSkin.IsActive())
                    {
                        changeSkin.SetValue(true);
                        modelUnit.SetModel(hero.CharData.BaseSkinName, skinId);
                    }

                    var hero1 = hero;
                    changeSkin.ValueChanged += (s, e) =>
                    {
                        if (e.GetNewValue <bool>())
                        {
                            champMenu.Items.ForEach(
                                p =>
                            {
                                if (p.IsActive() && p.Name != skinName)
                                {
                                    p.SetValue(false);
                                }
                            });
                            modelUnit.SetModel(hero1.ChampionName, skinId);
                        }
                    };
                }
                champs.AddSubMenu(champMenu);
            }
            Config.AddToMainMenu();

            var wardMenu = Config.AddSubMenu(new Menu("Wards", "Wards"));

            wardMenu.AddItem(new MenuItem("Ward", "Reskin Wards").SetValue(true));
            wardMenu.AddItem(new MenuItem("WardOwn", "Reskin Only Own Wards").SetValue(true));
            wardMenu.AddItem(new MenuItem("WardIndex", "Ward Index").SetValue(new StringList(skins, 34))).ValueChanged
                += Program_ValueChanged;

            var minions = Config.AddSubMenu(new Menu("Minions", "Minions"));

            //settings.AddItem(new MenuItem("Pets", "Reskin Pets").SetValue(true));
            minions.AddItem(new MenuItem("Minions", "Pool Party Minions").SetValue(false));

            Game.OnInput += Game_OnInput;
        }
Beispiel #5
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            var skins = Enumerable.Range(0, 53).Select(n => n.ToString()).ToArray();


            Config = new Menu("SkinHack", "SkinHack", true);


            var champs = Config.AddSubMenu(new Menu("Champions", "Champions"));
            champs.AddItem(new MenuItem("Champions", "Reskin Champions").SetValue(true));
            var allies = champs.AddSubMenu(new Menu("Allies", "Allies"));
            var enemies = champs.AddSubMenu(new Menu("Enemies", "Enemies"));

            foreach (var hero in HeroManager.AllHeroes.Where(h => !h.ChampionName.Equals("Ezreal")))
            {
                var champMenu = new Menu(hero.ChampionName, hero.ChampionName + hero.Team);
                var modelUnit = new ModelUnit(hero);

                PlayerList.Add(modelUnit);

                if (hero.IsMe)
                {
                    Player = modelUnit;
                }

                foreach (Dictionary<string, object> skin in ModelManager.GetSkins(hero.ChampionName))
                {
                    //Console.WriteLine(skin["name"].ToString());
                    var skinName = skin["name"].ToString().Equals("default")
                        ? hero.ChampionName
                        : skin["name"].ToString();
                    var skinId = (int) skin["num"];

                    var changeSkin = champMenu.AddItem(new MenuItem(skinName, skinName).SetValue(false));

                    if (hero.BaseSkinId.Equals(skinId) || changeSkin.IsActive())
                    {
                        changeSkin.SetValue(true);
                        modelUnit.SetModel(hero.CharData.BaseSkinName, skinId);
                    }

                    var hero1 = hero;
                    changeSkin.ValueChanged += (s, e) =>
                    {
                        if (e.GetNewValue<bool>())
                        {
                            champMenu.Items.ForEach(
                                p =>
                                {
                                    if (p.IsActive() && p.Name != skinName)
                                    {
                                        p.SetValue(false);
                                    }
                                });
                            modelUnit.SetModel(hero1.ChampionName, skinId);
                        }
                    };
                }
                var rootMenu = hero.IsAlly ? allies : enemies;
                rootMenu.AddSubMenu(champMenu);
            }
            Config.AddToMainMenu();

            var wardMenu = Config.AddSubMenu(new Menu("Wards", "Wards"));
            wardMenu.AddItem(new MenuItem("Ward", "Reskin Wards").SetValue(true));
            wardMenu.AddItem(new MenuItem("WardOwn", "Reskin Only Own Wards").SetValue(true));
            wardMenu.AddItem(new MenuItem("WardIndex", "Ward Index").SetValue(new StringList(skins, 34))).ValueChanged
                += Program_ValueChanged;

            var minions = Config.AddSubMenu(new Menu("Minions", "Minions"));
            //settings.AddItem(new MenuItem("Pets", "Reskin Pets").SetValue(true));
            minions.AddItem(new MenuItem("Minions", "Reskin Minions").SetValue(false));
            var mSkin =
                minions.AddItem(
                    new MenuItem("MinionType", "Minion Skin").SetValue(
                        new StringList(ModelManager.MinionSkins.Keys.ToArray())));
            minions.Item("Minions").ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
                {
                    ModelManager.ChangeMinionModels(
                        mSkin.GetValue<StringList>().SelectedValue, !eventArgs.GetNewValue<bool>());
                };
            mSkin.ValueChanged +=
                (sender, eventArgs) =>
                {
                    ModelManager.ChangeMinionModels(eventArgs.GetNewValue<StringList>().SelectedValue);
                };

            Game.OnInput += Game_OnInput;
        }