by Ben Ferris (1 Submission)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 16th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Slot Machine that uses random numbers! Almost 800 lines of code! Make sure that the following pictures are the same: (7,8,9) (2,1,4)
* *
* Created By: *
* *
* Ben Ferris *
* *
* April 15th - 16th, 2002*
* *
* Please do not change *
* the code. I worked for *
* two days staight to *
* get this program to *
* work. Thank You and *
* have fun! *
Dim Ben, AJ, Laura
Private Sub Command1_Click()
Label6.Caption = Label6.Caption - 1
Randomize
Ben = Int((9 * Rnd) + 1)
AJ = Int((9 * Rnd) + 1)
Laura = Int((9 * Rnd) + 1)
If Ben = 1 Then
Picture7.Visible = True
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 2 Then
Picture2.Visible = True
Picture7.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 3 Then
Picture19.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 4 Then
Picture13.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 5 Then
Picture25.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 6 Then
Picture10.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture5.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 7 Then
Picture5.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture18.Visible = False
Picture22.Visible = False
ElseIf Ben = 8 Then
Picture18.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture22.Visible = False
ElseIf Ben = 9 Then
Picture22.Visible = True
Picture7.Visible = False
Picture2.Visible = False
Picture19.Visible = False
Picture13.Visible = False
Picture25.Visible = False
Picture10.Visible = False
Picture5.Visible = False
Picture18.Visible = False
End If
If AJ = 1 Then
Picture8.Visible = True
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 2 Then
Picture1.Visible = True
Picture8.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 3 Then
Picture21.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 4 Then
Picture15.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 5 Then
Picture26.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 6 Then
Picture11.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture3.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 7 Then
Picture3.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture16.Visible = False
Picture24.Visible = False
ElseIf AJ = 8 Then
Picture16.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture24.Visible = False
ElseIf AJ = 9 Then
Picture24.Visible = True
Picture8.Visible = False
Picture1.Visible = False
Picture21.Visible = False
Picture15.Visible = False
Picture26.Visible = False
Picture11.Visible = False
Picture3.Visible = False
Picture16.Visible = False
End If
If Laura = 1 Then
Picture9.Visible = True
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 2 Then
Picture4.Visible = True
Picture9.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 3 Then
Picture20.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 4 Then
Picture14.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 5 Then
Picture27.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 6 Then
Picture12.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture6.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 7 Then
Picture6.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture17.Visible = False
Picture23.Visible = False
ElseIf Laura = 8 Then
Picture17.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture23.Visible = False
ElseIf Laura = 9 Then
Picture23.Visible = True
Picture9.Visible = False
Picture4.Visible = False
Picture20.Visible = False
Picture14.Visible = False
Picture27.Visible = False
Picture12.Visible = False
Picture6.Visible = False
Picture17.Visible = False
End If
If Picture13.Visible = True And Picture14.Visible = True And Picture15.Visible = True Then
Label6.Caption = Label6.Caption + 2000
Label8.Caption = Label8.Caption + 2000
Label21.Caption = Label21.Caption + 1
MsgBox "You won $2000!! Way To Go!!"
ElseIf Picture1.Visible = True And Picture2.Visible = True And Picture4.Visible = True Then
Label6.Caption = Label6.Caption + 1000
Label8.Caption = Label8.Caption + 1000
Label22.Caption = Label22.Caption + 1
MsgBox "You won $1000! Now try for $2000!"
ElseIf Picture10.Visible = True And Picture11.Visible = True And Picture12.Visible = True Then
Label6.Caption = Label6.Caption + 500
Label8.Caption = Label8.Caption + 500
Label23.Caption = Label23.Caption + 1
MsgBox "You won $500! Not Bad!"
ElseIf Picture22.Visible = True And Picture23.Visible = True And Picture24.Visible = True Then
Label6.Caption = Label6.Caption + 100
Label8.Caption = Label8.Caption + 100
Label24.Caption = Label24.Caption + 1
MsgBox "You won $100! Very Good!"
ElseIf Picture16.Visible = True And Picture17.Visible = True And Picture18.Visible = True Then
Label6.Caption = Label6.Caption + 75
Label8.Caption = Label8.Caption + 75
Label25.Caption = Label25.Caption + 1
MsgBox "You won $75! A-mazing!"
ElseIf Picture3.Visible = True And Picture5.Visible = True And Picture6.Visible = True Then
Label6.Caption = Label6.Caption + 50
Label8.Caption = Label8.Caption + 50
Label26.Caption = Label26.Caption + 1
MsgBox "You won $50! Go for the Benjamin!"
ElseIf Picture7.Visible = True And Picture8.Visible = True And Picture9.Visible = True Then
Label6.Caption = Label6.Caption + 25
Label8.Caption = Label8.Caption + 25
Label27.Caption = Label27.Caption + 1
MsgBox "You won $25! Good for a laugh!"
ElseIf Picture19.Visible = True And Picture20.Visible = True And Picture21.Visible = True Then
Label6.Caption = Label6.Caption + 10
Label8.Caption = Label8.Caption + 10
Label28.Caption = Label28.Caption + 1
MsgBox "You won $10! Hey, that my allowance!"
ElseIf Picture25.Visible = True And Picture26.Visible = True And Picture27.Visible = True Then
Label6.Caption = Label6.Caption + 5
Label8.Caption = Label8.Caption + 5
Label29.Caption = Label29.Caption + 1
MsgBox "You won $5! Go to Burger King!"
ElseIf Picture25.Visible = True And Picture26.Visible = True Then
Label6.Caption = Label6.Caption + 4
Label8.Caption = Label8.Caption + 4
Label31.Caption = Label31.Caption + 1
MsgBox "You won $4! Come on, you can do better than that!"
ElseIf Picture25.Visible = True Then
Label6.Caption = Label6.Caption + 2
Label8.Caption = Label8.Caption + 2
Label32.Caption = Label32.Caption + 1
MsgBox "You won $2! Go call 1-800-CALL-ATT"
Else: Label19.Caption = Label19.Caption - 1
End If
End Sub
Private Sub Command2_Click()
Unload Form1
Load Form1
Form1.Show
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = False
Picture5.Visible = False
Picture6.Visible = False
Picture7.Visible = False
Picture8.Visible = False
Picture9.Visible = False
Picture10.Visible = False
Picture11.Visible = False
Picture12.Visible = False
Picture13.Visible = False
Picture14.Visible = False
Picture15.Visible = False
Picture16.Visible = False
Picture17.Visible = False
Picture18.Visible = False
Picture19.Visible = False
Picture20.Visible = False
Picture21.Visible = False
Picture22.Visible = False
Picture23.Visible = False
Picture24.Visible = False
Picture25.Visible = False
Picture26.Visible = False
Picture27.Visible = False
Label6.Caption = 500
Label8.Caption = 0
Label19.Caption = 0
Label21.Caption = 0
Label22.Caption = 0
Label23.Caption = 0
Label24.Caption = 0
Label25.Caption = 0
Label26.Caption = 0
Label27.Caption = 0
Label28.Caption = 0
Label29.Caption = 0
Label31.Caption = 0
Label32.Caption = 0
End Sub
No comments have been posted about Slot Machine that uses random numbers! Almost 800 lines of code! Make sure that the following pictu. Why not be the first to post a comment about Slot Machine that uses random numbers! Almost 800 lines of code! Make sure that the following pictu.