Citizens equip hats

Discussion in 'Skript' started by meneertimmy, Mar 18, 2017.

Thread Status:
Not open for further replies.
  1. I'm using 3D models on my server with damaged item varients so for example I created a hat with as item wooden_hoe:12. I want to equip this to the head of a Citizens npc but there's no command for that.

    I've seen that there is a posibility with the SkRayFall for Skript but when i try this nothing works:
    command /equiphat:
    equip citizen 0 with wooden hoe

    Is there any posibility to get this working?
  2. You'll need Denizen for this:
    Found two pieces here, which might be useful. You might want to check them out on the page, since the tables I copypasta from aren't to good for the readability.

    This one is obviously for playerheads only:
    Code (Text):
    Group    entity
    Name    head
    Syntax    - head (<entity>|...) [skin:<player_name>]
    Short Description    Makes players or NPCs wear a specific player's head.
    Author    David Cernat
    Stability    stable
    Full Description    Equips a player's head onto the player(s) or npc(s) specified. If no player or npc is specified, it defaults
    to the player attached to the script queue. It accepts a single entity or list of entities.
    But this one might work fine, with <npc> as entity:
    Code (Text):
    Group    entity
    Name    equip
    Syntax    - equip (<entity>|...) (hand:<item>) (offhand:<item>) (head:<item>) (chest:<item>) (legs:<item>) (boots:<item>) (saddle:<item>) (horse_armor:<item>)
    Short Description    Equips items and armor on a list of entities.
    Author    David Cernat
    Stability    stable
    Full Description    This command equips an item or armor to an entity or list of entities to the specified slot(s).
    Set the item to '[email protected]' to unequip any slot.

    Related Tags    <[email protected]>

    » Use to equip a stone block on the player's head.
    - equip <player> head:[email protected]

    » Use to equip a iron helmet on two players named Bob and Steve.
    - equip [email protected]|[email protected] head:[email protected]_helmet

    » Use to unequip all armor off the player.
    - equip <player> head:[email protected] chest:[email protected] legs:[email protected] boots:[email protected]

    » Use to equip a saddle on a horse.
    - equip [email protected] saddle:[email protected]

    » Use to equip a saddle on a pig.
    - equip [email protected] saddle:[email protected]
    With this and some other tags you can put together:
    /ex equip head:sign (if your item was a sign e.g.) or:
    /ex equip head:<player.item_in_hand> (if you want the stuff in your hand to be equipped)

    Do these while the NPC in question is selected, otherwise add the correlating entity-ID for the NPC to the command. /ex is btw. the command to execute any denizen script command ingame.
    (And the reason why everyone with denizen.* has basically op)
    #2 SilberRegen, Mar 18, 2017
    Last edited: Mar 18, 2017
  3. The reason it probably isn't working as the hat needs to be a block not an item. If you have essentials, if you do /hat with an item, you cannot see the hat since you cannot equip items. You can only equip blocks.
  4. That's not correct, you can equip any item if you have a plugin, which supports it in it's command.
    Not every item get's displayed though, but the modified hoe he talked about should work fine.
    #4 SilberRegen, Mar 18, 2017
    Last edited: Mar 18, 2017
  5. Hmm, I have no idea then.

  6. I'm using the Denizen plugin now so everything is working! :)
    Thanks you!
Thread Status:
Not open for further replies.