Sign in to follow this  
Followers 0
Rad

Little bit of math help

4 posts in this topic

#1 ·  Posted (edited)

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:

Min: int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4))

Max: int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

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

Edited by Rad

Share this post


Link to post
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:

Min: int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4))

Max: int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

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

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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 this post


Link to post
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...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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
Sign in to follow this  
Followers 0