Custom Mobspawners

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

NilsB20

Member
Nov 30, 2020
1
0
1
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:
on spawn of pig:
    send "%Spawn Reason%" to console
    if "%Spawn Reason%" is "mob spawner":
        set {count} to 2
        kill the pig

on death:
    if victim is pig:
        {count} is 2:
            spawn a zombie at victim's location
            cancel the drops

on spawn of a zombie:
    {count} is 2:
        set {count} to 0
        set name of the zombie to "&cPirate Tier II"
        set helmet of zombie to chain helmet
        set chestplate of zombie to iron chestplate
        set leggings of zombie to iron leggings
        set boots of zombie to chain boots
        set zombie's held item to diamond sword of sharpness 30
Skript version: 2.5.2
Minecraft version: 1.16.4
[doublepost=1606854967,1606753116][/doublepost]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
 
Please edit the title as solved if you have found a solutions :emoji_slight_smile:)
 
Status
Not open for further replies.