Jump to content

Skript Help Needed


PotatoLord442

Recommended Posts

I have recently started learning Skript and I am having trouble with a skript. I want to have it so when a zombie spawns, there is a 2% chance it has diamond armor, a diamond sword, and 5 extra health, but I didn't know how to add the chance or how to give it the diamond weapons and armor.

Current Code:

on spawn of zombie:
    give a diamond sword to the zombie
    equip zombie with all diamond armour
    set the maximum health of the zombie to 15

The zombie gets extra health, but it doesn't have a sword or armor. I also need help making it so when a drowned spawns, there is a 5% chance it could be riding a squid.

Current Code:

on spawn of drowned:
    make the drowned ride a squid

Help would be appreciated!

Link to comment
Share on other sites

On 4/10/2021 at 4:33 AM, PotatoLord442 said:

I have recently started learning Skript and I am having trouble with a skript. I want to have it so when a zombie spawns, there is a 2% chance it has diamond armor, a diamond sword, and 5 extra health, but I didn't know how to add the chance or how to give it the diamond weapons and armor.

Current Code:

on spawn of zombie:
    give a diamond sword to the zombie
    equip zombie with all diamond armour
    set the maximum health of the zombie to 15

The zombie gets extra health, but it doesn't have a sword or armor. I also need help making it so when a drowned spawns, there is a 5% chance it could be riding a squid.

Current Code:

on spawn of drowned:
    make the drowned ride a squid

Help would be appreciated!

Here is a hint for what you are trying to do 😉:

on spawn of zombie:
    chance of 2%:
        set event-entity's helmet to diamond helmet

 

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

1 hour ago, PotatoLord442 said:

Thanks! It worked!

😃👍

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

Question answered. Topic locked.

Joined on January 17th 2016

VIP since April 5 2017 - August 1st 2019

JrMod since August 1st

Mod since October 1st

SrMod since November 2nd - 2/7/21

Patron since February 8 - 3/7/21

Mod since March 8 2021

Retired since idk when

 

    [IMG]    button.png?t=Appeal&f=Calibri-Bold&ts=26&tc=fff&tshs=1&tshc=000&hp=20&vp=8&c=10&bgt=gradient&bgc=1d0dea&ebgc=1a0855&be=1 button.png?t=Rules&f=Calibri-Bold&ts=26&tc=fff&tshs=1&tshc=000&hp=20&vp=8&c=10&bgt=gradient&bgc=1d0dea&ebgc=1a0855&be=1  

If I helped or entertained you at all today, please react with a heart.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...