Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > Programming/Web Design > Visual Basic

Visual Basic VB Discussion. (Including VB.Net)


Vb.net need help with a exp calculator

Visual Basic


Reply
 
Thread Tools Display Modes
Old 07-03-2009, 08:41 PM   #1
Rexgr
Registered User
 
Last Online: 08-17-2009 12:24 AM
Join Date: May 2009
Posts: 28
Rep Power: 0
Rep Points: 10
Rexgr is on a distinguished road
Feedback: (0)
Points: 3,644.09
Bank: 0.00
Total Points: 3,644.09
Vb.net need help with a exp calculator

Hey guys im making a exp calculator for fishing on a game. I am pretty new to programming and I am unsure on how to calculate the multiple values that are needed to calculate the exp. I will post the code I have so far most of it is useless because i was just experimenting but if someone could fix up my code or give me advice that would be much appreciated!

Numfish is the ammount of fish the user has.
numcat is the number of cat fish a user has.
num pig is the number of piglet fish a user has.
num spec is the number of special items a user has.

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim numfish As Integer = TextBox1.Text
        Dim numcat As Integer = TextBox2.Text
        Dim numpig As Integer = TextBox3.Text
        Dim numspec As Integer = TextBox4.Text
        Dim fishexp As Integer = numfish
        Dim catexp As Integer = numcat * "5"
        Dim pigexp As Integer = numpig * "10"
        Dim specexp As Integer = numspec * "20"
        Dim dofish As Integer = "0"
        Dim dopig As Integer = "0"
        Dim docat As Integer = "0"
        Dim dospec As Integer = "0"
        If CheckBox1.Checked = True Then
            dofish = "1"
        End If
        If CheckBox2.Checked = True Then
            docat = "1"
        End If
        If CheckBox3.Checked = True Then
            dopig = "1"
        End If
        If CheckBox4.Checked = True Then
            dospec = "1"
        End If
        Dim final As Integer = "0"
        Dim whatused As Integer = "0"
        If docat = "1" Then
            final = final + fishexp
        End If
        If dofish = "1" Then
            final = final + fishexp
        End If
        If dopig = "1" Then
            final = final + pigexp
        End If
        If dospec = "1" Then
            final = final + specexp
        End If
        MessageBox.Show(final)
    End Sub
End Class
If you need anymore information or a attachment I can get it for you.
Attached Files
File Type: rar Eosep fishing exp calculator.rar (65.4 KB, 1 views)
Please scan all the files you download with NoVirusThanks before opening them. If there is a virus, report the post by clicking the button.

Last edited by Rexgr; 07-03-2009 at 08:44 PM. Reason: attachment
Rexgr is offline   Reply With Quote
Old 07-03-2009, 08:44 PM   #2
staris
Banned
 
Last Online: 07-25-2009 12:49 AM
Join Date: Jan 2009
Posts: 39
Rep Power: 0
Rep Points: 10
staris is on a distinguished road
Feedback: (0)
Points: 415.89
Bank: 2,842.00
Total Points: 3,257.89
Re: Vb.net need help with a exp calculator

1 sec I am checking it to see what it is.. Man my pc is going slow :D

staris added 6 Minutes and 47 Seconds later...< --- Please use the edit button in the future--- >

Sorry, I cant open VB atm, too slow. Can you tell me if u can login with my webbrowser?

Last edited by staris; 07-03-2009 at 08:51 PM. Reason: Automerged Doublepost
staris is offline   Reply With Quote
Reply

Bookmarks

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 Off
Pingbacks are Off
Refbacks are Off

Forum Jump

All times are GMT -7. The time now is 12:55 PM.

 

Copyright ©2009, GamerzPlanet.Net
Visits: