WeightedList - Add Entry (Effect) — SkBee
Addon: SkBee · Category: Effect · Since: 3.24.0
Syntax
add %object% to %weightedlist% with [a] weight [of] %number%Description
Adds an entry to a weighted list with a specified weight. Weight must be greater than 0.
Examples
set {_loot} to new weighted listadd 1 of salmon to {_loot} with weight 5add 1 of cod to {_loot} with weight 7add stone sword of unbreaking 3 to {_loot} with weight 1add 3 of cooked chicken to {_loot} with weight 2add 4 of string to {_loot} with weight 15set {_random} to random weighted element of {_loot}set {_random::*} to 5 random weighted elements of {_loot}