willunited Posted January 17, 2013 Author Share Posted January 17, 2013 I put on spellrec:Multiplier as long,but i can't put points,example:If i put in txtbox 1.5,he turns into 15…If i put Multiplier As String the server stop... Link to comment Share on other sites More sharing options...
Growlith1223 Posted January 17, 2013 Share Posted January 17, 2013 Multplier As DoubleThat should work. Link to comment Share on other sites More sharing options...
willunited Posted January 17, 2013 Author Share Posted January 17, 2013 > Multplier As Double> > That should work.Doesn't =\ Link to comment Share on other sites More sharing options...
Growlith1223 Posted January 18, 2013 Share Posted January 18, 2013 If this is for levels, that's why. Levels Are a Long.If not then what are you trying to do…? Link to comment Share on other sites More sharing options...
willunited Posted January 18, 2013 Author Share Posted January 18, 2013 Public Function GetSpellBaseStat(ByVal index As Long, ByVal SpellNum As Long) As LongIf SpellNum > 0 ThenIf Map(index).Moral = 0 ThenSelect Case Spell(SpellNum).BaseStatCase 0GetSpellBaseStat = Spell(SpellNum).Vital + GetPlayerDamage(index)Case 1GetSpellBaseStat = GetPlayerStat(index, Stats.strength) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 2GetSpellBaseStat = GetPlayerStat(index, Stats.intelligence) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).VitalCase 3GetSpellBaseStat = GetPlayerStat(index, Stats.Agility) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 4GetSpellBaseStat = GetPlayerStat(index, Stats.Endurance) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 5GetSpellBaseStat = GetPlayerStat(index, Stats.Willpower) * Spell(SpellNum).PvPMultiplier + Spell(SpellNum).VitalEnd SelectEnd IfEnd IfIf SpellNum > 0 ThenIf Map(index).Moral = 1 ThenSelect Case Spell(SpellNum).BaseStatCase 0GetSpellBaseStat = Spell(SpellNum).Vital + GetPlayerDamage(index)Case 1GetSpellBaseStat = GetPlayerStat(index, Stats.strength) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 2GetSpellBaseStat = GetPlayerStat(index, Stats.intelligence) * Spell(SpellNum).Multiplier + Spell(SpellNum).VitalCase 3GetSpellBaseStat = GetPlayerStat(index, Stats.Agility) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 4GetSpellBaseStat = GetPlayerStat(index, Stats.Endurance) * Spell(SpellNum).Multiplier + Spell(SpellNum).Vital + GetPlayerDamage(index)Case 5GetSpellBaseStat = GetPlayerStat(index, Stats.Willpower) * Spell(SpellNum).Multiplier + Spell(SpellNum).VitalEnd SelectEnd IfEnd IfEnd Function Link to comment Share on other sites More sharing options...
DeathKnight Posted January 18, 2013 Share Posted January 18, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now