I based this code off of PoiXon's Simple Slots. Once this was done, xDaeMoN helped me by re-doing the beginning of it, and then it worked. So I'd like to credit PoiXon and xDaeMoN with the script, because without them I would have been lost on how to get this working. Thanks a ton guys!
The script has a rewards section. You can set certain outcomes (like all 8's) to give the user voice or op. I also added in a feature so that you can, with one click, reward them all with op, or with voice. You can also turn the rewards off (it is off by default). When someone types !slots, it says what they got, and if they got 3 of one item, it says that they have won or hit the double or triple jackpot. If you need any more help on how this works, simply PM me and I'll be glad to help. Hope everybody likes this!
on *:TEXT:!slots:#:{
if (%gslots == on) {
var %sb = $slotts, %sd = $slotts, %sf = $slotts
msg $chan $nick got (04 $+ %sb $+ 02) (04 $+ %sd $+ 02) (04 $+ %sf $+ 02)
if (%sb == &) && (%sd == &) && (%sf == &) { msg $chan $nick has won! }
if (%sb == 8) && (%sd == 8) && (%sf == 8) { msg $chan $nick has won! }
if (%sb == %) && (%sd == %) && (%sf == %) { msg $chan $nick has hit the JackPot! }
if (%sb == JackPot) && (%sd == JackPot) && (%sf == JackPot) { msg $chan $nick has hit the Super JackPot! }
if (%hsandreward == op) && (%sb == &) && (%sd == &) && (%sf == &) && ($me isop $chan) { mode $chan +o $nick }
if (%hsandreward == voice) && (%sb == &) && (%sd == &) && (%sf == &) && ($me isop $chan) { mode $chan +v $nick }
if (%hspercentreward == op) && (%sb == %) && (%sd == %) && (%sf == %) && ($me isop $chan) { mode $chan +o $nick }
if (%hspercentreward == voice) && (%sb == %) && (%sd == %) && (%sf == %) && ($me isop $chan) { mode $chan +v $nick }
if (%hseightreward == op) && (%sb == 8) && (%sd == 8) && (%sf == 8) && ($me isop $chan) { mode $chan +o $nick }
if (%hseightreward == voice) && (%sb == 8) && (%sd == 8) && (%sf == 8) && ($me isop $chan) { mode $chan +v $nick }
if (%hsJackPotreward == op) && (%sb == JackPot) && (%sd == JackPot) && (%sf == JackPot) && ($me isop $chan) { mode $chan +o $nick }
if (%hsJackPotreward == voice) && (%sb == JackPot) && (%sd == JackPot) && (%sf == JackPot) && ($me isop $chan) { mode $chan +v $nick }
}
}
menu channel,nicklist {
Slots
.Turn On { set %gslots on }
.Turn Off { unset %gslots }
.Rewards
..ops for % { set %hspercentreward op }
..Voice for % { set %hspercentreward voice }
..-
..ops for & { set %hsandreward op }
..Voice for & { set %hsandreward voice }
..-
..ops for 8 { set %hseightreward op }
..Voice for 8 { set %hseightreward voice }
..-
..ops for JackPot { set %hsJackPotreward op }
..Voice for JackPot { set %hsJackPotreward voice }
..-
..ops for all { set %hspercentreward op | set %hsandreward op | set %hseightreward op | set %hsJackPotreward op }
..Voice for all { set %hspercentreward voice | set %hsandreward voice | set %hseightreward voice | set %hsJackPotreward voice }
..Turn Off Rewards { unset %h* }
}
alias slotts {
goto $rand(1,4)
:1 | return &
:2 | return 8
:3 | return %
:4 | return JackPot
}