Discord Thread Custom Armor Effect

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

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
code_language.skript:
applescript
on player move:
  if wearing armor: # Replace this with your check if the player's is wearing that armor
    set {_block} to block 1 below location of player
    set block 1 below location of player to yellow concrete
    wait 3 seconds
    set block 1 below location of player to {_block}
Prob something like this? Maybe need to edit it so it doesn't place in the air for example

Posted by: mnrkaas from the skUnity Discord.
 
--------------------------------------------------------------------------------------------------

Well I succeeded but I would like to do something more optimized and which does not leave blocks of Yellow Terracotta
Here is the code :

code_language.skript:
options:
    head-golden_dawn: {SkullOwner:{Id:[I;1182945815,391332355,-1340799932,119225895],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODNmNjllZjI3ZjMxMjBhNTEwNTBlNmJlNjZhMGUzZjhlODlhZjg4OGQ0ODA2NzE2YmY4NmY1OTBkYTYzODMxNyJ9fX0=""}]}}}

    logo: &8▏ &d&lCOSMETIQUES &8-

command /suits [<text>]:
    trigger:
        if arg-1 is set:
            if arg-1 is "off":
                set helmet of player to air
                set chestplate of player to air
                set leggings of player to air
                set boots of player to air
                send "{@logo} &fVous avez &cdésactivé &fvotre cosplay." to player
                stop
            if arg-1 is "golden_dawn":
                set {_h} to player head with nbt "{@head-golden_dawn}" named "&e&lAube dorée&r &8(&bCasque&8)"
                set helmet of player to {_h}
                set chestplate of player to leather chestplate named "&e&lAube dorée&r &8(&bPlastron&8)"
                set leggings of player to leather leggings named "&e&lAube dorée&r &8(&bPantalon&8)"
                set boots of player to leather boots named "&e&lAube dorée&r &8(&bBottes&8)"
                dye player's chestplate (254, 221, 87)
                dye player's leggings (254, 221, 87)
                dye player's boots (254, 221, 87)
                send "{@logo} &fVous avez &aactivé &fvotre cosplay nommé ""&e&lAube dorée&r&f""." to player
                stop

function getNumber(int: text) :: integer:
    if {_int} contains ".":
        set {_spl::*} to {_int} split at "."
        set {_int} to "%{_spl::1}%"
    set {_int} to "%{_int}%" parsed as integer
    return {_int}

on any move:
    if helmet of player = player head named "&e&lAube dorée&r &8(&bCasque&8)":
        if chestplate of player = leather chestplate named "&e&lAube dorée&r &8(&bPlastron&8)":
            if leggings of player = leather leggings named "&e&lAube dorée&r &8(&bPantalon&8)":
                if boots of player = leather boots named "&e&lAube dorée&r &8(&bBottes&8)":
                    if player has permission "haifunime.subscription.subcribed":
                        if block under the player is solid:
                            if block under the player isn't any slab:
                                set {_x} to getNumber("%x-coord of player%")
                                set {_y} to getNumber("%y-coord of player%")
                                set {_z} to getNumber("%z-coord of player%")
                                if {t::move-block::%{_x}%::%{_y}%::%{_z}%} is not set:
                                    set {t::move-block::%{_x}%::%{_y}%::%{_z}%} to true
                                    set {_loc} to location of block under player
                                    set {_i} to type of block at {_loc}
                                    set block at {_loc} to yellow concrete
                                    wait 3 seconds
                                    set block at {_loc} to {_i}
                                    delete {t::move-block::%{_x}%::%{_y}%::%{_z}%}


Posted by: asano_senpai from the skUnity Discord.
 
Status
Not open for further replies.