Im trying to create a crate system. What i want it to do is when clicked on it gives you a random element from a list variable.
When i do this is takes the tripwire hook, but doesnt give anything. Any help would be Good!
[doublepost=1613965834,1613946156][/doublepost]turns out i needed to do this -
Code:
on right click on lime stained glass:
if player is holding a tripwire hook:
cancel event
clear {list::*}
add "stone" to {list::*}
add "hay block" to {list::*}
set {item} to a random element of {list::*}
give {item} to player
remove tripwire hook from player's inventory
send "%{item}%"
When i do this is takes the tripwire hook, but doesnt give anything. Any help would be Good!
[doublepost=1613965834,1613946156][/doublepost]turns out i needed to do this -
Code:
give "%{item}%" parsed as item type to player