Пример #1
0
 public static IPAddress GetIP(this VRC.Player player)
 {
     try
     {
         P2PSessionState_t _p2pSessionState;
         if (SteamNetworking.GetP2PSessionState(new Steamworks2.CSteamID(player.GetSteamID()), out _p2pSessionState) && _p2pSessionState.m_nRemoteIP != 0u && GeneralUtils.IsNotPrivate(_p2pSessionState.m_nRemoteIP.ToIPAddress().ToString()) && _p2pSessionState.m_nRemoteIP.ToIPAddress() != null)
         {
             return(_p2pSessionState.m_nRemoteIP.ToIPAddress());
         }
         else
         {
             if (player.GetSteamID() > 10000000000000000)
             {
                 if (PEBFMFGNNNE.KBHJDGDAEGK(new Steamworks.CSteamID(player.GetSteamID()), out FGEAPNMLDBB epic))
                 {
                     return(epic.MACLMIEOBKD.ToIPAddress());
                 }
             }
             else
             {
                 ConsoleUtils.Info($"{player.GetAPIUser().displayName} is using a SteamID Spoofer. Their SteamID was {player.GetSteamID()}");
             }
             return(null);
         }
     }
     catch (Exception e)
     {
         if (PEBFMFGNNNE.KBHJDGDAEGK(new Steamworks.CSteamID(player.GetSteamID()), out FGEAPNMLDBB epic))
         {
             return(epic.MACLMIEOBKD.ToIPAddress());
         }
         ConsoleUtils.Error($"Couldn't get {player.GetAPIUser().displayName}'s IP. Details: " + e.ToString());
         return(null);
     }
 }
Пример #2
0
        public void NoClip()
        {
            VRC.Player       cplayer          = VRC.PlayerManager.GetCurrentPlayer();
            VRCPlayer        vrcPlayer        = cplayer.vrcPlayer;
            ApiAvatar        apiAvatar        = cplayer.GetApiAvatar();
            APIUser          apiuser          = cplayer.GetAPIUser();
            VRCAvatarManager vrcavatarManager = vrcPlayer.GetVRCAvatarManager();
            Collider         col;

            if (collisiont)
            {
                Console.WriteLine("collision off ");

                col = PlayerManager.GetCurrentPlayer().gameObject.GetComponent <Collider>();



                col.gameObject.SetActive(false);
            }
            else
            {
                Console.WriteLine("collision on ");

                col = PlayerManager.GetCurrentPlayer().gameObject.GetComponent <Collider>();



                col.gameObject.SetActive(true);
            }
        }
Пример #3
0
 public void TeleportTo()
 {
     Console.Clear();
     Console.WriteLine(string.Join(", ", (from p in PlayerManager.GetAllPlayers()
                                          select p.GetAPIUser().displayName).ToArray <string>()));
     VRC.Player player = PlayerUtils.FindPlayer(ConsoleUtils.AskInput("Teleport to: "));
     PlayerUtils.TeleportTo(player);
     Console.WriteLine("Teleporting to: {0}", player.GetAPIUser().displayName);
 }
Пример #4
0
 public void Rotateback()
 {
     rotation -= 5f;
     Console.Clear();
     //Console.WriteLine(string.Join(", ", (from p in PlayerManager.GetAllPlayers()
     //select p.GetAPIUser().displayName).ToArray<string>()));
     VRC.Player player = PlayerManager.GetCurrentPlayer();
     // PlayerUtils.Rotate(player, rx,ry,rz);
     Console.WriteLine("rotate to: {0}", player.GetAPIUser().displayName);
 }
Пример #5
0
 private static bool ReceiveVoteToKickInitiationPatch(string __0, VRC.Player __1)
 {
     if (PlayerManager.GetPlayer(__0) == PlayerManager.GetPlayer(APIUser.CurrentUser.id))
     {
         GeneralUtils.Debug($"You were attempted to be vote kicked by {__1.GetAPIUser().displayName}! Blocked VoteKick.");
         __0 = null;
         return(false);
     }
     else
     {
         return(false);
     }
 }
Пример #6
0
    public void OnGUI()
    {
        if (RoomManagerBase.currentRoom != null)
        {
            int i = 0;
            PlayerManager.GetAllPlayers().ToList().ForEach(p => GUI.Label(new Rect(1, i++ *15, 300, 20), string.Format("{0}", GetAPIUser(p).displayName)));

            if (pikgui == true)
            {
                float uix = Screen.width * 0.1f;
                float uiy = Screen.height * 0.1f;
                GUI.Box(new Rect(uix, uiy, Screen.width * 0.8f, Screen.height * 0.8f), "Pik hack");

                if (GUI.Button(new Rect(uix, uiy, 100, 30), "Fly"))
                {
                    if (flying == true)
                    {
                        flying          = false;
                        Physics.gravity = this.originalGravity;
                    }
                    else
                    {
                        flying = true;
                        this.originalGravity = Physics.gravity;
                        Physics.gravity      = Vector3.zero;
                    }
                    Console.WriteLine("[PikMod  ] Flying: " + flying);
                }
                if (GUI.Button(new Rect(uix, uiy + 100, 200, 30), "Toggle Custom Gravity"))
                {
                    gravityt = !gravityt;
                    if (gravityt == false)
                    {
                        this.originalGravity = Physics.gravity;
                        Physics.gravity      = new Vector3(0, hSliderValue, 0);
                    }
                    else
                    {
                        Physics.gravity = this.originalGravity;
                    }
                }

                hSliderValue = GUI.HorizontalSlider(new Rect(uix, uiy + 50, 300, 100), hSliderValue, -10F, 10.0F);


                xrSliderValue = GUI.HorizontalSlider(new Rect(uix, uiy + 350, 300, 100), xrSliderValue, 0F, 360F);
                yrSliderValue = GUI.HorizontalSlider(new Rect(uix, uiy + 400, 300, 100), yrSliderValue, 0F, 360F);
                zrSliderValue = GUI.HorizontalSlider(new Rect(uix, uiy + 450, 300, 100), zrSliderValue, 0F, 360F);

                PlayerUtils.Rotate(player, xrSliderValue, yrSliderValue, zrSliderValue);


                GUI.Label(new Rect(uix, uiy + 150, 200, 50), "Current Gravity: " + Physics.gravity.y.ToString());



                if (GUI.Button(new Rect(uix, uiy + 250, 100, 30), "Teleport"))
                {
                    VRC.Player player = PlayerUtils.FindPlayer(Target);
                    PlayerUtils.TeleportTo(player);
                    Console.WriteLine("Teleporting to: {0}", player.GetAPIUser().displayName);
                }
                // int l = 0;


                // int m = 0;
                if (GUI.Button(new Rect(uix, uiy + 300, 200, 30), "Jump"))
                {
                    if (VRCPlayer.Instance.gameObject.GetComponent <PlayerModComponentJump>())
                    {
                        Console.WriteLine("World already has jump enabled.");
                        return;
                    }
                    else
                    {
                        VRCPlayer.Instance.gameObject.AddComponent <PlayerModComponentJump>();
                        Console.WriteLine("Enabled jumping in current world.");
                    }
                }
            }
            GUI.Label(new Rect(0f, (float)Screen.height - 100f, 1000f, 1000f), string.Concat(new object[]
            {
                "<b><color=#08ff00>Current Position:</color> <color=#ff0000>X:",
                Math.Round(PlayerManager.GetCurrentPlayer().gameObject.transform.position.x),
                "/Y:",
                Math.Round(PlayerManager.GetCurrentPlayer().gameObject.transform.position.y),
                "/Z:",
                Math.Round(PlayerManager.GetCurrentPlayer().gameObject.transform.position.z) + "</color></b>"
            }));
        }
    }
Пример #7
0
 public static void DeleteAllPortalsFromPlayer(VRC.Player who)
 {
     Enumerable.Where <GameObject>(Resources.FindObjectsOfTypeAll <GameObject>(), (GameObject obj) => obj.name.Contains("Dynamic Clone")).ToList <GameObject>().ForEach(delegate(GameObject g)
     {
         if (g.GetComponentInParent <VRCPlayer>().ToVRC_Player().GetAPIUser().id == who.GetAPIUser().id)
         {
             UnityEngine.Object.Destroy(g);
         }
     });
 }