Players' corpses.

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

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

FURYbro

Member
Jan 21, 2019
2
0
1
Hi, there was a thread like this one back in 2018.
Basically, I want to create player corpses.
I'm running Spigot 1.12.2, tried creating the corpses with SkRayfall's NPC, but didn't find the sleep expressions.
Skript-NPC addon has the expression, but it's not working.
Skellett's got CorpseReborn hooks, but my skript cant find the expressions.
I somehow managed to get it working with SkRayFall, but It worked for 1 time only, with mixed expressions from various addons. Then I added some more code.. and everything failed.
upload_2021-1-5_12-14-35.png
For some reason my skin changed to some ginger dude.
I also tried to send bed packets to the created citizens, but it also won't work.
Should I just update the plugin? Im running 2.4-b10
If anyone could help I'd be really grateful!

2018 thread: https://forums.skunity.com/threads/making-corpses.4450/
Here's the code:

Code:
command /as: #code back from 2018
    trigger:
        broadcast "%player% died"
        create a citizen named "%player%" at player
        set {NPC.%player%} to last created citizen
        broadcast "%{NPC.%player%}%"
        set {_l} to block 2 below location of player
        set location of {_l} to bed
        make the last citizen sleep
        wait 10 seconds

on right click on entity:
    if clicked entity is a citizen:
        broadcast "ho"
        broadcast "%{id}%"
        broadcast "%{NPC.%player%}%"

command /a1:#Skrayfall
    trigger:
        create a citizen named "%player%" at player
        set {NPC.%player%} to last created citizen id
        set {citi} to citizen {NPC.%player%}
        broadcast "%{NPC.%player%}%"
        make citizen {NPC.%player%} nametag invisible

command /a2:
    trigger:
        execute console command "npc sel %{NPC.%player%}%"
        execute console command "npc rem"

command /b1:#Skript-NPC
    trigger:
        create npc named "Nano" with type player at player's location
        set {id} to the last created citizen
        wait 1 second
        make the last citizen sleep

command /b2:
    trigger:
        destroy citizen {id}
 
Status
Not open for further replies.