my buddy got thrown off a cruise ship recently, for smoking weed...
he is now on an international list to be double checked everywhere he goes, worldwide...
depends on who catches you, i guess, just like anywhere else...
That one needed to be repeated. Getting yourself on an official sh*t list - that does NOT have an expiration date - can really cause hassles down the road if you intend to travel across the globe, visit friends/relatives in Canada or Mexico, et cetera.
Whenever one does anything that carries any degree of risk, one should ALWAYS be aware of all of the possible consequences - and weigh the odds of getting caught against those consequences.
Lots of the ships now have cameras ... in the hallways, on the decks, etc.
Just like any group of people, there are thieves aboard each and every cruise. A friend of my ex-wife got hit by a pickpocket. The guy got caught. The friend was told that there are obvious cameras which are in the main there so that all of the thieves will assume that anywhere that there aren't highly visible cameras are the "safe to steal" areas. And that's how the pickpocket got caught.
You could always do what they (still, AfaIK) do on aircraft carriers. Toke up in the reactor room because officers don't go there unless they absolutely have to. No, wait - that wasn't it... Oh, yeah: Take a trash bag with no holes in it, neck down the top with a firm grip, and exhale ALL of your smoke in it. Then dump it out a porthole/window on the stern side. Or carry it to the farthest point on the stern that you can get (have to carry a fairly large "tote bag" with a smaller trash bag inside it). Make sure you bring something that is GUARANTEED to work to seal off the top while you carry it.
NOTE: I have never been on a cruise ship, take that into consideration before trying it.
Personally, I think that if one doesn't have the willpower to abstain for the duration of the cruise - or if one has a medical need to consume during the same period - that it might be wise to vacation within the boundaries of the country that they live in. But that's just my opinion.