Before entering the driking contest, make sure the bottle of semi-grog is the last item on your inventory (this should be easy) and it's also the current item. You can make the semi-grog the current item on your way to the gaping hole.
Then, after entering the cottage:
- After escaping the cutscenes, click near the top of the table, a bit on the left of where the mug will be.
- Skip the cutscene as soon as Rogers appears.
- Press "U", click on the mug, and click on the tree. Then click both mouse buttons to use StopManip when Guybrush is near the mug, and Guybrush will pick it up from a distance. Alternatively, you can right-click on the mug and choose "pick-up" and then click both mouse buttons. Pressing "P", clicking on the mug and pressing both mouse buttons won't work.
- Click on the trap door (or near it) and, while Guybrush is walking, open the inventory, press Enter to select the bottle of semi-grog, and then press the right arrow key and Enter to select the mug.
- Click both mouse buttons to use StopManip and hold period to skip the dialog.
- After the cutscenes, push any brick and quickly click on the open trap door.