• Log in or sign up for an account here: https://www.sythe.org/login

[Source] WoW DPS Calculator *Working*

Blupig

BEEF TOILET

$5 USD Donor
Joined
Nov 23, 2006
Sythe Gold
1,609
Messages
7,145
Age
33
Location
Canada
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
Some of you may know that I developed a DPS calculator a while back, but it didn't actually work because I totally forgot about the weapon speed. Anyways, here is the source code of the working one, with speed added. This source doesn't have to be for WoW players necessarily, but it can also be used to learn simple calculations in VB6. I'll provide a small explanation of the code as well.

What you need in your project:

>Standard EXE
>4 Textboxes
-Name: txtMinimum
-Name: txtMaximum
-Name: txtSpeed
-Name: txtDPS
>1 Command button
-Name: cmdCalculate

Add this whole code into your project:

Code:
'Developed by Blupig. Please give credit if you use this in your programs.

Option Explicit
Dim FullNum As Double
Dim RoundNum As Double


Private Sub Calculation()

    FullNum = (CDbl(txtMinimum.Text) + CDbl(txtMaximum.Text)) / 2 / CDbl(txtSpeed.Text)

        RoundNum = Round(FullNum, 1)

    txtDPS.Text = RoundNum

End Sub


Private Sub cmdCalculate_Click()

    Calculation

End Sub


Private Sub txtMaximum_Change()

    If txtMaximum.Text < txtMinimum.Text Then
    
        MsgBox "Your minimum weapon damage is higher than your maximum damage. Please change it.", vbExclamation, "Error"
            
            txtMaximum.SetFocus
        
        Exit Sub
    
    End If

End Sub

Basically, this code calculates the average of both the minimum and maximum damages of the weapon, then divides them by the speed to obtain how much damage the weapon would cause each second.

If you use this in your programs, please give credit!
 
Runescape Gamblingrunescape gambling
Back
Top