Solved If Dog Dies

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

Status
Not open for further replies.

HiddenDev

Member
Sep 19, 2017
43
2
0
21
Hey, I am making pets that follow you around for my server. You do a command to spawn your pet wolf and it tames it for you. I want it to set {dogpet.%player%} to false if your dog dies. With the death effect. Does anyone have any idea on how it could be done.

Thanks.
 
Hey, I am making pets that follow you around for my server. You do a command to spawn your pet wolf and it tames it for you. I want it to set {dogpet.%player%} to false if your dog dies. With the death effect. Does anyone have any idea on how it could be done.

Thanks.

Requires: skstuff
code_language.skript:
on death of wolf:
    set {_uuid} to tag "OwnerUUID" of nbt of victim
    if {_uuid} is set:
        set {dogpet::%{_uuid}%} to false
    
    
command /wolf:
    trigger:
        spawn a wolf at player
        add "{Owner:%player%,OwnerUUID:%uuid of player%}" to nbt of last spawned entity
        set {dogpet::%uuid of player%} to true
 
Status
Not open for further replies.