Slot Machine

Just BASIC Games
Post Reply
JanetTerra
Site Admin
Posts: 117
Joined: Wed Nov 24, 2004 2:49 am

Slot Machine

Post by JanetTerra »

Gordon's recent Slot Machine post on the JB Forum and a cancelled trip to Las Vegas prompted me to investigate using sprites for better animation. Here's the finished product. Feel free to add more sprites, sound effects, visual effects (a few fireworks for a Jackpot display?), whatever. If you do add something, please upload it so we can all enjoy.
Janet
Attachments
SlotMachineJLT.zip
Slot Machine with sprites and wave files.
(30.83 KiB) Downloaded 519 times
cj no one
Posts: 12
Joined: Sat May 07, 2005 5:13 pm

Cheats

Post by cj no one »

I did something.... I added cheats :P not sure I should upload.... don't have enough :P

you can mod it yourself for the cheats, though... just do these:

Open SlotMachineJLT.bas

At the top, add:

Code: Select all

Global nTokens
Find:

Code: Select all

    Menu #slot, "&Help", "&Directions", [directions],|, _
        "&About Just BASIC Slot Machine", [aboutJBSlotMachine]
Add Below:

Code: Select all

    Menu #slot, "", "", [cheat]
At the bottom, add:

Code: Select all

[cheat]
Prompt " ";cheat$
If cheat$="" then wait
call detercheat cheat$, nPics
wait

Sub detercheat cheat$, nPics
    Select Case cheat$
        case "t0k3n5"
            call add, t
        case "adsm"
            prompt " ";t
            call add, t
        case "jackpot"
            For x = 1 to 3
                slotArray(x, 3) = 3
                checkWin$ = checkWin$(nPics)
                winAmount = winAmount(checkWin$, nPics)
                For i = 1 to winAmount
                    nTokens = nTokens + 1
                    Call nTokensScreen nTokens, 2
                Next i
            Next x
        case "stamt"
            prompt " ";c
            nTokens=c
            call nTokensScreen, c, 1
        case else
            Notice "Nothing. Figures."
    End Select
End Sub

Sub add t
    If t=0 then nTokens=nTokens+50
    nTokens=nTokens+t
    call nTokensScreen nTokens, 2
End Sub

What is done:

The first edit: Simply lets subroutines/functions see nTokens.

Second Edit: Adds an invisible menu next to 'Help'

Third Edit: Adds the code for the cheats. The cheats are in there :P
cj no one
Posts: 12
Joined: Sat May 07, 2005 5:13 pm

Post by cj no one »

Sorry, forgot to say AMAZING JOB ON THE SLOT MACHINE! Sure beats out the one that comes with JB...
Post Reply