Example #1
0
 // Token: 0x0600000B RID: 11 RVA: 0x000024E0 File Offset: 0x000006E0
 public static void CopyAvatar2(ApiAvatar avatar)
 {
     Console.WriteLine("copy part 2");
     avatar.authorId      = APIUser.CurrentUser.id;
     avatar.authorName    = APIUser.CurrentUser.displayName;
     avatar.releaseStatus = "public";
     avatar.id            = AvatarUtils.GenerateAvatarId();
     AvatarUtils.SetCurrentAvatar(avatar);
 }
Example #2
0
 public void DeleteCurrentAvatar()
 {
     if (AvatarUtils.DeleteAvatar(PlayerManager.GetCurrentPlayer().GetApiAvatar()))
     {
         Console.WriteLine("Current avatar deleted.");
         return;
     }
     Console.WriteLine("No avatars found to delete.");
 }
Example #3
0
        public void SaveAvatarId()
        {
            ApiAvatar apiAvatar = new ApiAvatar();

            apiAvatar.id = ConsoleUtils.AskInput("Enter avatar ID: ");
            apiAvatar.Fetch(delegate(ApiContainer success)
            {
                AvatarUtils.SaveAvatar(success.Model as ApiAvatar, ConsoleUtils.AskInput("Enter avatar's name: "), "");
            }, delegate(ApiContainer error)
            {
                Console.WriteLine("Error saving avatar: {0}", error.Error);
            }, null, false);
        }
Example #4
0
        // Token: 0x06000010 RID: 16 RVA: 0x00002664 File Offset: 0x00000864
        public static ApiAvatar SaveAvatar(ApiAvatar avatar, string name, string imageUrl = "")
        {
            ApiAvatar apiAvatar = new ApiAvatar();

            apiAvatar.Init(AvatarUtils.GenerateAvatarId(), APIUser.CurrentUser, name, avatar.imageUrl, avatar.assetUrl, avatar.description, "public", avatar.tags, avatar.unityPackageUrl);
            File.AppendAllText("VRChat_Data\\Managed\\VRLoader\\Modules\\Avatars.txt", string.Format("{0}|{1}|{2}{3}", new object[]
            {
                name,
                avatar.id,
                avatar.assetUrl,
                Environment.NewLine
            }));
            AvatarUtils.SavedAvatars.Add(apiAvatar);
            Console.WriteLine("Avatar saved!");
            return(avatar);
        }
Example #5
0
        // Token: 0x0600000A RID: 10 RVA: 0x000024AC File Offset: 0x000006AC
        public static void CopyAvatar1(VRCPlayer vrcPlayer)
        {
            Console.WriteLine(vrcPlayer.GetApiAvatar() + "gay");
            Console.WriteLine(vrcPlayer.GetApiAvatar().assetUrl);
            Console.WriteLine(vrcPlayer.GetApiAvatar().id);
            Console.WriteLine(vrcPlayer.GetApiAvatar().ToString());
            ApiAvatar avatar = vrcPlayer.GetApiAvatar();

            Console.WriteLine("copy part 2");
            avatar.authorId      = APIUser.CurrentUser.id;
            avatar.authorName    = APIUser.CurrentUser.displayName;
            avatar.releaseStatus = "public";
            avatar.id            = AvatarUtils.GenerateAvatarId();
            AvatarUtils.SetCurrentAvatar(avatar);
            //AvatarUtils.CopyAvatar2(vrcPlayer.GetApiAvatar());
        }
Example #6
0
        public void Start()
        {
            Console.WriteLine("[PikMod] Started.");
            if (self != null)
            {
                return;
            }
            self = new GameObject();
            self.AddComponent <SavedAvatarList>();
            //self.AddComponent<FlyMode>();
            // this.self.AddComponent<BoneEsp>();
            CommandHandler commandHandler = PikMod.self.AddComponent <CommandHandler>();
            PikUIMods      pikui          = PikMod.self.AddComponent <PikUIMods>();

            commandHandler.AddBase <SelectedPlayerCommands>();
            commandHandler.AddBase <GlobalCommands>();
            Fps fpss = PikMod.self.AddComponent <Fps>();

            AvatarUtils.LoadAvatars();
        }
Example #7
0
 // Token: 0x0600000F RID: 15 RVA: 0x00002652 File Offset: 0x00000852
 public static ApiAvatar SaveAvatar(VRCPlayer vrcPlayer, string name, string imageUrl = "")
 {
     return(AvatarUtils.SaveAvatar(vrcPlayer.GetApiAvatar(), name, imageUrl));
 }
Example #8
0
 public void SaveCurrentAvatar()
 {
     AvatarUtils.SaveAvatar(PlayerManager.GetCurrentPlayer().GetApiAvatar(), ConsoleUtils.AskInput("Enter avatar's name: ") ?? "Nameless", "");
 }