1. 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!


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Damage Modification

Discussion in 'Skript' started by NeonEthan, Aug 13, 2020.

Thread Status:
Not open for further replies.
  1. NeonEthan

    NeonEthan Member

    Jul 6, 2020
    Likes Received:
    Hi! I'm trying to create a skript which, when wearing a player head, gives the same amount of protection as a diamond helmet. It seems simple and not very long, but I have been unable to figure out how to do so.

    I've been looking for quite awhile now over the forums and other websites, only to come to a dead end. I think it might be possible through Tuske's Damage Modification (https://prnt.sc/tyof5b) but I am confused how to get it to work.

    I have something as simple as this

    on damage:
    if player's helmet is a head:
    clear damage armor
    add 3 to damage armor

    (Sorry, I do not know how to put it in the format of code, but yes my formatting is fine)

    I have Tuske installed, and shows in the plugins list, but it seems like I am doing something wrong. Also, I am very unsure if my code is even close to being right. As of right now, all I want is if a player is wearing a player head, then that head will have the same damage protection as a normal diamond helmet.
    Here is the error: https://prnt.sc/typ2gq

    Thank you!
  2. IDuckz_

    IDuckz_ Active Member

    Jul 25, 2019
    Likes Received:
    You can try doing "set damage to (damage / 2)", this will divide the damage by 2. You can modify it however you like.
  3. Mich

    Mich Active Member

    Jul 15, 2020
    Likes Received:
    Try something like this. I havent test this so let me know
    Code (Text):
    1. on damage of a player:
    2.     victim is wearing an stone block
    3.     set damage to damage - 1 #you can make your ecuation
    4. #another example
    5. on damage of a player:
    6.     if victim is wearing an stone block:
    7.         set damage to damage - 1 #you can make your ecuation
    8.     else if victim is wearing an jungle leaf:
    9.         set damage to damage - .2 #you can make your ecuation
Thread Status:
Not open for further replies.

Share This Page