Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:!craps *:#eCasino.craps: {
- var %HashItem $address($nick,2)
- var %UsersChips $hget(Roully,%HashItem)
- var %bet $2
- if (%bet < 25) {
- msg # $nick $+ , 2the minimum bet is 25 chips.
- }
- elseif (%bet > 500) {
- msg # $nick $+ , 2the maximum bet is 500 chips.
- }
- elseif (!%UsersChips) {
- msg $chan $nick $+ , 2you don't have any chips, contact an operator.
- }
- elseif (%bet !isnum) {
- msg $chan 2 $nick $+ , that is not a valid bet, try !craps 100
- }
- elseif ($left(%bet,1) == $chr(45)) {
- msg $chan 2 $nick $+ , you can not use negative numbers!
- }
- elseif (%bet <= 0) {
- msg $chan 2 $nick $+ , please use a positive number.
- }
- elseif (%bet) && (%UsersChips < %bet) {
- msg $chan 2 $nick $+ , you can not wager that much because you only have %UsersChips chips.
- }
- else {
- hdec Roully %HashItem %bet
- var %x 500
- while (%finished != true) {
- var %1roll $rand(1,6)
- var %2roll $rand(1,6)
- var %rolls $calc(%1roll + %2roll)
- .timer -m 1 %x msg $chan $nick 2rolled a1 %1roll 2and a1 %2roll 2for a total of1 %rolls
- if ((%rolls == 2) || (%rolls == 3) || (%rolls == 12)) {
- hinc Roully %HashItem $calc(%bet *2)
- var %UsersChips $hget(Roully,%HashItem)
- .timer -m 1 %x msg $chan $nick $+ 2, you have won $calc(%bet *2) chips. You now have %userschips chips.
- var %finished true
- }
- elseif ((%rolls == 7) || (%rolls == 11)) {
- .timer -m 1 %x msg $chan $nick $+ 2, you have lost your bet of %bet chips. You now have %UsersChips chips.
- var %finished true
- }
- inc %x 800
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement