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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cats And Dogs

Discussion in 'Snippets' started by ShaneBee, Jan 11, 2019.

  1. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    1,686
    Likes Received:
    118
    Custom effects for spawning cats, with options for names, age, color(style), and owner.
    Requires Skript mirror
    This is the snytax to either put at the top of your script or in another script that loads before the one you are using it with. (Examples below)
    Code (Skript):
    1. import:
    2.     org.bukkit.entity.Ocelot$Type
    3.  
    4. effect:
    5.     patterns:
    6.         spawn [%-integer% of] baby (0¦black|1¦siamese|2¦red|3¦wild|4¦random) cat [named %-string%] [belonging to %-player%] at %location%
    7.         spawn [%-integer% of] [adult] (0¦black|1¦siamese|2¦red|3¦wild|4¦random) cat [named %-string%] [belonging to %-player%] at %location%
    8.     trigger:
    9.         if expression-1 is not set:
    10.             set {_amount} to 1
    11.         else:
    12.             set {_amount} to expression-1
    13.         if matched pattern is 1:
    14.             spawn {_amount} of baby ocelot at expression-4
    15.         else if matched pattern is 2:
    16.             spawn {_amount} of adult ocelot at expression-4
    17.         last spawned ocelot.setTamed(true)
    18.         if parse mark is between 0 and 3:
    19.             set {_type} to Type.values()[parse mark]
    20.         else if parse mark is 4:
    21.             set {_type} to Type.values()[random integer between 0 and 3]
    22.         last spawned ocelot.setCatType({_type})
    23.         if expression-2 is set:
    24.             set name of last spawned ocelot to expression-2
    25.         if expression-3 is set:
    26.             last spawned ocelot.setOwner(expression-3)
    Examples of use:
    Code (Skript):
    1. spawn baby black cat named "pete" at player
    2. spawn 2 of baby siamese cat named "spots" belonging to player at player
    3. spawn adult red cat at player
    4. spawn wild cat named "Whiskers" belonging to arg-1 at arg-1


    Custom effect for spawning dogs, with options for age, name, collar color and owner.
    Requires Skript mirror
    This is the snytax to either put at the top of your script or in another script that loads before the one you are using it with. (Examples below)
    Code (Skript):
    1. import:
    2.     org.bukkit.DyeColor
    3.  
    4. effect:
    5.     patterns:
    6.         spawn [%-integer% of] [(0¦adult|1¦baby)] dog [named %-string%] [with %-color% collar] [belonging to %-player%] at %location%
    7.     trigger:
    8.         if expression-1 is not set:
    9.             set {_amount} to 1
    10.         else:
    11.             set {_amount} to expression-1
    12.         if parse mark is 0:
    13.             spawn {_amount} of adult wolf at expression-4
    14.         else if parse mark is 1:
    15.             spawn {_amount} of baby wolf at expression-4
    16.         last spawned wolf.setTamed(true)
    17.         if expression-2 is set:
    18.             set name of last spawned wolf to expression-2
    19.         if expression-3 is set:
    20.             last spawned wolf.setCollarColor(DyeColor.valueOf(capitalized "%expression-3%"))
    21.         if expression-4 is set:
    22.             last spawned wolf.setOwner(expression-4)
    Examples of use:
    Code (Skript):
    1. spawn baby dog named "Lil Pup" at player
    2. spawn baby dog named "Lil Rover" with blue collar belonging to player at player
    3. spawn 1 of adult dog named "Rover" with yellow collar belonging to arg-1 at arg-1
    4. spawn dog with green collar at player
     
    • Like Like x 1
  2. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,232
    Likes Received:
    169
    Medals:
    Aw, I was hoping I could post my cats and dogs pictures, oh well.
     
    • Funny Funny x 1
Loading...