THEMUD - Critical Hits 
10 comments Howdy!
I'm presenting a new script, that is, critical hits/strike. If you don't know what a critical hit/strike is, do you even into games br0? Basically, a critical hit/strike is a hit that deals massively more damage than a normal one upon a particular criterion and formula.
I was capable of finishing the script 2 days ago, but unfortunately time was not with my side (f u c c T i m e) and errors kept occurring repetitively.
Also, the code has every bit of it commented so, hopefully, there will not be anything vague.
The critical hits/strike formula
It's very unambiguous and explicitly clear to comprehend.
The raw damage of a bullet multiplied by the sum of the base critical multiplier and the lucky critical addition subtracted by the armor reduction, is conserved in a variable and added to the main damage, that is, the bullet's damage.
For instance, you are carrying a USP that deals 12 damage. So the critical hit/strike damage would be as follows:
Where 1.5 (150%) is the base critical multiplier, 0.5 (50%, assuming it is randomly 50%) is the lucky critical addition and the second 0.5 is the armor reduction (the armor of the player, assuming he has 50% armor). So we would end up with 18 damage, adding 18 to the main damage (12) equals 30.
By the way, if the player has armor the damage of the critical hit/strike will be apportioned to the health by 60% and to the armor by 40%.
Copyright license
You can use, edit and maintain the file. You can also upload the file to other websites with the consultation of me.
Credits
I would thank @
Tajifun for his awesome blood sprite that appended a ring of fun to my script.
If you found any bugs or you have suggestions to suggest, feel free to post them down below. Thanks!
I'm presenting a new script, that is, critical hits/strike. If you don't know what a critical hit/strike is, do you even into games br0? Basically, a critical hit/strike is a hit that deals massively more damage than a normal one upon a particular criterion and formula.
I was capable of finishing the script 2 days ago, but unfortunately time was not with my side (f u c c T i m e) and errors kept occurring repetitively.
Also, the code has every bit of it commented so, hopefully, there will not be anything vague.

It's very unambiguous and explicitly clear to comprehend.
The raw damage of a bullet multiplied by the sum of the base critical multiplier and the lucky critical addition subtracted by the armor reduction, is conserved in a variable and added to the main damage, that is, the bullet's damage.
For instance, you are carrying a USP that deals 12 damage. So the critical hit/strike damage would be as follows:
12 * ((1.5 + 0.5) - 0.5)
Where 1.5 (150%) is the base critical multiplier, 0.5 (50%, assuming it is randomly 50%) is the lucky critical addition and the second 0.5 is the armor reduction (the armor of the player, assuming he has 50% armor). So we would end up with 18 damage, adding 18 to the main damage (12) equals 30.
By the way, if the player has armor the damage of the critical hit/strike will be apportioned to the health by 60% and to the armor by 40%.

You can use, edit and maintain the file. You can also upload the file to other websites with the consultation of me.

I would thank @

If you found any bugs or you have suggestions to suggest, feel free to post them down below. Thanks!
edited 1×, last 24.08.17 10:30:17 am

Comments
10 comments



Log in!
You need to log in to be able to write comments!Log in

Thumbs up for the script. One thing the script needs is the proper code indentation, editing a un-tabbed code for personal use is a lot harder and barely understandable.
Hint: If you're using Sublime Text/Notepad++, use spaces for indentation instead of tabs. For some odd reason, Unreal Software website screws the code's indentation if done with tabs.
Hint: If you're using Sublime Text/Notepad++, use spaces for indentation instead of tabs. For some odd reason, Unreal Software website screws the code's indentation if done with tabs.
@
xsiN: I believe the image is good enough, but the screen shot was taken after the shoot by, approximately, 0.5 seconds. As an evidence, the bullet that hit the player has no trail.
@
_Yank: Welp... let's say that I tried to teach beginners how to install a script. hehexd
@
Talented Doge: Nice idea. But after being damaged by a harmful hit, a deceleration would be way too powerful.
Anyways, thanks so much for the feedback guys!

@

@

Anyways, thanks so much for the feedback guys!

Yo, Themud!
A very interesting idea, as always from your side!
I like the script. Hope to see more of your uploads
pal.
A very interesting idea, as always from your side!
I like the script. Hope to see more of your uploads
pal.

I can't check the script itself but thumbs up for the idea and description. Imma check it laters but here's the like as I'm pretty sure it will be good.
You could set the script to be installed by the autorun way though.
You could set the script to be installed by the autorun way though.



