I am wondering why this piece of skript is not working. It's purpose is to set custom drops for zombies named "Easy Zombie".
function EasyZombie_random(chances: numbers, ids: objects) :: object:
set {_random} to random number between 0 and sum({_chances::*})
loop {_chances::*}:
add loop-value to {_sum}
{_random} is between 0 and {_sum}
return {_ids::%loop-index%}
on death:
name of victim is "&2Easy Zombie"
clear the drops
add rotten flesh of unbreaking named "&8Easy Zombie Meat" to {_item::*}
add iron helmet to {_item::*}
add iron chestplate to {_item::*}
add iron leggings to {_item::*}
add iron boots to {_item::*}
add iron sword to {_item::*}
set {_chances::*} to 90,2,2,2,2 and 2
set {_i} to EasyZombie_random({chances::*},{_item::*})
drop {_i} at event-location
function EasyZombie_random(chances: numbers, ids: objects) :: object:
set {_random} to random number between 0 and sum({_chances::*})
loop {_chances::*}:
add loop-value to {_sum}
{_random} is between 0 and {_sum}
return {_ids::%loop-index%}
on death:
name of victim is "&2Easy Zombie"
clear the drops
add rotten flesh of unbreaking named "&8Easy Zombie Meat" to {_item::*}
add iron helmet to {_item::*}
add iron chestplate to {_item::*}
add iron leggings to {_item::*}
add iron boots to {_item::*}
add iron sword to {_item::*}
set {_chances::*} to 90,2,2,2,2 and 2
set {_i} to EasyZombie_random({chances::*},{_item::*})
drop {_i} at event-location