# Little bit of math help

## Recommended Posts

Damage calculator, positive armor reduces damage. I use this line:

`GUICtrlSetData(\$dmg_optionlabel9,  int(GUICtrlRead(\$dmg_mininput) * StringMid(\$type_value,1,4)) & " - " &  int(GUICtrlRead(\$dmg_maxinput) * StringMid(\$type_value,1,4)))`

dmgoptionlabel9 is one of my eight damage-types. Each shows min-max display. StringMid looks like this: "1.00,1.50,1.00,0.50,0.75...".

Now armor should decrease damage taken (The number shown) using this equation:

((\$armor)*0.06)/(1+0.06*(\$armor)) ...

How would I apply this section to slightly reduce the damage? Here Ill break the math into parts:

EDIT~Curse me solving things on my own after 10 minutes of frustration, I forgot to quote the numbers "like this"

##### Share on other sites

Damage calculator, positive armor reduces damage. I use this line:

`GUICtrlSetData(\$dmg_optionlabel9,  int(GUICtrlRead(\$dmg_mininput) * StringMid(\$type_value,1,4)) & " - " &  int(GUICtrlRead(\$dmg_maxinput) * StringMid(\$type_value,1,4)))`

dmgoptionlabel9 is one of my eight damage-types. Each shows min-max display. StringMid looks like this: "1.00,1.50,1.00,0.50,0.75...".

Now armor should decrease damage taken (The number shown) using this equation:

((\$armor)*0.06)/(1+0.06*(\$armor)) ...

How would I apply this section to slightly reduce the damage? Here Ill break the math into parts:

EDIT~Curse me solving things on my own after 10 minutes of frustration, I forgot to quote the numbers "like this"

quotes are for strings, shouldn't need them for numbers...

##### Share on other sites

>_>

Well the script ended with an error ... forgot what it says was 4 hours ago. I added quotes and it worked sooo oh well

##### Share on other sites

>_>

Well the script ended with an error ... forgot what it says was 4 hours ago. I added quotes and it worked sooo oh well

well atleast it fixed it, i guess that's the important part...

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...