at a guess , the o'higginses had come to dice and drink with friends quartered there-or to attend some social event such as a cockfight-and realizing a sudden need for cash , had improvised in their usual slipshod but imaginative manner .