Pokies machine help !!!

Visual Basic Discuss, Pokies machine help !!! at Programmers Lounge forum; I found the following code on the internet FOR MAKING A POKIE MACHINE, and i wanna go about completing it. ...


Go Back   Gamerz Needs - For All Your Gaming Needs! > Technology Zone > Programmers Lounge > Visual Basic
Forgot Password? | Sign Up!

Notices

Advertisement
   

Reply
 
Bookmark this Thread Tools Display Modes
  #1  
Old 09-26-2008, 05:02 AM
Wood Axe
 
Last Online: 10-08-2008 09:37 PM
Join Date: Aug 2007
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
yuvi100 is on a distinguished road
Points: 439.80
Bank: 0.00
Total Points: 439.80
Exclamation Pokies machine help !!!

I found the following code on the internet FOR MAKING A POKIE MACHINE, and i wanna go about completing it.

1)
Try
If lblTotalValue.Text <= 0 or Val(txtBetAmount.Text) > Val(lblTotalValue.Text) Then
MsgBox("You do not have enough money to make such a bet!" & vbCrLf & "Either reduce the bet amount or start a new game", MsgBoxStyle.Critical, "Important Notice")
Elseif txtBet Amount.Text <=0 Then
MsgBox("You cannot bet nothing!", MsgBoxStyle.Critical, "Important Notice")
Else
tmrTumbler1.Interval = 10
tmrTumbler2.Interval = 10
tmrTumbler3.Interval = 10
txtBetAmount.Enabled = False
tmrHandle.Enabled = True
End if
Catch ex As System.InvalidCastException
MsgBox("You must enter a number in the bet amount", MsgboxStyle.Critical, "Important Notice")
End Try

End Sub

2)

Randomize()
intSpin1 = Int(Rnd() * 3)
Select Case intSpin1 <----- what is required of me to do for this to work
Case 0
picTumbler1.Image = imlTumbler.Images(0)
Case 1
picTumbler1.Image = imlTumbler.Images(1)
Case 2
picTumbler1.Image = imlTumbler.Images(2)
End Select
SlowTimers() <------------ We cant get this line to work ( how do we slow the timers with this code)

And 3)

Select Case intHandleCounter
Case 0
picHandle.Image = imlHandle.Images(intHandleCounter) <--------- whats intHandleCounter and what should it do?
intHandleCounter = intHandle Counter + 1
Case 1
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 2
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 3
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 4
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 5
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 6
picHandle.Image = imlHandle.Images(intHandleCounter)
intHandleCounter = intHandle Counter + 1
Case 7
picHandle.Image = imlHandle.Images(intHandleCounter)
tmrTumbler1.Enabled = True
tmrTumbler2.Enabled = True
tmrTumbler3.Enabled = True
intHandleCounter = intHandle Counter + 1
Case 8
picHandle.Image = imlHandle.Images(intHandleCounter -2)
intHandleCounter = intHandle Counter + 1
Case 9
picHandle.Image = imlHandle.Images(intHandleCounter -4)
intHandleCounter = intHandle Counter + 1
Case 10
picHandle.Image = imlHandle.Images(intHandleCounter -6)
intHandleCounter = intHandle Counter + 1
Case 11
picHandle.Image = imlHandle.Images(intHandleCounter -8)
intHandleCounter = intHandle Counter + 1
Case 12
picHandle.Image = imlHandle.Images(intHandleCounter -10)
intHandleCounter = intHandle Counter + 1
Case 13
picHandle.Image = imlHandle.Images(intHandleCounter -12)
intHandleCounter = intHandle Counter + 1
Case 14
picHandle.Image = imlHandle.Images(intHandleCounter -14)
intHandleCounter = 0
tmrHandle.Enabled = False
End Select

End Sub

Could anyone please shed some light on how i could go about doing this?, i have NO IDEA!!! Any help would be greatful!
Thanks,
Yuvi100

Last edited by yuvi100; 09-26-2008 at 06:55 AM.. Reason: Spelling
  #2  
Old 09-26-2008, 06:54 AM
Travy92's Avatar
Team Coder
 
Last Online: Yesterday 02:18 AM
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 210
Thanks: 19
Thanked 18 Times in 18 Posts
Nominated 1 Time in 1 Post
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 3
Travy92 is on a distinguished road
Points: 2,562.49
Bank: 0.00
Total Points: 2,562.49
Send a message via MSN to Travy92
I'm not sure what you mean. But first off you should start by making the form.
For 1) Looks like you need 2 TextBoxes (Named: "txtBetAmount" and "lblTotalValue") and 3 Timers (Named: "tmrTumbler1", "tmrTumbler2" and "tmrTumbler3") the intervals are already stated in the code. Those are the basic ones you need.

For 2) You need:
1 PictureBox named: "picTumbler1"

For 3) You need:
2 PictureBoxs? Named: "picHandle" and "imlHandle" <- Not sure about this, it's ending is ".images"
Then you'd need to declare "intHandleCounter" and "intHandle".
And a Timer named: "tmrHandle" but not sure what intervals.

Please explain this bit: "Select Case intHandleCounter" <- What is it referring to?

P.S - What VB version you using?
If it's not VB2008 (VB9) then this code won't work for you.

------------------------------------
Edit - Ok now I understand a bit more:
I'm thinking you need to declare intSpin1 (I think it's declared one line above it but I can't remember the correct syntax).
Basically what it means is intSpin1 = a random number from 1 - 3 (this changes periodically). And under it, it says "if intSpin1 = 1, 2 or 3 then.. make the picturebox have 3 different images (depending on which number from 1 - 3 it was.. if it was 1, then image 1 would appear, if it was 2 then image 2 and so on).

For slowTimers : I think this is a private sub.
I'm guessing this is the code for the private sub:

Quote:
Private Sub SlowTimers
tmrTumbler1.Interval = 5
tmrTumbler2.Interval = 5
tmrTumbler3.Interval = 5
End Sub
Since the name is "SlowTimers" i'm guessing it actually slows them, so I reduced their intervals by 5.
__________________
FF8 Rules

Last edited by Travy92; 09-26-2008 at 07:17 AM..
  #3  
Old 09-26-2008, 07:53 AM
dirky00018's Avatar
Violet Hole
 
Last Online: 11-27-2008 07:43 PM
Join Date: Mar 2007
Posts: 353
Thanks: 42
Thanked 18 Times in 12 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 5
dirky00018 is on a distinguished road
Points: 777.80
Bank: 3,786.86
Total Points: 4,564.66
Dark Blue - dirky00018 Dark Blue - dirky00018 Dark Blue - dirky00018 
sorry if this is a noob question. but what is a pokies machine??? =X
  #4  
Old 09-26-2008, 08:02 AM
Travy92's Avatar
Team Coder
 
Last Online: Yesterday 02:18 AM
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 210
Thanks: 19
Thanked 18 Times in 18 Posts
Nominated 1 Time in 1 Post
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 3
Travy92 is on a distinguished road
Points: 2,562.49
Bank: 0.00
Total Points: 2,562.49
Send a message via MSN to Travy92
It's for gambling, Google it or something.
Don't get into gambling.
__________________
FF8 Rules
  #5  
Old 09-26-2008, 10:09 AM
touche_'s Avatar
Registered Users +
 
Last Online: Today 05:58 AM
Join Date: Feb 2006
Location: below you
Posts: 1,079
Thanks: 238
Thanked 95 Times in 56 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 9
touche_ is on a distinguished road
Points: 5,386.49
Bank: 27,768.25
Total Points: 33,154.74
lets drink up and get fcked up - TheMangoKid 
Send a message via MSN to touche_
Quote:
SlowTimers() <------------ We cant get this line to work ( how do we slow the timers with this code)
probably a missing function , you've got to code it yourself

eg.

private sub Slowtimers()
*code to slow timers , eg 1 master timer to control everyone else's speed*
end sub

and for the intspin1 , i guess you just have to add "dim intspin1 as integer" above that line


although this code doesnt really look too vb8-ish to me
The Following User Says Thank You to touche_ For This Useful Post:
yuvi100 (09-26-2008)
  #6  
Old 09-26-2008, 07:51 PM
Wood Axe
 
Last Online: 10-08-2008 09:37 PM
Join Date: Aug 2007
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
yuvi100 is on a distinguished road
Points: 439.80
Bank: 0.00
Total Points: 439.80
how do i declare "intHandleCounter" and "intHandle".
WHAT DO I TTYPE FOR IT AND WER

thnx for tha help so far (Travy92)
  #7  
Old 09-26-2008, 08:44 PM
Mario's Avatar
Junior
 
Last Online: Today 09:38 AM
Join Date: Jul 2007
Location: Kansas, Leavenworth
Age: 17
Posts: 1,047
Thanks: 149
Thanked 208 Times in 75 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 6
Mario will become famous soon enough
Points: 2,292.64
Bank: 36,077.75
Total Points: 38,370.39
Gold - Dominic001 
you can at the top below your form name type


public inthandlecounter as single or long
public inthandle as (idk maby)handle or single or long


im not sure fully just my guess.
__________________
Willing to make helpfull programs!
Ask Me Any Thing You Need Help With.
I'm like a Mod with out the blue name, hammer and powers.

SOTW
The Following User Says Thank You to Mario For This Useful Post:
yuvi100 (09-27-2008)
  #8  
Old 09-26-2008, 09:13 PM
Wood Axe
 
Last Online: 10-08-2008 09:37 PM
Join Date: Aug 2007
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
yuvi100 is on a distinguished road
Points: 439.80
Bank: 0.00
Total Points: 439.80
Lightbulb Screenshots of my progress

Aiight ppl i hav screenshots of my process so far tell me if there is anything to FIX AND ADD !!! My tmrTumblers are not acting with intSpin1 , meaning i cant get SlowTimers to work (could any1 help with this aswell) !!!


[/IMG]

[/IMG]




ANY HELP WOULD BE APPRECIATED
Thnx,
Yuvi100

Last edited by yuvi100; 09-26-2008 at 09:21 PM..
  #9  
Old 09-26-2008, 11:09 PM
Travy92's Avatar
Team Coder
 
Last Online: Yesterday 02:18 AM
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 210
Thanks: 19
Thanked 18 Times in 18 Posts
Nominated 1 Time in 1 Post
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 3
Travy92 is on a distinguished road
Points: 2,562.49
Bank: 0.00
Total Points: 2,562.49
Send a message via MSN to Travy92
Quote:
Private Sub SlowTimers ()
TmrTumbler1.Interval = 5
TmrTumbler2.Interval = 5
TmrTumbler3.Interval = 5
End Sub
Looks like you forgot the capital T in your code.
Add them to make them look like this.
----------------------------------
You don't need this:
Quote:
Private Sub PicTumbler1_Click [blah blah]
TmrTumbler1.Enabled = True
End Sub
Since above this code block there is another sub enabling those 3 Timers.
Unless you wanted this so that when the user clicks one of the images, the Timer is enabled.

Where's the code for the TmrTumler1/2/3's?
__________________
FF8 Rules

Last edited by Travy92; 09-26-2008 at 11:17 PM..
The Following User Says Thank You to Travy92 For This Useful Post:
yuvi100 (09-27-2008)
  #10  
Old 09-27-2008, 12:27 AM
Wood Axe
 
Last Online: 10-08-2008 09:37 PM
Join Date: Aug 2007
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
yuvi100 is on a distinguished road
Points: 439.80
Bank: 0.00
Total Points: 439.80
Exclamation TmrTumblers

I didn't put any code for:
TmrTumbler1
TmrTumbler2
TmrTumbler3

What code do i need to put in their ???

What does the tmrTumblers supposed to do,
Examples:
-Spin the images
-Set a time for how long the PicTumblers should spin for
-..........

Thnx

Last edited by yuvi100; 09-27-2008 at 12:35 AM..
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Advertisement
   


Main Navigation
Home
GzN Forums
GzN Games
GzN News
Top Games
GzN Cheats
GzN Articles
GzN Reviews
GzN Downloads
User Control Panel
Advertising
RSS Feed
2Moons
Adventure Quest
AirRivals
America's Army
Anarchy Online
Archlord
Audition
Battlefield Series
Cabal Online
Call Of Duty Series
Combat Arms
Conquer Online
Counter Strike
Day of Defeat
Deicide Online
Diablo Series
Doom Series
Drift City
Enemy Territory
Eudemons Online
Final Fantasy
Flyff (Fly For Fun)
General Game Discussion
Ghost Online
Granado Espada
Grand Theft Auto Series
Guild Wars
Gunbound
Gunz Online
Habbo Hotel
Half-Life 2
Hero Online
KartRider
Knights Online
Maple Story
Medal of Honor
MU Online
Neopets
Pangya
Quake Series
Ragnarok Online
Rappelz
Rakion
Red Orchestra
Rose Online
Runescape
Scions of Fate
Silkroad Online
Sims Series
Soldier Front
Starcraft
Tales of Pirates
Tibia
The Ship
Trickster Online
TS Online
Unreal Tou