I'm currently trying to create a system for my server that will give the player a list of randomly generated tasks that the player must carry out within the hour in order to receive extra in-game currency. When the hour is up, the player's progress on completing the tasks will be reset and the list will be randomized again. If the player completes the tasks before the hour is up, they would be rewarded with in-game currency and they would not receive any new assignments until the next hour.
The tasks assigned would be things like:
"Eat %random integer between 2 and 5% %random item out of all food%s"
"Kill %random integer between 2 and 5% %random entity out of all monsters%s"
"Mine %random integer between 2 and 5% %random block out of all ores%s"
Just generic Minecrafty things to keep the player engaged.
Any help would be very much appreciated.
Here's what I got so far:
# NOTE: This only works to a certain point and also tends to become biased to certain task conditions
command /task <string>:
trigger:
if arg-1 is "randomize":
send "Your new tasks:"
set {task::amount::%player%} to random integer between 2 and 5
loop {task::amount::%player%} times:
clear {task::types::*}
clear {task::list::%player%}
add "Kill %random integer between 2 and 5% %random entity out of all monsters%s" to {task::types::*}
add "Consume %random integer between 2 and 5% glow lichens" to {task::types::*}
add "Eat %random integer between 2 and 5% %random item out of all food%s" to {task::types::*}
set {task::target::%loop-number%::%player%} to random element of {task::types::*}
send "&7%{task::target::%loop-number%::%player%}%"
add {task::target::%loop-number%::%player%} to {task::list::%player%}
on tab complete:
event-string is "/task":
set tab completion to "randomize"
Again, any help would be very much appreciated
Thank you.