public void setClothesFromString(SharpBridge.Player player) { Dictionary <uint, uint> dic = new Dictionary <uint, uint>(); string[] pieces = user.clothes.Split(' '); try { if (pieces.Length >= 1) { player.setSkinId(uint.Parse(pieces[0])); } for (uint i = 1; i < pieces.Length; i++) { string[] parts = pieces[i].Split(','); if (parts.Length != 2) { continue; } uint part = uint.Parse(parts[0]); uint id = uint.Parse(parts[1]); if (part < 10) { player.setClothes(part, id); } else { player.setProperty(part - 10, id); } } } catch (Exception) { } }
//Skins 1-2 have the most variations for this command public static void ChangeProperty(SharpBridge.Player player, object[] param) { uint id = (uint)param[0]; if (id < 1 || id > 2) { player.sendMsg($"{id} is not a valid property, use 1-2", ChatColor.ERROR); return; } uint variation = (uint)param[1]; if (id < 1 || id > 100) { player.sendMsg($"{variation} is not a valid variation, use 1-100", ChatColor.ERROR); return; } player.setProperty(id - 1, variation - 1); }