Advertisement
Guest User

thingy

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