The code returns with no errors but the player head won't show up

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

Poinapples

Member
Feb 4, 2024
17
0
1
13
code_language.skript:
command /revivebook:
    permission: op
    trigger:
        give a book named "&b&lRevive Book" to player

on death of player:
    remove 1 from {lives.%victim%}
    message "&c-1" to victim
    give a nether star of unbreaking 1 named "&b&lLife Energy" to attacker
    if {lives.%victim%} is 0:
        execute console command "/ban %victim% &cYou have lost all of your lives!"
        broadcast "&c&l%victim% has lost all of thier lives and been deathbanned!"
        add uuid of victim to {bannedplayers::*}
        set {_uuid} to uuid of victim

command /fallen:
    trigger:
        message "%{bannedplayers::*}%" parsed as offline player to player


on right click:
    if event-item is book:
        if name of event-item is "&b&lRevive Book":
            set {Revive::Gui} to a new chest inventory with 6 row with name "&6&lRevive a player"
            set {_s} to 0
            loop {bannedplayers::*}:
                set {_T} to {_uuid} parsed as offline player
                set slot {_s} of {Revive::Gui} to {_uuid}'s skull named "&e%{_T}%"
                add 1 to {_s}
            open {Revive::Gui} to player
            set {reviveselected.%{_uuid}%} to false
            while {reviveselected.%{_uuid}%} is false:
                wait 1 tick





on inventory close:
    if event-inventory's name is "&6&lRevive a player":
        set {Reviving::%uuid of player%} to false



on inventory click:
    if event-inventory's name is "&6&lRevive a player":
        cancel event
        if event-item is player head:
            set {_uuid} to uuid of player
            set {reviving::%{_uuid}%} to true
            set {reviveselected.%{_uuid}%} to true
            close player's inventory
            set {_T} to "%event-item's name%"
            replace all "&e" with "" in {_T}
            replace all "§e" with "" in {_T}
            set {_Tplayer} to "%{_T}%" parsed as offline player
            set {_uuid} to uuid of {_Tplayer}
            remove {_uuid} from {bannedplayers::*}
            
            wait 12 seconds

            set {revived.%uuid of {_T}%} to true

            set {Reviving::%uuid of player%} to false
            set {lives.%{_uuid}%} to 3
            unban {_T}
            broadcast "&a%{_T}% &fwas ressurected"
        
on right click:
    if event-item is nether star:
        if name of event-item is "&b&lLife Energy":
            if {lives.%player%} < 12:
                add 1 to {lives.%player%}
                message "&c+1" to player
                remove 1 of event-item from player
            else:
                message "&4&lYou have reached the maximum amount of lives" to player
command /lives:
    trigger:
        message "&bYou have %{lives.%player%}% lives left" to player
command /givelives:
    permission: op
    trigger:
        give a nether star of unbreaking 1 named "&b&lLife Energy" to player
 
Im not sure if this is the problem you have, but im assuming it is when there is only one mention about skull in this code, then try this:
Code:
skull of "%player%" parsed as offline player named "Something"
 
Im not sure if this is the problem you have, but im assuming it is when there is only one mention about skull in this code, then try this:
Code:
skull of "%player%" parsed as offline player named "Something"
I dont get what you mean. The code is supposed to show an inventory that revives deathbanned people represented by their player heads
 
Okay then, send me the line that should work but doesn't work the way it's supposed to.
 
code_language.skript:
                set slot {_s} of {Revive::Gui} to {_uuid}'s skull named "&e%{_T}%"
Okay then, send me the line that should work but doesn't work the way it's supposed to.
This is supposed to set the slot to the player head.
 
._. i literally sent you the code above, use this:
Code:
set slot {_s} of {Revive::Gui} to skull of "%{_uuid}%" parsed as offline player named "&e%{_T}%"
(if the variable {_uuid} is name, if its uuid then set the uuid to name and put the name there.
 
The player head still hasnt shown up for me
._. i literally sent you the code above, use this:
Code:
set slot {_s} of {Revive::Gui} to skull of "%{_uuid}%" parsed as offline player named "&e%{_T}%"
(if the variable {_uuid} is name, if its uuid then set the uuid to name and put the name there.
 
Then you must have error somewhere else.
I set the uuid to a deathbanned victim so i dont know whats wrong. I changed the item and it showed the item but there were no names and when i clicked one it didnt do what it was supposed to.