;Slot Machine game
;Written by cr0sis -irc.affinitygamers.com
;Version 1.1
Load into remotes (don't just copy and paste)
Place the script in you /mirc/ root folder (where the .exe is)
and on that client, type /load -rs slotmachine.mrc
YOU MUST USE THIS ON A SECOND CLIENT AND PLAY WITH IT ON YOUR REGULAR
Commands: !slot, !stats, !stats ( without the < or > )
Single player game, nothing more, but anyone can play at any time and if they don't win they add 1 point to the jackpot.
Feel free to modify the base jackpot (before loading, of if you do it after loading, unload and load it again) -> SET %jackpot 100
Change 200 to anything you want and that's the set amount, each play adds 1 to that number, and the winner gets all accumulated + base points.
Also
PLEASE don't whine at me if you forget to change this line:
TIMER [ $+ [ %nickslot ] ] 1 10 ECHO -s timer for %nickslot deactivated
This line handles the delay between turns, so users can't spam, the number BEFORE echo (10 in my script) is the time users must wait between plays. Edit to suit you/your players.
;Slot Machine game
;Written by cr0sis -irc.affinitygamers.com
;Version 1.2
==================================================================
on *:LOAD:{
SET %Winners 0
SET %jackpot 100
SET %symbol.0 1,8 BELL
SET %symbol.1 1,4 CHERRY
SET %symbol.2 1,6 PLUM
SET %symbol.3 1,9 WEED
SET %symbol.4 0,4 STRAWBERRY
SET %symbol.5 0,1 COAL
SET %symbol.6 1,11 BLUEBERRY
SET %symbol.7 1,7 ORANGE
SET %symbol.8 4,3 APPLE
}
ON *:UNLOAD:{
UNSET %jackpot
UNSET %symbol.*
}
on *:TEXT:!slot:#:{
SET %chanslot $chan
SET %nickslot $nick
IF ($timer(%nickslot) == $null) {
TIMER [ $+ [ %nickslot ] ] 1 5 ECHO -s timer for %nickslot deactivated
INC %jackpot
NOTICE %nickslot 1 Credit used from your affinitygamers.com account.
MSG %chanslot [7SLOT-MACHINE] Current Jackpot: %jackpot ::: Rolling the wheels.
PLAYSLOT
}
ELSE {
NOTICE %nickslot You have to wait $timer(%nickslot).secs seconds before playing again.
}
}
alias playslot {
IF ( %slot.lose. [ $+ [ %nickslot ] ] == $null ) SET %slot.lose. [ $+ [ %nickslot ] ] 0
INC %slot.lose. [ $+ [ %nickslot ] ]
SET %col.0 %symbol. [ $+ [ $rand(0,8) ] ]
SET %col.1 %symbol. [ $+ [ $rand(0,8) ] ]
SET %col.2 %symbol. [ $+ [ $rand(0,8) ] ]
IF (%col.0 == %col.1) && (%col.1 == %col.2) {
SET %winlineslot 0 1,8 J 1,4 A 1,9 C 1,7 K 1,13 P 1,11 O 1,5 T !!! %nickslot just won %jackpot points in channel %chanslot !
INC %Winners
SET %Last.Winner %nickslot
SET %Last.Amount %jackpot
SET %slot.win. [ $+ [ %nickslot ] ] $calc( %slot.lose. [ $+ [ %nickslot ] ] + %jackpot )
SET %jackpot 200
}
MSG %chanslot %col.0 %col.1 %col.2 ::: $iif(%winlineslot == $null,%nickslot lost,%nickslot win)
IF (%winlineslot != $null) AMSG %winlineslot
UNSET %winlineslot
}
on *:TEXT:!stats*:#:{
SET %tmpnick $iif($2 == $null,$nick,$2)
SET %tmpwon $iif( %slot.win. [ $+ [ %tmpnick ] ] == $null,0, %slot.win. [ $+ [ %tmpnick ] ] )
SET %tmplose $iif( %slot.lose. [ $+ [ %tmpnick ] ] == $null,0, %slot.lose. [ $+ [ %tmpnick ] ] )
MSG $chan %tmpnick $+ 's Slot Machine stats: Won Amount: %tmpwon Lost games: %tmplose Net: $calc(%tmpwon - %tmplose)
NOTICE $nick Last winner was: %Last.Winner and they won %Last.Amount points
NOTICE $nick Chance of winning: 1.5625% Number of Winners: %Winners
}
; {}
perfect thanks....
and one more thing how who i make it show stats for everyone @ once rather then single..
like this:
ViRuS\'s Slot Machine stats: Won Amount: 712 Lost games: 453 Net: 259
AuToMaG\'s Slot Machine stats: Won Amount: 320 Lost games: 250 Net: 123
and so on...thanks again i\'m not that good @ this script stuff...lol
Oh and don\'t forget, I worked out the win % in my head and just put that number into the script
NOTICE $nick Chance of winning: 1.5625% Number of Winners: %Winnerss
SHOULD read 1.234%, 1.5625% is for 8 symbols (I\'m using 9), you\'ll have to do the working out yourself for how many symbols you will be using.
Yeah automag, change the number of \"Pictures\"
Here:
on *:LOAD:{
SET %Winners 0
SET %jackpot 100
SET %symbol.0 1,8 BELL
SET %symbol.1 1,4 CHERRY
SET %symbol.2 1,6 PLUM
SET %symbol.3 1,9 WEED
SET %symbol.4 0,4 STRAWBERRY
SET %symbol.5 0,1 COAL
SET %symbol.6 1,11 BLUEBERRY
SET %symbol.7 1,7 ORANGE
SET %symbol.8 4,3 APPLE
}
Take out as many lines as you want, leaving atleast 3 in. There are 9 there, my initial calculation was for 8, so when the !stats shows the win %, it\'s wrong... The real number is 1.234%
If you do take out one/some in that list, please make sure you also mofify:
SET %col.0 %symbol. [ $+ [ $rand(0,8) ] ]
SET %col.1 %symbol. [ $+ [ $rand(0,8) ] ]
SET %col.2 %symbol. [ $+ [ $rand(0,8) ] ]
$rand(0,8) <-- This is for 9 symbols, change it from 0,8 based on how many you use, for example if you you six... you\'d enter 0,5 in each of the three lines
Btw if you have a community website with its own \"currency\" (Like mine has points which you accumulate by posting in the forums and spend by changing your avatar/title etc) Then you can add a socket script in that client and use this game to give the winner all the accumulated game points.
It\'s addictive for large channels without this, even more so with, I\'ve had it finished for under 2 hours and already more than 500 in points has been given away!
on *:INPUT:#: { set %chanslot $chan | set %nickslot $me | inc %jackpot | notice %nickslot 1 point added to the jackpot | MSG %chanslot [SLOT-MACHINE] Current Jackpot: %jackpot ::: Rolling the wheels. | PLAYSLOT }
^ Single player code, or better yet split everything off after set %nickslot onto an alias and use it instead for both