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.

Custom Mobspawners

Discussion in 'Skript' started by NilsB20, Nov 30, 2020.

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

    NilsB20 Member

    Joined:
    Nov 30, 2020
    Messages:
    1
    Likes Received:
    0
    Hello everyone,
    I want to make a skript where you have for example a pig spawner. but in stead of it spawning a pig it spawns a zombie with a name etc. How would i do this. I want a pig spawner because pigs can spawn in the daylight and zombies can't. I already had a skript what worked fine but it broke somehow. It is a very stupid skript but i made it when i was doing skripting for a few weeks.

    Code (Text):
    1. on spawn of pig:
    2.     send "%Spawn Reason%" to console
    3.     if "%Spawn Reason%" is "mob spawner":
    4.         set {count} to 2
    5.         kill the pig
    6.  
    7. on death:
    8.     if victim is pig:
    9.         {count} is 2:
    10.             spawn a zombie at victim's location
    11.             cancel the drops
    12.  
    13. on spawn of a zombie:
    14.     {count} is 2:
    15.         set {count} to 0
    16.         set name of the zombie to "&cPirate Tier II"
    17.         set helmet of zombie to chain helmet
    18.         set chestplate of zombie to iron chestplate
    19.         set leggings of zombie to iron leggings
    20.         set boots of zombie to chain boots
    21.         set zombie's held item to diamond sword of sharpness 30
    Skript version: 2.5.2
    Minecraft version: 1.16.4
    --- Double Post Merged, Dec 1, 2020, Original Post Date: Nov 30, 2020 ---
    I already figured it out i dont need any help any more i had to put event-entity instead of pig for any one who wants to know
     
  2. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Please edit the title as solved if you have found a solutions :emoji_slight_smile:)
     
Thread Status:
Not open for further replies.

Share This Page

Loading...