Get yourself to a place where you CANNOT engage in the sins you mentioned. Stay in a public place where it will be impossible to do dope, drink, look at porn, or masturbate. Is there a Church open all night that you can get to? Place yourself before the Blessed Sacrament. If not, a store open 24 hours? Even in front of a police station! A crowded public street? NOT A PUB, BAR, DANCE HALL! Can you stay with anyone who will watch and pray with you? If you must be alone, then plan an activity and do it! Clean out the garage, make a craft, bake pies, make a huge salad by hand. No food processors allowed. Of course, pray the Rosary while doing these things. Do not dwell on your sin. As often as Satan tells you to panic, repeat Acts of Faith, Hope, Charity, Contrition. Call on the Blessed Mother, St. Joseph, St. Michael, St. Catherine, your Guardian Angel. Jesus Wills that you should be saved, not lost. He is more powerful than Satan. Remember both Judas and Peter betrayed Our Lord, but only Peter repented and is called St. Peter. Judas despaired and went to Hell. Our Lord is eager to hear your confession in the person of the priest and to cleanse and restore you. Look up I John 1:9. Mary is a true Mother. When her child runs to her bloodied and bruised as a result of disobedience, she first compassionates him and cleans and dresses his wounds. Accept willingly the penance you are given. Ask the priest for advice about how to prevent another relapse. Maybe you can set up some sort of daily accountability to another regarding these specific sins. Can your Godfather or Confirmation sponsor help you? (It has to be a male due to the nature of what tempts you.) Set up a daily life structure to keep yourself as far as possible from the sins that tempt you. I'll pray for you in my Rosary this evening. Never give up, not even if you again fall. Just imitate Christ Who kept on picking up His Cross on the way to Calvary.