you could stay away from online gambling by keeping less money online. So even if you lose you don't lose much.
To stay away from gambling money is not very important thing but one should find some other interesting things to do during free time. Once anyone stop thinking about gambling for some time by keeping them busy in some other activities then they can easily stop these online gambling. So find more real friends or spend more time with your family members then it will easy to forget these games.
Yeah, finding real friends with different hobby could rally help. that would be instant shift of your attention if you give them a chance. Family too is a good blocking force to keep you away from gambling. But I do think that it still depends upon the reason why a gambler gamble, if he himself could not sort it out, I'm afraid it would be harder to get away with it.