Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub elo()
- Dim crit_chance As Double
- Dim crit_dmg As Double
- Dim lifesteal As Double
- Dim lifesteal_tab(1 To 30) As Double
- Dim lifesteal_sum As Double
- Dim wp As Double
- Dim dmg_stacks As Double
- Dim pierce As Double
- Dim pierce1 As Double
- Dim shred As Double
- Dim shred1 As Double
- Dim shred_tab(1 To 30) As Double
- Dim tb1 As Double
- Dim tb_tab(1 To 30) As Double
- Dim tb_timer As Double
- Dim bp_type As Double
- Dim bp_tab(1 To 50) As Double
- Dim basearmor As Double
- Dim item(1 To 6) As Double
- Dim dmg(1 To 30) As Double
- Dim index As Double
- Dim sum_dmg As Double
- Dim attack_cd As Double
- Dim attack_speed As Double
- Dim basic_speed As Double
- Dim speed_tab(1 To 30) As Double
- Dim cost As Double
- Dim a As Byte
- Dim armor(1 To 30) As Double
- crit_dmg = 1.5
- crit_chance = 0
- lifesteal = 0
- pierce = 0
- shred = 0
- lifesteal_sum = 0
- cost = 0
- wp = InputBox("DEFINE HERO'S BASIC WEAPON DAMAGE" & vbNewLine & "(lvl 12 average is 143)")
- basearmor = InputBox("DEFINE ENEMY'S ARMOR:" & vbNewLine & "" & vbNewLine & "Average level 12 without items: 86" & vbNewLine & "Average level 12 with Aegis/MJ: 286" & vbNewLine & "Joule lvl 12 (front) with Aegis/MJ/FoR: 464")
- attack_speed = InputBox("DEFINE HERO'S ATTACK SPEED" & vbNewLine & "(lvl 12 average is 1.26)")
- basic_speed = InputBox("DEFINE HERO'S BASIC ATTACK COOLDOWN" & vbNewLine & "(time between two constructive attacks for lvl 1 hero - usually 1.3 sec)")
- a = InputBox("How many WP items do you want to have?" & vbNewLine & "(1 - 6)")
- pierce1 = 0
- tb1 = 0
- stacks1 = 0
- shred1 = 0
- bp1 = 0
- sum_dmg = 0
- For i = 1 To a
- item(i) = InputBox("Tornado Trigger=1" & vbNewLine & "Tyrant's Monocle=2" & vbNewLine & "Poisoned Shiv=3" & vbNewLine & "Sorrowblade=4" & vbNewLine & "Breaking Point=5" & vbNewLine & "Bonesaw=6" & vbNewLine & "Tension Bow=7" & vbNewLine & "Serpent Mask=8" & vbNewLine & "Spellsword=9" & vbNewLine & "Blazing Salvo=10" & vbNewLine & "Heavy Steel=11" & vbNewLine & "Lucky Strike=12" & vbNewLine & "Piercing Spear=13" & vbNewLine & "Six Sins=14" & vbNewLine & "Book of Eulogies=15" & vbNewLine & "Minion's Foot=16" & vbNewLine & "Swift Shooter=17" & vbNewLine & "Weapon Blade=18" & "Spellsword=19")
- Next i
- For i = 1 To a
- If item(i) = 1 Then
- attack_speed = attack_speed + 0.4
- crit_chance = crit_chance + 0.35
- crit_dmg = crit_dmg + 0.05
- cost = cost + 2800
- End If
- If item(i) = 2 Then
- wp = wp + 50
- crit_chance = crit_chance + 0.35
- crit_dmg = crit_dmg + 0.15
- cost = cost + 2900
- End If
- If item(i) = 3 Then
- attack_speed = attack_speed + 0.25
- wp = wp + 30
- If lifesteal < 0.1 Then
- lifesteal = 0.1
- End If
- cost = cost + 2250
- End If
- If item(i) = 4 Then
- wp = wp + 150
- cost = cost + 3100
- End If
- If item(i) = 5 Then
- attack_speed = attack_speed + 0.2
- wp = wp + 50
- cost = cost + 2700
- bp1 = 1
- bp_type = InputBox("Breaking Point type 1=melee, 2=ranged")
- If bp_type = 1 Then
- For j = 2 To 35
- bp_tab(1) = 100
- bp_tab(j) = bp_tab(j - 1) + 100 + 5 * (j - 1)
- Next j
- For j = 36 To 50
- bp_tab(j) = bp_tab(j - 1)
- Next j
- End If
- If bp_type = 2 Then
- For k = 2 To 35
- bp_tab(1) = 100
- bp_tab(k) = bp_tab(k - 1) + 100 + 10 * (k - 1)
- Next k
- For k = 36 To 50
- bp_tab(k) = bp_tab(k - 1)
- Next k
- End If
- End If
- If item(i) = 6 Then
- attack_speed = attack_speed + 0.2
- wp = wp + 40
- If pierce < 0.2 Then
- pierce = 0.2
- End If
- pierce1 = 1
- shred1 = 1
- cost = cost + 2700
- End If
- If item(i) = 7 Then
- If pierce < 0.1 Then
- pierce = 0.35
- End If
- wp = wp + 50
- tb1 = 1
- cost = cost + 2700
- pierce1 = 1
- End If
- If item(i) = 8 Then
- If lifesteal < 0.4 Then
- lifesteal = 0.4
- End If
- wp = wp + 60
- cost = cost + 2800
- End If
- If item(i) = 9 Then
- wp = wp + 85
- cost = cost + 2800
- End If
- If item(i) = 10 Then
- If lifesteal < 0.08 Then
- lifesteal = 0.08
- End If
- wp = wp + 12
- cost = cost + 800
- End If
- If item(i) = 10 Then
- attack_speed = attack_speed + 0.2
- cost = cost + 700
- End If
- If item(i) = 11 Then
- wp = wp + 55
- cost = cost + 1150
- End If
- If item(i) = 12 Then
- crit_dmg = crit_dmg + 0.08
- crit_chance = crit_chance + 0.2
- cost = cost + 900
- End If
- If item(i) = 13 Then
- If pierce < 0.1 Then
- pierce = 0.1
- End If
- cost = cost + 900
- wp = wp + 15
- pierce1 = 1
- End If
- If item(i) = 14 Then
- wp = wp + 30
- cost = cost + 650
- End If
- If item(i) = 15 Then
- wp = wp + 5
- If lifsteal < 0.04 Then
- lifesteal = 0.04
- End If
- cost = cost + 300
- End If
- If item(i) = 16 Then
- crit_chance = crit_chance + 0.1
- crit_dmg = crit_dmg + 0.1
- cost = cost + 300
- End If
- If item(i) = 17 Then
- attack_speed = attack_speed + 0.1
- cost = cost + 300
- End If
- If item(i) = 18 Then
- wp = wp + 15
- cost = cost + 300
- End If
- If item(i) = 19 Then
- wp = wp + 110
- cost = cost + 2600
- End If
- Next i
- '----------------------------------Other-----------------------------------------
- If crit_chance > 1 Then
- crit_chance = 1
- End If
- If shred1 = 1 Then
- shred = 0.1
- End If
- Cells(33, 2) = wp
- Cells(34, 2) = attack_speed
- Cells(35, 2) = crit_chance
- Cells(36, 2) = crit_dmg
- Cells(37, 2) = lifesteal
- Cells(38, 2) = pierce
- Cells(40, 2) = cost
- '----------------------------------DAMAGE CALCULATION-----------------------------------
- '----------------------------------ATTACK SPEED-----------------------------------------
- attack_cd = basic_speed / attack_speed
- attack_cd = 0.85
- For i = 1 To 30
- speed_tab(i) = (i - 1) * attack_cd
- Next i
- For i = 1 To 30
- Cells(i + 1, 2) = speed_tab(i)
- Next i
- dmg_stacks = 0
- tb_timer = 0
- For i = 1 To 30
- Cells(i + 1, 1) = i
- Next i
- '----------------------------------BONESAW CALCULATION---------------------------------CHYBA NIEPOTRZEBNE
- For i = 1 To 7
- shred_tab(i) = 0.05 * i * shred1
- Next i
- For i = 8 To 30
- shred_tab(i) = 0.4 * shred1
- Next i
- For i = 1 To 30
- Cells(i + 1, 6) = shred_tab(i)
- Next i
- '----------------------------------ARMOR SHRED/PIERCE-----------------------------------
- If pierce1 = 1 And shred1 = 1 Then
- armor(1) = basearmor - basearmor * pierce
- For i = 2 To 9
- armor(i) = armor(i - 1) - armor(i - 1) * shred
- Next i
- For i = 10 To 30
- armor(i) = armor(i - 1)
- Next i
- End If
- If pierce1 = 1 And shred1 = 0 Then
- For i = 1 To 30
- armor(i) = basearmor - basearmor * pierce
- Next i
- End If
- If pierce1 = 0 Then
- For i = 1 To 30
- armor(i) = basearmor
- Next i
- End If
- For i = 1 To 30
- Cells(i + 1, 10) = armor(i)
- Next i
- '----------------------------------DAMAGE FORMULA-------------------------------------
- For n = 0 To 50
- If tb_timer <= 0 Then
- dmg(n + 1) = ((crit_chance * crit_dmg * (wp + dmg_stacks * bp1 + 180 * tb1)) / (1 + (armor(n + 1) / 100)) + (1 - crit_chance) * (wp + dmg_stacks * bp1 + 180 * tb1) / (1 + (armor(n + 1) / 100)))
- tb_timer = 6
- Else
- dmg(n + 1) = ((crit_chance * crit_dmg * (wp + dmg_stacks * bp1)) / (1 + (armor(n + 1) / 100)) + (1 - crit_chance) * (wp + dmg_stacks * bp1) / (1 + (armor(n + 1) / 100)))
- End If
- lifesteal_tab(n + 1) = dmg(n + 1) * lifesteal
- Cells(n + 2, 7) = lifesteal_tab(n + 1)
- Cells(n + 2, 3) = dmg(n + 1)
- lifesteal_sum = lifesteal_sum + lifesteal_tab(n + 1)
- Cells(n + 2, 8) = lifesteal_sum
- dmg_stacks = 0
- sum_dmg = sum_dmg + dmg(n + 1)
- Cells(n + 2, 4) = sum_dmg
- For m = 1 To 35
- If sum_dmg > bp_tab(m) Then
- index = m
- End If
- Next m
- dmg_stacks = index * 5
- Cells(n + 2, 5) = index * bp1
- tb_timer = tb_timer - attack_cd
- Next n
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement