Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Little Help here plox


willunited
 Share

Recommended Posts

Public Function GetSpellBaseStat(ByVal index As Long, ByVal SpellNum As Long) As Long

If SpellNum > 0 Then

If Map(index).Moral = 0 Then

Select Case Spell(SpellNum).BaseStat

Case 0

GetSpellBaseStat = Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 1

GetSpellBaseStat = GetPlayerStat(index, Stats.strength) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 2

GetSpellBaseStat = GetPlayerStat(index, Stats.intelligence) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital

Case 3

GetSpellBaseStat = GetPlayerStat(index, Stats.Agility) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 4

GetSpellBaseStat = GetPlayerStat(index, Stats.Endurance) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 5

GetSpellBaseStat = GetPlayerStat(index, Stats.Willpower) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital

End Select

End If

End If

If SpellNum > 0 Then

If Map(index).Moral = 1 Then

Select Case Spell(SpellNum).BaseStat

Case 0

GetSpellBaseStat = Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 1

GetSpellBaseStat = GetPlayerStat(index, Stats.strength) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 2

GetSpellBaseStat = GetPlayerStat(index, Stats.intelligence) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital

Case 3

GetSpellBaseStat = GetPlayerStat(index, Stats.Agility) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 4

GetSpellBaseStat = GetPlayerStat(index, Stats.Endurance) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)

Case 5

GetSpellBaseStat = GetPlayerStat(index, Stats.Willpower) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital

End Select

End If

End If

End Function
Link to comment
Share on other sites

if it is saving it as a whole number, just change it to

(Spell(SpellNum).Multiplier)/10) saving it as a double should work, since it allows decimals, but at the same time it eats more memory (a double is 8 bytes, if you aren't going to go over a multiplier of 25.5, just use a byte and its only, well, a byte).
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...