Suit

  • 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!

Status
Not open for further replies.

skanto123

Active Member
Jan 8, 2018
70
0
0
34
How do I make it so if a player is wearing diamond armor on all 4 armor slots and the all the armor pieces contain the lore "suit1" when that player kills a mob it multiplies the xp by 2x and same thing but if the armor has the lore "suit2" it reduces damage taken by 35%
 
Something like this belongs in requests.
If you had something like how to check if a player is wearing full diamond this would be the right place, but not this in its entirety.
 
How do I make it so if a player is wearing diamond armor on all 4 armor slots and the all the armor pieces contain the lore "suit1" when that player kills a mob it multiplies the xp by 2x and same thing but if the armor has the lore "suit2" it reduces damage taken by 35%
1. You probably know
2. Here is it:
code_language.skript:
options:
    LoreSRD: &a&lSuit 2  # Lore suit reduces damage
    PercentTA: 35 # Percentage is taken away

function Percent(p: player):
    set {SubtractDamage.%{_p}%} to {damageTake.%{_p}%}
    set {SubtractDamage.%{_p}%} to {SubtractDamage.%{_p}%}*{@PercentTA}
    set {SubtractDamage.%{_p}%} to {SubtractDamage.%{_p}%}/100
    set {damageTake.%{_p}%} to {damageTake.%{_p}%}-{SubtractDamage.%{_p}%}
    round({damageTake.%{_p}%})

function CheckSuit(p: player):
    if {_p}'s helm is diamond helmet:
        if {_p}'s helmet's lore is "{@LoreSRD}":
            if {_p}'s chestplate is diamond chestplate:
                if {_p}'s chestplate's lore is "{@LoreSRD}":
                    if {_p}'s leggings is diamond leggings:
                        if {_p}'s leggings's lore is "{@LoreSRD}":
                            if {_p}'s boots is diamond boots:
                                if {_p}'s boots's lore is "{@LoreSRD}":
                                    Percent({_p})

on damage of player:
    set {damageTake.%victim%} to damage
    CheckSuit(victim)
    set damage to {damageTake.%victim%}

I feel like solving your problems makes me smarter haha...
 
Status
Not open for further replies.