So uh, I wanted to do custom mobs using the on-spawn event and then modifying them with leather armor and stuff and the mobspawning is ABSURD. There are like 50-100 mobs in every chunk when using that skript, does anyone know how to fix that? (skript 2.6.1, skquery 4.1.5, 1.17.1)
Code:
function setarmor(e: entity, wh: text):
if {_wh} is "leather":
set {_e}'s helmet to leather helmet
set {_e}'s chestplate to leather chestplate
set {_e}'s leggings to leather leggings
set {_e}'s boots to leather boots
on spawn:
if "%entity%" is "zombie":
set {mobname} to "Zombie"
if "%entity%" is "skeleton":
set {mobname} to "Skeleton"
if "%entity%" is "spider":
set {mobname} to "Spider"
if "%entity%" is "creeper":
set {mobname} to "Creeper"
if {mobname} is set:
chance of 80%:
set event-entity's name to "&7%{mobname}%"
set event-entity's tool to wooden axe of sharpness 1
chance of 80%:
set event-entity's tool to iron shovel
chance of 50%:
set event-entity's tool to iron pickaxe
chance of 20%:
set event-entity's tool to stone axe
setarmor(event-entity, "leather")
delete {mobname}
stop
chance of 50%:
set event-entity's name to "&2%{mobname}%"
set event-entity's tool to wooden axe of sharpness 1
chance of 80%:
set event-entity's tool to iron shovel
chance of 50%:
set event-entity's tool to iron pickaxe
chance of 20%:
set event-entity's tool to stone axe
setarmor(event-entity, "leather")
delete {mobname}
stop
chance of 40%:
setarmor(event-entity, "leather")
set event-entity's tool to stone axe of sharpness 1
set event-entity's name to "&9%{mobname}%"
delete {mobname}
stop
chance of 10%:
{mobname} is zombie or skeleton
apply glowing of tier 255 without any particles to entity for 100000 seconds
set event-entity's name to "&5%{mobname}%"
set event-entity's tool to iron sword of sharpness 1
set event-entity's helmet to chain helmet of protection 1
set event-entity's chestplate to iron chestplate of protection 1
set event-entity's leggings to chain leggings of protection 1
set event-entity's boots to iron boots of protection 1
delete {mobname}
stop
chance of 5%:
{mobname} is zombie or skeleton
set event-entity's name to "&6%{mobname}%"
apply glowing of tier 255 without any particles to entity for 100000 seconds
set event-entity's tool to diamond sword of sharpness 1
set event-entity's helmet to iron helmet of protection 1
set event-entity's chestplate to iron chestplate of protection 1
set event-entity's leggings to iron leggings of protection 1
set event-entity's boots to iron boots of protection 1
set event-entity's max health to 20
heal event-entity
apply swiftness of tier 2 without any particles to event-entity for 999 days
delete {mobname}
stop
set event-entity's tool to wooden axe of sharpness 1
set event-entity's name to "&7%{mobname}%"
delete {mobname}
else:
set event-entity's name to "&7%entity%"
delete {mobname}