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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    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.

Solved Set block at (location) to skull? Can't find way to do this.

Discussion in 'Skript' started by uGim, Jan 27, 2018.

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

    uGim Member

    Joined:
    Jan 19, 2018
    Messages:
    25
    Likes Received:
    0
    So this is the code:

    on place of head:
    wait 4 seconds
    set block at event-location to player's skull

    I have also tried some other ways to do this like:

    set block at event-location to skull of player
    set block at event-location to ("%player%" parsed as offline player)'s skull
     
  2. Dan

    Dan Member

    Joined:
    Jan 26, 2017
    Messages:
    17
    Likes Received:
    2
    Try:

    Code (Skript):
    1. on place of head:
    2.     wait 4 seconds
    3.     set block at event-location to event-player's skull
     
  3. uGim

    uGim Member

    Joined:
    Jan 19, 2018
    Messages:
    25
    Likes Received:
    0
    No errors but does not do it :/
     
  4. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
  5. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    Code (Skript):
    1. on script load:
    2.   import "org.bukkit.SkullType"
    3. effect place skull of %player% at %locations%:
    4.   loop expressions 2:
    5.     set {_block} to loop-value.getBlock()
    6.     set block at {_block} to floor head
    7.     set {_state} to {_block}.getState()
    8.     {_state}.setSkullType({SkullType}.PLAYER!);
    9.     {_state}.setOwner("%expression 1%");
    10.     {_state}.update();
    working on 1.8
    Code (Skript):
    1. place skull of the player at location of player
     
  6. uGim

    uGim Member

    Joined:
    Jan 19, 2018
    Messages:
    25
    Likes Received:
    0
    This doesn't work when I do it like so:

    on place of stone:
    if {kitpvp.paa.%uuid of player%} is set:
    effect place skull of player at event-location: <--- there is the point which is not working
    loop expressions 2:
    set {_block} to loop-value.getBlock()
    set block at {_block} to floor head
    set {_state} to {_block}.getState()
    {_state}.setSkullType({SkullType}.PLAYER!);
    {_state}.setOwner("%expression 1%");
    {_state}.update();

    Error says: "Cannot understand this condition: effect place skull of player at event-location."

    I am newbie when it comes to skripting and I would really like to know what those last 3 lines even do (because I don't think that is skript). I have never met such a things in skript. If possbile, could someone do a command that would place event-players head at location of placed block. I have searched and searched but I think I am too stupid for things like "{_state}.setSkullType({SkullType}.PLAYER!);" <--- seems like alien language to me.
    --- Double Post Merged, Jan 28, 2018, Original Post Date: Jan 28, 2018 ---
    This also doesn't work, it only DROPS the head of the player at location of player.
     
  7. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    that was an example of how to use that. it's an addon called skript-mirror that uses
     
  8. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    Any way to get this to work with heads of offline players either using their uuid or username? I would love to get a head leaderboard going
     
  9. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    just change it to offline player and it should still work fine
     
    • Like Like x 1
  10. uGim

    uGim Member

    Joined:
    Jan 19, 2018
    Messages:
    25
    Likes Received:
    0
    I have skript-mirror but it wont work.
    --- Double Post Merged, Jan 30, 2018, Original Post Date: Jan 30, 2018 ---
    If I would be possible, could you make me a command which would place skull of player at location of player because none of the tips located up there don't work.

    like this:

    command /setskull:
    set skull of player at location of player
    --- Double Post Merged, Jan 30, 2018 ---
    Nvm sorry for spamming here and I found the way by my self:

    Code (Skript):
    1. command /setskull:
    2.     trigger:
    3.         set block at location of player to head
    4.         set {_l} to location of player
    5.         set {_s} to {_l}.getBlock().getState()
    6.         {_s}.setOwner("%player%")
    7.         {_s}.update()
     
  11. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,236
    Likes Received:
    176
    Medals:
    Code (Skript):
    1. #put this in a script called "!!!syntaxes.sk"
    2. get blocks property skull owner:
    3.  
    4.   loop expressions-1:
    5.     set {_state} to loop-value.getState()
    6.     add {_state}.getOwningPlayer() to {_output::*}
    7.  
    8.   continue returning {_output::*}
    9.  
    10. change blocks property skull owner:
    11.  
    12.   loop expressions-1:
    13.     set {_state} to loop-value.getState()
    14.     {_state}.setOwningPlayer(("%change value%") parsed as offline player)
    15.     {_state}.update()
    16.  
    17. #Examples
    18. set skull owner of event-block to "Rikka"
    19.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...