Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.51 KB | None | 0 0
  1. Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
  2.         Dim intLvl As Integer = txtLevel.Text
  3.         Dim intHP As Integer = txtHP.Text
  4.         Dim intAtk As Integer = txtAtk.Text
  5.         Dim intDef As Integer = txtDef.Text
  6.         Dim intSpecialAttack As Integer = txtSpecialAttack.Text
  7.         Dim intSpecialDefense As Integer = txtSpecialDefense.Text
  8.         Dim intSpeed As Integer = txtSpeed.Text
  9.         Dim lblHP As Integer
  10.         Dim lblAtk As Integer
  11.         Dim lblDef As Integer
  12.         Dim lblSpecialDefense As Integer
  13.         Dim lblSpecialAttack As Integer
  14.         Dim lblSpeed As Integer
  15.         Dim intStatHP As Integer = txtStatHP.Text
  16.         Dim intStatAtk As Integer = txtStatAtk.Text
  17.         Dim intStatDef As Integer = txtStatDef.Text
  18.         Dim intStatSpecialDefense As Integer = txtStatSpecialAttack.Text
  19.         Dim intStatSpecialAttack As Integer = txtStatSpecialAttack.Text
  20.         Dim intStatSpeed As Integer = txtStatSpeed.Text
  21.         'Check for invalid IVs
  22.         'COPYRIGHT 2011 JAMES GETROST
  23.         If intHP > 32 Then
  24.             If intAtk > 32 Then
  25.                 If intDef > 32 Then
  26.                     If intSpecialAttack > 32 Then
  27.                         If intSpecialDefense > 32 Then
  28.                             If intSpeed > 32 Then
  29.                                 If intStatAtk > 32 Then
  30.                                     If intStatDef > 32 Then
  31.                                         If intStatHP > 32 Then
  32.                                             If intStatSpeed > 32 Then
  33.                                                 If intSpecialAttack > 32 Then
  34.                                                     If intSpecialDefense > 32 Then
  35.                                                         MessageBox.Show("IVs cannot be greater than 31", "Invalid IV")
  36.                                                     Else
  37.                                                     End If
  38.                                                 End If
  39.                                             End If
  40.                                         End If
  41.                                     End If
  42.                                 End If
  43.                             End If
  44.                         End If
  45.                     End If
  46.                 End If
  47.             End If
  48.         End If
  49.         'Used with Permission
  50.         'EOF
  51.  
  52.  
  53.  
  54.  
  55.         'Calculating the HP Stats
  56.         lblHP = (intLvl - 1) * (intHP * intStatHP) + 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement