Exemplo n.º 1
0
        public UtilsVRMenu(QMNestedButton parent, EthosVRButton config) : base(parent, config.X, config.Y, config.Name, config.Tooltip, GeneralUtils.GetColor(config.ColorScheme.Colors[0]), GeneralUtils.GetColor(config.ColorScheme.Colors[1]), GeneralUtils.GetColor(config.ColorScheme.Colors[2]), GeneralUtils.GetColor(config.ColorScheme.Colors[3]))
        {
            new QMToggleButton(this, 1, 0, "Enable\nESP", delegate
            {
                GeneralUtils.ESP   = true;
                GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                for (int i = 0; i < array.Length; i++)
                {
                    if (array[i].transform.Find("SelectRegion"))
                    {
                        array[i].transform.Find("SelectRegion").GetComponent <Renderer>().material.color       = Color.green;
                        array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.color = Color.red;
                        GeneralWrappers.GetHighlightsFX().EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GeneralUtils.ESP);
                    }
                }

                foreach (VRCSDK2.VRC_Interactable vrc_Interactable in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Interactable>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Interactable.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }

                foreach (VRCSDK2.VRC_Pickup vrc_Pickup in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Pickup>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Pickup.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }

                foreach (PortalInternal portalInternal in Resources.FindObjectsOfTypeAll <PortalInternal>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(portalInternal.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }
            }, "Disable\nESP", delegate
            {
                GeneralUtils.ESP   = false;
                GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                for (int i = 0; i < array.Length; i++)
                {
                    if (array[i].transform.Find("SelectRegion"))
                    {
                        array[i].transform.Find("SelectRegion").GetComponent <Renderer>().material.color       = Color.green;
                        array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.color = Color.red;
                        GeneralWrappers.GetHighlightsFX().EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GeneralUtils.ESP);
                    }
                }

                foreach (VRCSDK2.VRC_Interactable vrc_Interactable in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Interactable>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Interactable.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }

                foreach (VRCSDK2.VRC_Pickup vrc_Pickup in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Pickup>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Pickup.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }

                foreach (PortalInternal portalInternal in Resources.FindObjectsOfTypeAll <PortalInternal>())
                {
                    GeneralWrappers.GetHighlightsFX().EnableOutline(portalInternal.GetComponentInChildren <Renderer>(), GeneralUtils.ESP);
                }
            }, "Decide whether you want the upper game, get an advantage, and see all players anywhere within the world.", Color.red, Color.white).setToggleState(GeneralUtils.ESP);

            new QMSingleButton(this, 2, 0, "Avatar\nBy\nID", delegate
            {
                ConsoleUtil.Info("Enter Avatar ID: ");
                string ID = Console.ReadLine();
                VRC.Core.API.SendRequest($"avatars/{ID}", VRC.Core.BestHTTP.HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, true, 3600f, 2, null);
                new PageAvatar
                {
                    avatar = new SimpleAvatarPedestal
                    {
                        field_Internal_ApiAvatar_0 = new ApiAvatar
                        {
                            id = ID
                        }
                    }
                }.ChangeToSelectedAvatar();
                GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully cloned that avatar by It's Avatar ID.</color>");
            }, "Sets your current avatar using an avatar ID.", Color.red, Color.white);

            new QMSingleButton(this, 3, 0, "Join\nBy\nID", delegate
            {
                ConsoleUtil.Info("Enter Instance ID: ");
                string ID = Console.ReadLine();
                Networking.GoToRoom(ID);
            }, "Joins an instance by It's ID.", Color.red, Color.white);

            new QMSingleButton(this, 4, 0, "Copy\nRoom\nID", delegate
            {
                Clipboard.SetText($"{RoomManagerBase.field_Internal_Static_ApiWorld_0.id}:{RoomManagerBase.field_Internal_Static_ApiWorld_0.instanceId}");
            }, "Copies the current instance's ID.", Color.red, Color.white);

            new QMToggleButton(this, 1, 1, "Can't Hear\non Non Friends", delegate
            {
                GeneralUtils.CantHearOnNonFriends = true;
                foreach (var player in GeneralWrappers.GetPlayerManager().GetAllPlayers())
                {
                    if (!APIUser.IsFriendsWith(player.GetAPIUser().id))
                    {
                        player.GetVRCPlayer().field_Internal_Boolean_3 = false;
                    }
                }
            }, "Can Hear\non Non Friends", delegate
            {
                GeneralUtils.CantHearOnNonFriends = false;
                foreach (var player in GeneralWrappers.GetPlayerManager().GetAllPlayers())
                {
                    if (!APIUser.IsFriendsWith(player.GetAPIUser().id))
                    {
                        player.GetVRCPlayer().field_Internal_Boolean_3 = true;
                    }
                }
            }, "Decide whether you want your friends to only hear you in game or not.", Color.red, Color.white).setToggleState(GeneralUtils.CantHearOnNonFriends);

            //new QMToggleButton(this, 2, 1, "Invisible\nOn", delegate
            //{
            //    GeneralUtils.Invisible = true;
            //}, "Invisible\nOff", delegate
            //{
            //    GeneralUtils.Invisible = false;
            //}, "Decide whether you want people to see you in game.", Color.red, Color.white).setToggleState(GeneralUtils.Invisible);
        }
Exemplo n.º 2
0
        public FunVRMenu(QMNestedButton parent, EthosVRButton config) : base(parent, config.X, config.Y, config.Name, config.Tooltip, GeneralUtils.GetColor(config.ColorScheme.Colors[0]), GeneralUtils.GetColor(config.ColorScheme.Colors[1]), GeneralUtils.GetColor(config.ColorScheme.Colors[2]), GeneralUtils.GetColor(config.ColorScheme.Colors[3]))
        {
            new QMToggleButton(this, 1, 0, "Enable\nWorld Triggers", delegate
            {
                GeneralUtils.WorldTriggers = true;
            }, "Disable\nWorld Triggers", delegate
            {
                GeneralUtils.WorldTriggers = false;
            }, "Decide whether you want other people to see your interactions with \"local\" triggers.", Color.red, Color.white).setToggleState(GeneralUtils.WorldTriggers);

            new QMToggleButton(this, 2, 0, "Enable\nForce Clone", delegate
            {
                GeneralUtils.ForceClone = true;
            }, "Disable\nForce Clone", delegate
            {
                GeneralUtils.ForceClone = false;
            }, "(EXPERIMENTAL) Enable/Disable Force Clone, when this is enabled, any avatar can be cloned apart from private ones.", Color.red, Color.white).setToggleState(GeneralUtils.ForceClone);

            new QMSingleButton(this, 3, 0, "Interact with\nAll Triggers", delegate
            {
                foreach (VRC_Trigger trigger in Resources.FindObjectsOfTypeAll <VRC_Trigger>())
                {
                    if (!trigger.name.Contains("Avatar") && !trigger.name.Contains("Chair"))
                    {
                        trigger.Interact();
                    }
                }
            }, "Interact with all triggers in the world.", Color.red, Color.white);

            new QMSingleButton(this, 4, 0, "Interact with\nAll Mirrors", delegate
            {
                foreach (VRC_Trigger trigger in Resources.FindObjectsOfTypeAll <VRC_Trigger>())
                {
                    if (trigger.name.Contains("Mirror"))
                    {
                        trigger.Interact();
                    }
                }
            }, "Interact with all mirrors in the world.", Color.red, Color.white);

            new SelfControlVRMenu(this);

            new QMSingleButton(this, 1, 2, "Play\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Play", new Il2CppSystem.Object[0]);
                }
            }, "Plays the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 0, 0, "Pause\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Pause", new Il2CppSystem.Object[0]);
                }
            }, "Stops the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 2, 1, "Stop\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Stop", new Il2CppSystem.Object[0]);
                }
            }, "Pauses the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 2, 2, "Next\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Next", new Il2CppSystem.Object[0]);
                }
            }, "Skips the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 0, 1, "Previous\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Previous", new Il2CppSystem.Object[0]);
                }
            }, "Rewinds the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 3, 1, "Clear\nVideos on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "Clear", new Il2CppSystem.Object[0]);
                }
            }, "Clears the video in queue on the video player", Color.red, Color.white);

            new QMSingleButton(this, 3, 2, "Speed up\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "SpeedUp", new Il2CppSystem.Object[0]);
                }
            }, "Speeds up the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 4, 2, "Slow down\nVideo on Player", delegate
            {
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "SpeedDown", new Il2CppSystem.Object[0]);
                }
            }, "Slows down the current video on the video player", Color.red, Color.white);

            new QMSingleButton(this, 4, 1, "Add\nVideo to Player", delegate
            {
                ConsoleUtil.Info("Enter URL: ");
                string url       = Console.ReadLine();
                var videoPlayers = Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_SyncVideoPlayer>();

                if (videoPlayers.Count() > 0)
                {
                    Networking.RPC(RPC.Destination.Owner, videoPlayers[0].gameObject, "AddURL", new Il2CppSystem.Object[]
                    {
                        (Il2CppSystem.String)url
                    });
                }
            }, "Adds a video to the queue on the video player", Color.red, Color.white);
        }