Why won't this skript work?

  • 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 community!

    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.
Jul 9, 2020
2
0
0
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
 
Status
Not open for further replies.