• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Feb 19, 2024
10
0
1
23
Hi my name is Shadow and I am currently experiencing an issue with the max minecraft enchantment level for sharpness and protection.
The problem is that sharpness 25 will do the same damage as any sharpness above it and I want a skript to fix that and the same thing is for protection 25 and above, anything above protection 25 will only reduce the damage the same amount as a protection 25 item will. I've tried writing a skript to fix this but none of them work. Could anyone provide me with a skript to fix this?
 
Hi my name is Shadow and I am currently experiencing an issue with the max minecraft enchantment level for sharpness and protection.
The problem is that sharpness 25 will do the same damage as any sharpness above it and I want a skript to fix that and the same thing is for protection 25 and above, anything above protection 25 will only reduce the damage the same amount as a protection 25 item will. I've tried writing a skript to fix this but none of them work. Could anyone provide me with a skript to fix this?
Behold, a piece of code I used for my server. This code is not an immediate fix to your problem but should lead you to the right direction! It sets a custom damage regardless of the weapon used. I'll leave it to you to add conditional statements that will make the damage be much greater/lower depending on the attacker's tool enchants (That should be a hint as to where to start!)
Code:
on damage:
    if attacker is a player:
        cancel event
        set {_dam} to 5
        damage victim by {_dam} hearts
 
But that doesn't help with the protection because regardless of the protection level it'll still damage the same amount of hearts to the victim.
 
Protection effectively only go up to level 10. Meaning that they can only reduce 40% of damage.