Yazid bin Muawiya sent us against Ibn Zubayr. When I reached Madinah, I went in to see so-and-so (Ziyad forgot his name) and said, "The people have done what they have done. What do you think?"He replied, "My dear friend Abu Qasim ﷺ instructed me, 'If you live to see any of these tribulations, take your sword to a rock and break its edge, then sit in your house. If anyone enters your house, withdraw to the inner chamber. If he enters the inner chamber after you, fall to your knees and say, May you bear my sin and your own, and so be among the companions of the Fire, for that is the recompense of the wrongdoers.' I have indeed broken the edge of my sword and sat in my house."
حدثنا عبد الصمد حدثنا زياد بن مسلم أبو عمر حدثنا
بعثنا يزيد بن معاوية إلى ابن الزبير فلما قدمت المدينة دخلت على فلان نسي زياد اسمه فقال إن الناس قد صنعوا ما صنعوا فما ترى فقال أوصاني خليلي أبو القاسم ﷺ إن أدركت شيئا من هذه الفتن فاعمد إلى أحد فاكسر به حد سيفك ثم اقعد في بيتك قال فإن دخل عليك أحد إلى البيت فقم إلى المخدع فإن دخل عليك المخدع فاجث على ركبتيك وقل بؤ بإثمي وإثمك فتكون من أصحاب النار وذلك جزاء الظالمين فقد كسرت حد سيفي وقعدت في بيتي
Its chain of transmission is hasan, because of Ziyad bin Muslim Abu Amr Saffar, whom some considered slightly weak while many others accepted him. The hadith has already come with a similar wording at 17902.