Solved spawn eggs

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

PolduZ

Member
Oct 2, 2020
31
2
8
Hey I recently was trying to make an item that turns mobs into spawn eggs here's what I di so far but i can't really find a way to solve the entity tag if there's any way to do it i would appreciate the answer

Code:
on damage of a mob:
    if attacker is holding an emerald named "&a&lEggifier":
        If attacker has 1 of egg in inventory:
            kill the victim
            remove 1 egg from attacker
            give attacker 1 %entity_type% egg
            chance of 20%:
                send "&c&lOof your &a&lEggifier &c&lbroke!" to attacker
                remove 1 emerald named "&a&lEggifier" from attacker
            chance of 1%:
                send "&2&lYou got lucky! You didn't loose the egg!" to attacker
                give attacker 1 egg
        else:
            send "&c&lYou need an egg for this action!" to attacker
            cancel event
 
Last edited:
Code:
on damage of a mob:
    if attacker is holding an emerald named "&a&lEggifier":
        If attacker has 1 of egg in inventory:
            kill the victim
            remove 1 egg from attacker
            set {_egg} to "%victim% egg" parsed as item
            add 1 of {_egg} to attacker's inventory
            chance of 20%:
                send "&c&lOof your &a&lEggifier &c&lbroke!" to attacker
                remove 1 emerald named "&a&lEggifier" from attacker
            chance of 1%:
                send "&2&lYou got lucky! You didn't loose the egg!" to attacker
                give attacker 1 egg
        else:
            send "&c&lYou need an egg for this action!" to attacker
            cancel event
 
i also recommend you to add
Code:
victim is not a player:
or you could one shot other player's with it and it would be op
 
Status
Not open for further replies.