Advertisement
illpastethat

Craps for JammyPear

Dec 16th, 2012
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.66 KB | None | 0 0
  1. on *:text:!craps *:#eCasino.craps: {
  2.   var %HashItem $address($nick,2)
  3.   var %UsersChips $hget(Roully,%HashItem)
  4.   var %bet $2
  5.   if (%bet < 25) {
  6.     msg # $nick $+ , 2the minimum bet is 25 chips.
  7.   }
  8.   elseif (%bet > 500) {
  9.     msg # $nick $+ , 2the maximum bet is 500 chips.
  10.   }
  11.   elseif (!%UsersChips) {
  12.     msg $chan $nick $+ , 2you don't have any chips, contact an operator.
  13.   }
  14.   elseif (%bet !isnum) {
  15.     msg $chan 2 $nick $+ , that is not a valid bet, try !craps 100
  16.   }
  17.   elseif ($left(%bet,1) == $chr(45)) {
  18.     msg $chan 2 $nick $+ , you can not use negative numbers!
  19.   }
  20.   elseif (%bet <= 0) {
  21.     msg $chan 2 $nick $+ , please use a positive number.
  22.   }
  23.   elseif (%bet) && (%UsersChips < %bet) {
  24.     msg $chan 2 $nick $+ , you can not wager that much because you only have %UsersChips chips.
  25.   }
  26.   else {
  27.     hdec Roully %HashItem %bet
  28.     var %x 500
  29.     while (%finished != true) {
  30.       var %1roll $rand(1,6)
  31.       var %2roll $rand(1,6)
  32.       var %rolls $calc(%1roll + %2roll)
  33.       .timer -m 1 %x msg $chan $nick 2rolled a1 %1roll 2and a1 %2roll 2for a total of1 %rolls 
  34.       if ((%rolls == 2) || (%rolls == 3) || (%rolls == 12)) {
  35.         hinc Roully %HashItem $calc(%bet *2)
  36.         var %UsersChips $hget(Roully,%HashItem)
  37.         .timer -m 1 %x msg $chan $nick $+ 2, you have won $calc(%bet *2) chips. You now have %userschips chips.
  38.         var %finished true
  39.       }
  40.       elseif ((%rolls == 7) || (%rolls == 11)) {
  41.         .timer -m 1 %x msg $chan $nick $+ 2, you have lost your bet of %bet chips. You now have %UsersChips chips.
  42.         var %finished true
  43.       }
  44.       inc %x 800
  45.     }
  46.   }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement