If you get high in port (where legal) and return to the ship, it is unlikely that you will face any consequences unless you are disorderly. Security doesn't check if passengers are high when they return to the ship. That said, using weed in port is against cruise lines' policies. You may face consequences if caught smoking in a cruise port.