Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bet: function(target, room, user, connection, cmd) {
- target = toId(target);
- if (room.rouletteon === false) {
- return this.sendReply('There is no roulette going on right now.');
- }
- var targets = ['red', 'blue', 'yellow', 'green', 'black'];
- if (targets.indexOf(target) === -1) {
- return this.sendReply('Sorry, but that isn\'t a valid color.');
- }
- if (isNaN(user.bets)) user.bets = 0;
- if (room.roulusers.indexOf(user.name) === -1) room.roulusers.push(user.name);
- user.color = target;
- user.bets++;
- this.sendReply('You have bet '+user.bets+' times to '+user.color);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement